Yes, you just have to call the function the_excerpt()
:
Right after …
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
… you add:
<div class="search-excerpt"><?php the_excerpt(); ?></div>
And then you can style it in your CSS file with:
.search-excerpt
{
/* some code */
}
Related Posts:
- How to remove search bar from a wordpress theme? [closed]
- wp_enqueue_scripts not called on search page?
- How can I customize wp_footer, where is the code that controls what this function does?
- Implement advanced search
- Why is the post type on the search result page random?
- Non-Blog Website without Search: are comments.php and search.php in theme still required?
- Custom WordPress Theme – Search not working on posts
- WordPress Filtering Custom Post Type by Metadata and Search Heirachy
- Post and page content not displaying in search results
- $_POSTing to and modifying the WP search results page
- Custom theme won’t use search.php
- Search Form Not Working
- altering search terms
- Custom search template is showing 404 when adding query string
- Woocommerce AJAX filters option loading spiner – problem on mobile device
- Why not works the search.php file?
- New theme HTML5 Support for Search in WordPress 4.4
- WordPress Custom Search By Alphabet and order by asc and sesc
- Incorrect search results in search.php – issue triggered by using `define(‘BodyID’, ‘search’); the_post();` in search.php
- The normal loop with different styles doesn’t work in search.php
- Search Results not displaying for multiple word search
- custom theme’s search not working
- How to detect mobile devices and present them a specific theme?
- Using wp_add_inline_style without a stylesheet
- Does the functions.php file ever get called during an AJAX call? Debug AJAX
- Bestway To Define Theme and Plugin path and url
- enqueue script for specific shortcode
- The difference between calling wp_enqueue_scripts to load scripts and styles in custom theme
- WordPress twentytwenty theme inline css overriding css body
- What is the problem if I use CDN in my WordPress parent theme(built using bootstrap)?
- How can I insert default widgets when my theme is activated (similar to what twenty eleven does)?
- date_i18n() issue
- Active theme responds to theme change request to alert user
- LOST in WP Template Hireachy
- Merging PHP download script into `functions.php`
- Should use widgets in this case?
- Changing the entire control choices using wp.customize with JavaScript
- Static Front Page problem
- Enabling Default Widgets in a Custom Theme
- A theme that follows all the best practices to learn from?
- get_post() function returns post even if it is trashed
- There’s an image named g.gif somewhere in my WordPress site
- Can wordpress run in root of existing php site with no theme on index.php but all other WP posts/pages?
- How to regenerate thumbnails when they’re stored on S3
- customizing the_password_form filter
- Whats the safest way to output custom JavaScript and Css code entered by the admin in the Theme Settings?
- WordPress 404 page returning with default in IIS7
- searchform.php override not working
- Can’t show custom post thumbnail sizes as background images
- Load child template based on parent
- How to make the_tags title translatable?
- Set default featured image for terms of a custom taxonomy
- How to add material design css in wordpress and woocommerce
- Timber: Get single image from media library with all attributes
- changing blog title to an image using filter function in child theme
- page.php dependent sites are not working in custom woocommerce theme
- How to remove text “Log In” from login page
- Why wp_nav_menu() doesnt show the proper meny when invoked two consecutive times?
- ACF Pro make URL Linked in Custom Template [closed]
- Managing WordPress Theme
- Can’t use admin_enqueue_scripts or wp_enqueue_script
- How is the `get_sidebar` function meant to be used to call a 2nd sidebar?
- next_posts_link and previous_posts_link problem
- Data Validation in wordpress
- Gutenberg theme development: how to add “headers” option under styles > colors > elements?
- Localize script not working in ajax
- How to find and remove unnecessary theme scripts? [closed]
- How can i make multilevel menu in wordpress theme with bootstrap
- Theme logo metadata into template file
- Search only working on front page (index) , not working on other pages
- Setting conditional background image from meta value
- How to Emulate Default Navigation Menu Behaviour in a Custom Theme?
- How to link to the page displayed by home.php?
- WordPress comments title
- How can I run code in functions.php when switch_theme() is called?
- only the first post is shown
- wordpress can’t find single-project page
- Show Yoast SEO meta tags in Custom WordPress Templates (Theme)
- Is there a way to add classes to a page when using a Gutenberg reusable block as page layout?
- How to show some of category in wordpress
- using themename_the_custom_logo() in template-tags?
- How to make the media library searchable by image title
- WordPress doesn’t load css, image and js files after moving local installation folder
- Custom page template not showing on page creation
- Undefined index: custom_sidebars
- How To Customise WordPress Comment Submit Button?
- Next/Previous post navigation
- Single Featured Image Repeating
- Main Menu Theme Different Output Print
- How do I move menu to the bottom in Custom Community theme?
- How do I get information about a page, such as featured image, except, and title?
- How can I install my custom-made theme on a wordpress.com blog? [closed]
- IS there any reason not to include javascript in my own post’s embeds?
- How to create more templates to the same theme?
- A problem in loading index.php
- .submenu class missing in output from wp_nav_menu
- My wordpress site memory exhausted more than 1GB trying to debug with default
- Display first post on each page differently than the others
- Custom Theme functions.php – Using add_settings_field and input type=”file” to set custom logo
- Image and font support missing in editor when deploying theme remotely