X file structure query

Hello, I am trying to tweak the search result to 1 (so far so good) and to display directly the content of the post instead of displaying the search result first. So, basically, search term 123 opens directly the post titled 123.

One of the suggestion I found is: "In your post loop in search.php, add this code:
echo get_the_content($post->ID);

What I am not sure about is which file to edit as I cannot locate the search.php file in the X theme (also I am using a child)
Could you let me know where to find this file as I can only locate the searchform.php?

Hi there,

Thank you for writing in!

By default X doesn’t have search template file, you can either create one (http://codex.wordpress.org/Creating_a_Search_Page) or you can make editing in:

 wp-content/themes/x/framework/views/global/_index.php.

Please also review our knowledge base article on: Customization Best Practices.

Hope this helps.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.