Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Conditional tags
#13
By default get_parent() echoes the parent but does not return it.
The correct way would be:
Code:
<?php if (get_parent(false)=='slug'){ ?>
(BTW I use 0 instead of false, it's the same)
Reply


Messages In This Thread
Conditional tags - by Live - 2010-11-27, 09:01:06
Conditional tags - by Live - 2010-11-27, 09:05:06
Conditional tags - by yojoe - 2010-11-27, 17:27:21
Conditional tags - by Carlos - 2010-11-27, 20:54:50
Conditional tags - by Carlos - 2010-11-27, 21:55:14
Conditional tags - by yojoe - 2010-11-27, 22:10:04
Conditional tags - by Connie - 2011-04-28, 20:16:50
Conditional tags - by hameau - 2011-04-28, 22:27:45
Conditional tags - by Connie - 2011-04-28, 22:33:02
Conditional tags - by hameau - 2011-04-28, 23:03:13
Conditional tags - by RobA - 2011-04-29, 01:41:16
Conditional tags - by [/root.] - 2011-08-31, 17:17:03
Conditional tags - by Carlos - 2011-08-31, 17:35:06



Users browsing this thread: 1 Guest(s)