-
AuthorPosts
-
October 9, 2015 at 5:51 am #617932This reply has been marked as private.October 9, 2015 at 5:53 am #617938
your layout for search result is this: http://theme.co/x/demo/integrity/1/?s=pl
October 9, 2015 at 7:32 am #618040Hi,
As stated above masonry layout is not available for search results page. It could be possible to achieve with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.
Thank you for understanding. Take care!
October 9, 2015 at 7:39 am #618047Sure guys what I meant was: if I want to change the search results layout which is the file I have to edit?
the _index.php you pointed me too?
October 9, 2015 at 8:48 am #618128Hi there @mrk,
That’s correct, if you want to edit the search results layout, you’ll need to edit the _index.php we pointed you too, and you’ll need to use some custom css. 🙂
Thank you!
October 9, 2015 at 8:54 am #618138But somehow it seems that anything I add on that page (let’s say I create a div to show TEXT) just has effect on the archive layout page but not on the result one?
I copied this file wp-content/themes/x/framework/views/global/_index.php into here wp-content/themes/x-child/framework/views/global/
If I did correct I’ll check then
October 9, 2015 at 9:29 am #618173usually the page is search.php
October 9, 2015 at 10:09 am #618232Hi there,
X utilizes index.php template file for all pages including archives. There is no other template file, e.g. search.php. But you can always create one if you wish to achieve a different layout.
Making changes to _index.php directly will eventually show up on all the archive pages due to the reason it’s being used by all of them. In this case, you could either create a separate search.php template file in the root of your child theme, or use WordPress Conditional Tag for search results page to make the changes specific to the search results page.
As this would be a custom development, regretfully it would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.
Thanks for understanding. Take care!
October 9, 2015 at 10:14 am #618240Hi thanks sorry maybe I didn’t explain well but yes _index.php shows archives but I need the page that shows the search results.
If you make a search on your theme here: http://theme.co/x/demo/integrity/1/shortcodes/accordion/
TOP RIGHT search on the NAVBAR menuyou get to a page with just one column
While your archive page is different.hope I explained better
October 9, 2015 at 12:04 pm #618417Hi there,
Thanks for explaining further. Although the archive and search result page displays with different layout, they utilize one file which is _index.php. There are few lines in the code that checks if the user is the search page and it gives the page a one column layout. You can try to scrutinize the codes in the file further if you have some development skills. This is actually a little more complex to implement and requires a little more customization that unfortunately falls beyond out scope. But it might help if you check on how to implement masonry layout through custom javascript/CSS. You may get some ideas here. The search results page has a class .search-results so you can use it to reference specifically the search results page.
Hope this gives your more idea.
October 9, 2015 at 12:06 pm #618419Thanks is exactly what I was looking for. Yes the isotope container is loaded just on archives using the _index.php page.
thanks guys
October 9, 2015 at 12:16 pm #618434Hope that might help someone else if needed this is correct code that worked. Now search results is styled like archive.
if ( is_home() ) : $style = x_get_option( 'x_blog_style', 'standard' ); $cols = x_get_option( 'x_blog_masonry_columns', '2' ); $condition = is_home() && $style == 'masonry'; elseif ( is_archive() ) : $style = x_get_option( 'x_archive_style', 'standard' ); $cols = x_get_option( 'x_archive_masonry_columns', '2' ); $condition = is_archive() && $style == 'masonry'; elseif ( is_search() ) : $style = x_get_option( 'x_archive_style', 'standard' ); $cols = x_get_option( 'x_archive_masonry_columns', '2' ); $condition = is_search() && $style == 'masonry'; else : $condition = false; endif;
thanks
October 9, 2015 at 4:27 pm #618802Nice, thanks for sharing 🙂
-
AuthorPosts