GetSimple Support Forum

Full Version: getPageContent and get_parent
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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!
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'); ?>