/ Published in: PHP
This code loads the sidebars pod, determines if the current page matches any of the selected pages for the sidebar record and loads the Pod template to use for each record.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php global $wp_query; $current_page = $wp_query->post->ID; $where = "pages.id LIKE '". $current_page . "'"; $Record = new Pod('sidebars'); $Record->findRecords('weight ASC', -1, $where); ?> <ul class="xoxo"> <?php echo $Record->showTemplate('sidebars_list'); ?> </ul>