In your theme’s functions.php:
/* Returns a "Continue Reading" link for excerpts, with 'nofollow' set */
function your_theme_continue_reading_link() {
return ' <a href="'. get_permalink() . '" rel="nofollow">' .
'<span class="meta-nav">→</span> Continue reading</a>';
}
/* Replaces "[...]" (appended to automatically generated excerpts) */
function your_theme_auto_excerpt_more( $more ) {
return ' …' . your_theme_continue_reading_link();
}
add_filter( 'excerpt_more', 'your_theme_auto_excerpt_more' );
Related Posts:
- Adding nofollow to a PHP generated Nav
- PHP Catchable fatal error: Object of class WP_Error could not be converted to string
- What exactly does “Posts page” do in WordPress?
- How do I make my function add variables/values to the $post object?
- Change comments form title on a page by page basis
- Get the title before comma
- “Can’t use function return value in write context” error
- Display 4 chronological posts starting with a random post
- Displaying Only Certain Tags in Loop
- Duplicates with WP_Query loop
- Customized title tag for each page in pagination?
- WordPress automatically adds tags when pasting code, how to stop it?
- ACF: Only get first row of a Repeater Field
- WordPress with php 5.5 and zend opcache
- write custom woocommerce templates and forms
- Using Advanced Custom Fields to create a per page slider
- How can I properly control the numbers and dots that appear in pagination?
- WordPress Search Results for Multiple Post Types
- Using the echo command adds unwanted br tags to source
- Issue adding sub category programmatically
- custom url rewrite for wordpress
- Customizer: Multiple CSS styles on same element in Live Preview
- Commenting out unwated CSS/scripts in HTML with PHP
- WordPress and Conditions
- How to determine if the sidebar is empty? Or not active?
- How to display login form anywhere, when user isn’t logged in, without redirecting?
- Add filter multiple times using only one master function
- Creating sub-categories via php
- Unset session variable on page reload / setup but exclude AJAX
- get_posts works in the page template but not in a shortcode
- Add post with approval by the admin
- How to show an entire post content and not also the excerpt?
- Strip Paragraph Tag
- Send a mail to specific address in a custom field when a new comment is made on a specific post
- Getting different user data depending on where I use variable
- WordPress PHP command and ELSE IF problem
- WordPress produces identical hash all the time
- How to unserialize data from MySQL
- using wp enqueue style to create a CSS file specifically for a page template
- Pass get data from anchor URL [closed]
- The user can only see their own profile
- Hide a div when a custom field is empty
- Shortcode for a Series of Elevating Image Files, Excluding a Range?
- Shortcode won’t execute
- Dynamic CSS through PHP issue
- Fatal Error wp-settings.php on line 119
- How do I custom code the start page?
- what does $options = get_option(‘test_theme’); do?
- Is it possible to isolate and use WordPress functions outside of wordpress
- Remove password protection from all posts
- Testing a Form’s Zipcode Field with Regular Expressions to Determine WordPress Page Behaviour
- Adding a custom meta field with default NULL value which is not selectable
- Custom html/php/jquery map code in WordPress/elementor?
- Prevent header and footer from loading on specific pages with template or plugin
- Get taxonomy terms that share a common object property
- My Custom Post Type AJAX Query is Returning no posts – why?
- Styling a category link
- Woocommerce display orders with products from specific categories to specific admins
- How to exclude meta no index pages from wp_list_pages
- Search bar for wp menu
- require get_template_directory() . ‘path/to-my/file.php’ BREAKS customize > themes functionality
- Yoast Breadcrumbs Inject Multiple Levels
- Remove all feeds and return custom 404 page
- Maximum file Upload
- wp_get_nav_menu_items() with ACF
- How to add custom attribute to all outofstock and all instock products automatically?
- Site infected by link
- Primary navigation menu with timed items from custom post type
- Cannot successfully execute AJAX script to call function.php specific function. Using XAMPP localhost to test
- sessionStorage saves input value in browser but it is not loaded in the form field
- Multiple Arrays for Custom Post Query using Boostrap accordions and ACF repeater fields
- Different Logo for Different Pages
- Deny php execution in /wp-includes – using .htaccess in /wp-includes VS root folder
- WooCommerce – Add Shipping class below each product in Shopping Cart page
- Use fetch_feed(); Totally Outside of WordPress?
- SQL Query Search page
- Unable to get Post Category Name and URL
- Create a dynamic buddupress tab
- RegExp to EXCLUDE strip HTML (FOR SOMME) comments
- Accessing external database: ERR_INCOMPLETE_CHUNKED_ENCODING
- Trying send mail from Theme page
- Would it be possible to route WordPress Through an MVC Application
- How can I put a custom field as the link of a button shortcode?
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- jQuery vs. $ – Creating jQuery scripts in JavaScript in WordPress using External Libraries
- When I use rewind_post() it shows menu items in my loop
- Problem using explode inside add_shortcode() callback funciton [closed]
- WordPress: Create A Widget to Accompany Plugin
- How to post data to a word press site in case of a mobile app
- What languages were used to build WordPress? [closed]
- How to strip/remove all blank spaces at the beginning/end of a search string
- SHARING TO FACEBOOK – FROM DYNAMICALLY GENERATED PAGE
- Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)
- Millennial Media PHP Setup ( Code Integration )
- why is kses removing semicolon from inline style?
- Edit Error Page style
- How to sort wordpress posts by selecting a year from a drop down?
- WooCommerce Checkout Cart [closed]
- How can I use AJAX in child theme template?
- WordPress taxonomy and terms question