Viewing 5 posts - 1 through 5 (of 5 total)
Dan

File in Child Theme Breaks Search Results

I wanted to do some tweaking to the search results grid display and so I copied the content-listing.php into my child theme directory and without making any changes to it, it causes the search results to vanish/break. Top half of the search results page shows, just the search results and footer are gone. Other pages render properly. Delete the file and all is good again... and my child theme is working well otherwise.

Created: February 13, 2020 at 11:32 pm

  • JamesD
    JamesD
    February 13, 2020 at 11:47 pm

    Hello Dan,

    After you copy the file to your child theme dir make sure to remove if(!_ppt_checkfile("content-listing.php")){ and the <?php } ?> on the bottom line.


  • Dan
    February 14, 2020 at 2:03 am

    Thank you JamesD!

    Your fix did the trick. It was a little off but I managed to figure it out from the errors that started throwing.

    I removed the if(!_ppt_checkfile("content-listing.php")){ and the
    <?php } ?> on the bottom line as you suggested but then I got the following error:

    PHP Parse error: syntax error, unexpected ‘}’, expecting end of file in /home/cld/public_html/…/content-listing.php on line 632

    I put back the <?php } ?> on the bottom line and removed <?php } ?> on line 632 and all is working now. Search results are showing and no more errors.

    Thank you again.

  • Mark Fail
    Mark Fail
    February 14, 2020 at 4:51 am

    Thanks for updating Dan.

  • James
    James
    February 16, 2020 at 2:15 am

    @Dan
    You’re welcome Dan, glad it helped.
    My apologies with the ending bracket. A lot of other cases it would be the last one. 😉
    I was lazy about verifying the correct one, glad you caught that.

Copyright © 2010-2020 PremiumPress Limited.

secure payments