• How can I manage the appeared data for the post on search page.

    Currently, I have only the title and description of the post on search results, but I need the whole post data to be appeared there, exactly like how it’s appear on Post Page/Homepage.

    I have tried different approaches, and suggested solutions, but with no luck

Viewing 2 replies - 1 through 2 (of 2 total)
  • @startecommerce2, you need to know the WordPress Template Hierarchy. How wordpress work with page template.

    https://codex.www.ads-software.com/Template_Hierarchy

    I don’t know whether you have search.php in your theme folder. If you have search.php the result go to that file and you have to write a post loop there and write the code to display them.

    easiest way is copy the potion of post loop from home (which you want to display) and paste them in the search.php

    If you don’t know about post loop, pls read here
    https://codex.www.ads-software.com/The_Loop

    you can display list of template tag inside the loops.
    example: want to display post title, use “the_title()”,
    want to display post content, use “the_content()”,
    want to display post author, use “the_author()”,
    etc..

    pls reference the post tags section of this link
    https://codex.www.ads-software.com/Template_Tags

    Hope this might help you ??

    Thread Starter startecommerce2

    (@startecommerce2)

    That does not help, I have resolved that by calling the required post data on search page by editing content.php file

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Update/Control the Post data that appears in search page’ is closed to new replies.