Support Forums for LiveMesh Themes & Plugins › Forums › Invent Theme Support › Modify search result page
Tagged: search results, staff
- This topic has 1 reply, 2 voices, and was last updated 9 years, 4 months ago by Raghavendra.
-
AuthorPosts
-
September 2, 2015 at 7:45 am #16278mouretDKMember
How can I get staff to show up in search results – without a “read more” link? That is it will show the staff picture and the info (email phone etc).
Guess I need to elaborate a bit 🙂
On http://www.herning-gym.dk/kontakt/ I’ve removed the “single detail page” (like https://www.livemeshthemes.com/invent/faculty/george-mccarthy/) for the staff members, because it was not needed.I suspect modifying and overriding ‘blog-content.php’ might be a starting point.
Any help greatly appreciated 🙂 thanks!
(btw: at the moment I have disabled ‘staff’ post-type from being found in search)
September 4, 2015 at 12:21 pm #16343RaghavendraModeratorYou are right- you will need to modify the blog-content.php file at around line number 155 (the function mo_display_post_content_list_style()) to have code that looks something like this –
if ('staff' == get_post_type()) { $phone = get_post_meta(get_the_ID(), 'mo_phone', true); if (!empty($phone)) { echo '
- '; echo '<i class="icon-phone12"></i>'; echo '<span class="value">' . $phone . '</span>'; echo '
'; } } else { $disable_read_more_button = mo_get_theme_option('mo_disable_read_more_button_in_archives'); if (!$disable_read_more_button) echo '<span class="read-more">' . __('Read More', 'mo_theme') . '</span>'; echo ''; echo '' . mo_entry_author() . mo_entry_published("M d") . mo_entry_terms_list('post_tag') . mo_entry_comments_link() . ''; echo ' <!-- .entry-snippet -->'; }The search.php file makes a call to this function indirectly via mo_display_archive_content() call. You can also modify that particular file and replace it with typical wordpress loop found in blog-content.php if you do not want to modify blog-content.php.
-
AuthorPosts
- The forum ‘Invent Theme Support’ is closed to new topics and replies.