graleh
Member
Posted 7 months ago #
Hi,
I have used widget logic since I want the tag cloud plugin to show only on blog posts. I am making a web page for a friend and I am using pages for presentation of her company. She also wants a blog with posts on her page so I have made a page called "blogg" and in settings, made this page as the static posts page.
But the widget logic seem to not work here. It works on all the other pages, but not this, "blogg" which I have set as static posts page. Why?
Thanks!
Emelie
static posts page
you haven't posted what conditional you are working with, but, try is_home()
graleh
Member
Posted 7 months ago #
I have tried them all: "It works on all the other pages, but not this, "blogg" which I have set as static posts page."
is 'blogg' using a custom page template?
if so, you might be able to use the conditional tag for page templates:
http://codex.wordpress.org/Function_Reference/is_page_template
also, be aware that any queries in the template might be distorting the original querystring, so that the information is not available where widget-logic is checking it;
try to add <?php wp_reset_query(); ?> at the top of the sidebar.php template.
graleh
Member
Posted 7 months ago #
Um, not sure. I haven't chosen any special page template. So I guess I am using the standard one?
I have checked the reset query option, but it does not seem to work :/ I still cannot see the widget on page "blogg" :/
entropy111
Member
Posted 3 months ago #
Found a fix..two steps...
1. add this code to your front-page.php file
<?php
//TO GET WIDGET LOGIC WORKING WITH FRONTPAGES
wp_reset_query();
?>
2. Add "is_front_page()" in widget logic on teh widgets you want on the front (not really a step, but you know what im sayin).
Hope this helps.
graleh
Member
Posted 3 months ago #
hi entropy111,
Yep that worked, I forgot some settings :/
Thank you very much :)