Tag Info

Hot answers tagged

2

Check out this Alternative <?php // in the loop: $template = get_page_template_slug( get_the_ID() ); if (in_array($template,array('home1','home2')) ) ){ // Yep, Do your stuff } // anywhere: $template = get_page_template_slug( $some_post_ID ); if (in_array($template,array('home1','home2')) ) ){ // Yep, Do your stuff } ?>


1

The codex is there to be used and should be your first stop. There is a complete page on conditional tags To exclude the archive page, use is_archive(). EDIT 1 Mark has a valid point. I didn't understand you well, and maybe myself as well :-) Your problem is using the || and && operators Here is your code if ( !is_home() || ...


1

WooCommerce uses a custom post type called product for its product. Your shop page appears to be looking for a products archive. I can tell this because of the slug - post-type-archive-product Have you tried renaming your custom shop template file archive-product.php? This should override the default archive template.


1

My guess is that you have not defined a page.php template in your theme, so pages are being displayed using index.php which includes a sidebar with widgets and comment form. Edit: Looking at the code in your updated question, you can remove the following: // If comments are open or we have at least one comment, load up the comment template. if ...


1

In the link all the content such as calendar, categories, archive, etc. are coming from the sidebar widget which most probabily defined into your page.php layout. something like: <?php get_sidebar( 'content' ); ?> You need to remove this kind of sidebar code from the page.php file to not display that information.


1

This has nothing to do with caching, but with form auto-completion. It is happening because the browser is set to store form content. To avoid this, you should generate a random code and add it to the name attribute of your input tags. Then send the random generated number trough another hidden input so you can retrieve the data on the other side.



Only top voted, non community-wiki answers of a minimum length are eligible