Customize Search Page: Highlight term and Post Count

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #79722
    anesioneto
    Participant

    Hi,

    I´ve tried to customize the search.php to count the total results but I found your code too different from the basic search.php.
    I´m not a coder. Is there by any chance you could help me with that?

    I understand that there is a risk and that you recommend using Child theme.

    Thanks,
    Anesio Neto

    #79747

    Hi anesioneto,

    To show the Search Count, please go to the Theme directory > search.php file on line no: 19 you will find below code

    <?php

    Paste the below code beneath the above mention code

    $search_count = new WP_Query("s=$s&showposts=0"); 
    echo $search_count ->found_posts . ' ';

    Thanks

    #79748
    anesioneto
    Participant

    Thank you guys!

    #79803

    Welcome anytime @anesioneto

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.