开发者 | teckel |
---|---|
更新时间 | 2023年2月26日 06:48 |
捐献地址: | 去捐款 |
PHP版本: | 2.9.0 及以上 |
WordPress版本: | 6.2 |
版权: | GPLv3 or later |
版权网址: | 版权信息 |
In the WordPress Settings menu, select the Read More Excerpt submenu, where you can modify the default Read More text link.
WordPress defaults to an excerpt length of 55 words. You can change this from the WordPress Settings menu, select the Read More Excerpt submenu where you can modify the excerpt word length.
Normally, WordPress doesn't show a read more ellipsis if an excerpt is entered as part of the post. Also, WordPress doesn't show the read more ellipsis if a read more tag is placed in the content before the set excerpt legnth (defaults to 55 words). To change this, from the WordPress Settings menu, select the Read More Excerpt submenu where you can active the Show More Frequently option. This will force the Read More to show whenever there's post content.
Here's a suggestion: a.read-more-link { font-size: 0.9em; text-transform: uppercase; display: inline-block; white-space: nowrap; } a.read-more-link:before { content: "("; } a.read-more-link:after { content: ")"; }
There's also some over-zealous themes that re-write complete sections of WordPress code for no good reason. Elegant Themes is a good example of a theme company that makes highly bloated themes that re-write much of the WordPress normal operation. Basically, some themes totally ignore the perfectly working WordPress auto-excerpt and create their own. When themes do this, the Read More Excerpt plugin is ignored as the theme no longer calls the standard WordPress excerpt functions (which Read More Excerpt is hooked into). Other than making modifications to your theme, there's nothing any plugin can do when themes don't use the WordPress hooks and hard-code new functionality instead.
This is rare, but can happen when a theme is not strictly calling the get_the_excerpt() function but doing something with the result (like stripping HTML tags). If you know how to create a child of your template and make slight modifications to that child you can easily correct this. Start by looking at the theme's archive.php file and following any get_template_part() calls from there. It's best to not make changes directly to an off the shelf theme, as updates will override any changes you make. Creating a child theme is a better method of making changes to an off the shelf theme.