2016-05-11, 01:28:46
(This post was last modified: 2016-05-11, 01:32:50 by lokothodida.)
(2016-05-04, 06:42:03)newdeepdan Wrote: I'm having an issue with the I18N Gallery where if I place the shortcode on a page (sidebar) and the template page has getcontent from the page of that sidebar, the gallery will not load. It will only show the shortcode for it. (% gallery name=portraits-gallery %)
On my portfolio template page I have:
Code:<div class="sidebar-left">
<?php getPageContent(return_page_slug().'-sidebar'); ?>
</div>
<div class="content">
<?php get_page_content(); ?>
</div>
You can try forcing the content filters to be executed:
PHP Code:
<?php
// Get the (sidebar) page content as a string
$sidebar = returnPageContent(return_page_slug() . '-sidebar');
// Execute the filters
$sidebar = exec_filter('content', $sidebar);
// Print the result
echo $sidebar;
(not tested)
Wrapped up in a function for you:
PHP Code:
// Example usage: get_page_sidebar(return_page_slug());
function get_page_sidebar($slug) {
$sidebar = returnPageContent($slug . '-sidebar');
$sidebar = exec_filter('content', $sidebar);
echo $sidebar;
}