Remove background image of search results page

  • Unknown's avatar

    Hello, I’m attempting to change the bg image of my search results page. Using a standard template that leverages PHP searching (search.php)

    If while else in PHP reflects the following:

    
      <?php if (have_posts()) : ?>
    
                                   
    
                                    <?php
                                    /* Start the Loop */
                                    while (have_posts()) :
                                        the_post();
    
                                        /**
                                         * Run the loop for the search to output the results.
                                         * If you want to overload this in a child theme then include a file
                                         * called content-search.php and that will be used instead.
                                         */
                                        get_template_part('template-parts/content', 'search');
    
                                    endwhile;
    
                                    the_posts_navigation();
    
                                else :
    
                                    get_template_part('template-parts/content', 'none');
    
                                endif;
                                ?>

    I would think that I can just edit any of the content search templates and add my CSS in there, but I’m not having any luck. I tried editing the CSS call functions directly on another page, using Inspect within Chrome, but still no luck.

    Is there anything that can overwrite the CSS background image properties within the search.php contents without complexing the main stylesheets

  • @ avarro1 just to confirm, is the site you’re working on hosted here on our servers? these forums are for the free sites using our managed hosting service, which can be quite different from running your own WordPress installation at another host.

    If you’re working with your own copy — and it sounds like you are — here’s a link to the correct forums for self-managed sites:
    https://wordpress.org/support/forums/

  • The topic ‘Remove background image of search results page’ is closed to new replies.