-
AuthorPosts
-
April 24, 2014 at 3:46 pm #36904
Hello,
I’m new to working in WordPress so I’ll have to apologize in advance if this is a silly question. I’m trying to modify the page that displays the search results. It is currently displaying as single column, full width, and I want to change it so that it displays the search results with two columns. I’ve tried researching this and I gather that I need to modify some sort of template file, but I looked at the templates and all I saw was a searchform.php file. Any help would be greatly appreciated.
April 24, 2014 at 10:16 pm #37003Hi Ray!
Thank you for using the theme!
The search results page use the _index.php template located on the framework > views > global folder. Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or look to a service such as Microlancer or Tweaky for assistance should you not feel comfortable making these changes yourself. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.
Thank you for your understanding.
May 19, 2014 at 5:07 pm #46159Hello –
I am looking for the same thing, however I can code a bit but I have a question about the “_index.php” file. I see it loops through with:
<?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <?php x_get_view( x_get_stack(), 'content', get_post_format() ); ?> <?php endwhile; ?> <?php else : ?> <?php x_get_view( 'global', '_content-none' ); ?> <?php endif; ?>
And if there isn’t any content, it uses the _content-none file in the Views->Global. My question is if it loops through and finds posts during a search query, where & what file is being used for the output of the search results? i.e. If I wanted to change the HTML structure of what is being outputted? Couldn’t I just create my own search.php file and drop that in the theme directory and and it would use that to output the search results?
Thanks.
May 20, 2014 at 9:55 am #46449Hi there,
It’s using the exact same templates that it would use to output the posts.
get_post_format()
finds out what format is being used, then that template is rendered.You could modify search.php, but I wouldn’t advise this as you’d still need the code to build the page, and query for results.
What are you trying to change? There are better ways to go about it.
For example, if you want to change the post meta, you could make a copy of the
x_integrity_entry_meta
function in functions.php of your child theme. Then you could useis_search()
to check if the search page is being displayed.If you let us know what you’re looking to change, we might me able to give you a better idea of how to get started.
May 21, 2014 at 9:38 pm #47148Well, I have integrated the Pods Framework and I have built out a Custom Post Type called “Inventory” with several fields related to a products. (non-ecommerce site) I am also using Ultimate WP Query Search Form to be able to search these custom fields in my pod. Since there is limitations to the plugin and it uses WP’s default search results, I had to customize the loop to search my custom meta fields and return them in a very specific output.
That being said, I am Hijacking the site-wide search and using Ultimate WPQSF has my search forms to search my Custom Post Types, it is probably not the best route but I am just a beginner at PHP.
So I moved the search loop from _index.php to wp-search.php and customized my search results as needed with my own loop for searching my Pod.
Not crazy about hacking apart the theme but this is working for now. If you have suggestions to do it differently I am all ears.
Thanks.
May 22, 2014 at 3:02 pm #47462Hi there,
That works, it just might be difficult to maintain on updates. I’m still not sure I understand the changes you need to make. What are the specific HTML changes that need to happen? Knowing more about what the end result should be will help us recommend something.
September 4, 2014 at 4:54 am #98249I’m also looking for an ‘easy’ way to modify the search results page template if anyone has any pointers?
Isn’t there a plugin that does this?
Why don’t themes include a modified search results page, I mean who wants the Meta Widget on any of their pages anyway?September 4, 2014 at 5:00 am #98253Thanks for writing in
We let our developers to know about it.September 14, 2014 at 8:53 pm #104746I’m also looking for a way to ‘change the search result template’. By this I mean:
1. I can choose my page layout for my whole website in ‘Customizer -> Integrity -> Content Layout’. Here I choose ‘Sidebar Left, Content Right’;
2. For some pages I don’t want to use this ‘site-wide default layout’ I can choose the layout for a specific page in ‘Pages -> My Page -> Template’. For example, here I choose ‘Blank – No Container | Header, Footer;
3. I cannot find a way to choose the layout separately for my ‘Search Results’ page. It uses the ‘site-wide default layout’ I choose in ‘Customizer’.My question is: is there a place I can make this choice? Even the coding itself is out of the scope of your support, could you please tell us which file or files we should look into and code in?
Thanks,
September 14, 2014 at 9:39 pm #104765Hi Jin,
The search result is using the same template as blog home page template, the index.php. Although, you can see different looks because display is controlled per template part.
For example, the blog page and search page uses the same landmark template, but inside the landmark template there is a logic of which to show if the caller is search page or not.
In short, all files connected to index.php is related to search view too. You may duplicate index.php and its sub template parts to create dedicated template for search result.
This is not related to X theme, but may explain it much further http://themeshaper.com/2012/11/06/the-wordpress-theme-search-template-and-page-template/ It’s common standard on all theme.
And check this http://theme.co/x/member/kb/customization-best-practices/ how template parts can be called from your own search template.
Cheers!
October 12, 2014 at 9:27 pm #123950I have activates the Vav Bar search function but the search results have GIANT blown up and pixelated images. How do I fix this?
October 12, 2014 at 9:28 pm #123951NAVBAR
October 13, 2014 at 7:50 am #124185Hi there,
Please add the following CSS code under Customize -> Custom -> CSS:.search-results .entry-featured { width: 9%; }
Thank you.
October 22, 2014 at 8:39 pm #130315Hi Team,
First, thank you for your detail answer(#104765) to my question(#104746) above.
Actually I have a very simple way to get the ‘search result page layout’ I want. That is to simply choose “Appearance->Customize->Integrity->Content Layout->Fullwidth”. Then the search result page will only show the search result without any sidebar widget or post.
However there’s weird issue preventing me from doing so, which I suspect it’s a bug, or my lack of knowledge.
Description:
Scenario 1: choose “Appearance->Customize->Integrity->Content Layout->Sidebar Left, Content Right”.
When edit each page, you can choose different layouts from “Page Attributes->Template”, e.g. Blank – No Container, or Layout – Sidebar left, Content right. This will allow you choose different layouts for different pages, making the layout you set in ‘Customizer’ a default layout.Scenario 2: choose “Appearance->Customize->Integrity->Content Layout->Fullwidth”.
Now the layouts from “Page Attributes->Template” doesn’t work. No matter what layout you choose here, it just use the default one you set in the Customizer. Essentially you cannot use different layouts for different pages.I simply don’t understand the inconsistency here. I doubt I might did something wrong.
Could you kindly help me with this?
Thanks,
JinOctober 22, 2014 at 8:39 pm #130316This reply has been marked as private. -
AuthorPosts