Tagged: x
-
AuthorPosts
-
August 31, 2016 at 3:09 am #1154722
auldreekieParticipantI’ve customised the content.php page in my child theme (in x-child > framework > views > icon).
This has affected my search results page though – there’s too much information showing for each result on the page – including the page full content.
I’d like to change the way search results appear by doing something like this:
If search results page : show this stuff (linked title, excerpt)
If any other page : show this stuff (title, excerpt, featured image, full content etc)I’ve tried various options, including is_search etc, but can’t get this to work.
Any help gratefully received!
August 31, 2016 at 3:57 am #1154770
ChristopherModeratorHi there,
Please provide us with your site URL and the code you already have in content.php file.
Thanks.
August 31, 2016 at 7:10 am #1154987
auldreekieParticipantThis reply has been marked as private.August 31, 2016 at 2:46 pm #1155612
RadModeratorHi there,
The content.php is both used on standard post format and search result, if you just wish or intend to change the post format templates then use the condition is_search() to target proper view. Example,
<?php // ============================================================================= // VIEWS/ICON/CONTENT.PHP // ----------------------------------------------------------------------------- // Standard post output for Icon. // ============================================================================= ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if( is_search() ) : ?> original content.php's code/content here <?php else : ?> your custom code/content here <?php endif; ?> </article>Hope this helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1154722 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
