if on my single.php page there is no code to add the sidebar, but sidebar shows up, what page is calling it? I want to load a different sidebar on my other pages than on my home page.
thanks
if on my single.php page there is no code to add the sidebar, but sidebar shows up, what page is calling it? I want to load a different sidebar on my other pages than on my home page.
thanks
Sorry I wrote that as I ran out the door to a bus. It checks to see if the current page loaded doesn’t use the single.php, if it doesn’t use it load the sidebar. If the page loads using single.php don’t load it.
If you read the get_sidebar() function codex, linked above. You can do something like this
if(is_home()){
get_sidebar();
}else{
get_sidebar('other');
}
This says if you are on the home page, load the normal sidebar (sidebar.php), on all other pages load the ‘other’ sidebar (sidebar-other.php). Note that you have to make the sidebar-other.php file, and place it into the directory of the theme you are using.
Most likely it is in your footer.php. You can try using is_single. Go into your footer, if you see sidbar code or [URL=“http://codex.wordpress.org/Function_Reference/get_sidebar”]get_sidebar, then try
if(!is_single()){
get_sidebar();
}
Maybe you can use different template
rguy, what does the ! mean in that code? Thanks. Just curious.
That is rather basic PHP syntax, but no, IANGTSI
Logical Operators
I was just making sure. I know what it means in other languages. Now, I need to know what IANGTSI is.
Thank you. I got busy and now I am going back to try this. I do see the code in the footer and will try to figure this out. Thanks again.
IANGTSI - I Am Not Going To Say It
Thank you sir.