How to remove header images from all pages except the home page? skeleton theme

The following one-liner removes regular header images: ! is_admin() && is_front_page() && add_filter( ‘theme_mod_header_image’, ‘__return_false’ ); Usually, header images are saved and retrieved per Theme Modification API, which offers the same filter scheme “theme_mod_$name” for all theme data. Update I see now, the theme is using the post thumbnail as header images on single views: … Read more

where can i add custom script to stop header video from autoplay

If you have your own theme or a child theme then you can add this in script tags to one of your templates. I’d suggest your footer template, just after the call to <?php wp_footer(); ?> <script> jQuery( document ).ready( function() { jQuery( document ).on( ‘wp-custom-header-video-loaded’, function() { jQuery(“#wp-custom-header-video”).attr(‘autoplay’,false); }); }); </script> Note that I’ve … Read more

Error messages when adding code to function.php or trying to delete inactive plugin files

Your functions.php file is outputting instead of returning something, on line 519. Can you post whatever code/functions are around Line 519? EDIT: You have a syntax error in your cpt_Search_category_Filter() function. You have a couple stray semi-colons after closing braces. Change this: function cpt_Search_category_Filter($query) { $post_type = array(‘post’,’business_sold’); if ($query->is_search || $query->is_category) { $query->set(‘post_type’, $post_type); … Read more

Why isn’t my if/elseif/else working correctly here?

is_category will not process the logic inside the argument list. This: is_category(‘glorkian’ || ‘glork’) The condition is true on all category pages. What I think is happening is that PHP does parse that argument string, but is always going to be true. Try this: var_dump(‘glorkian’ || ‘glork’); Meaning that what you are doing, essentially, is … Read more

Show TwentyEleven header image only on home page

To remove the header image of the Twenty Eleven theme on other pages then your homepage, change the following code in header.php (in wp-content/themes/twentyeleven) Before: <?php // Check to see if the header image has been removed $header_image = get_header_image(); if ( ! empty( $header_image ) ) : ?> After: <?php // Check to see … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)