Including 2 Negative Is_Template Conditionals in header.php [closed]

(Expanding on Pieter’s comment above, and explaining the logic behind it…) if() evaluates the conditions in the parentheses, and that evaluation results in either TRUE or FALSE for the sum total (which can change, depending on how the various conditions are combined). In plain English, if( !is_singular(‘device’) || !is_front_page() ) means, “If it’s either true … Read more

Load slideshow.css file only if Slideshow is checked / on

Add a function to your functions.php file like this: function slider_scripts() { wp_enqueue_style( ‘slider-java-script’, get_template_directory_uri() . ‘/css/slider-java-script.css’ ); //change the location to work for you } Then add slider_scripts() to the top of the template part ( partials/slider/slider-java-script.php )

Can’t seem to get an else statement correct? [closed]

There is no while/else in PHP that I know of. Second, I find “alternate” control structure syntax impossible to read, especially with two or three on the same line. Use brackets and properly indent your code. It will make a lot more sense. <?php $tags = wp_get_post_tags($post->ID); if ($tags) { ?> <h3>Related</h3> <?php $first_tag = … Read more