Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Different sidebars in all pages with only one template
#2
kirilldmt Wrote:i want to display different information in sidebar of my site on every page.
and i don't want to make different templates for every page.
my idea is to input the construction like
Code:
<?php get_component('name of page slug');    ?>
i try to do this by this code:
Code:
<?php get_component('get_page_slug');    ?>
but it doesn't work.
Gentlemen's, give me advice please )

This would give you the component named get_page_slug.
You need to call the function get_page_slug, so use
Code:
<?php get_component(get_page_slug()); ?>
to output the component with the same name as your page.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply


Messages In This Thread
Different sidebars in all pages with only one template - by mvlcek - 2011-08-19, 03:59:21



Users browsing this thread: 1 Guest(s)