Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION getPageContent and get_parent
#1
Question 
I'm trying to get the page content of a page by doing something like this, but I'm not quite sure how to actually implement it with the template tags:

<?php getPageContent( <?php get_parent(); ?>'-sidebar' ); ?>

Essentially getting the content based upon the parent slug.

Any help would be appreciated! Thank you in advance!
Reply
#2
Add a page_exists function to your theme's functions.php, see here:
http://get-simple.info/forums/showthread...6#pid44706

Then the code for your template could be:
PHP Code:
<?php if (page_exists(get_parent(false).'-sidebar')) getPageContent(get_parent(false).'-sidebar'); ?>
Reply




Users browsing this thread: 1 Guest(s)