How to Display "Read More" Links on DIVI Search and Tag Pages
2018-09-18
127 words
1 min read
The Divi template is great, but his founder may also have a philosophy of "don't make the most of it." In some places, I suspect that it is a flaw that he deliberately left behind.
For example, his search and tag pages, why not make a read more links by default.
Go to their forum to find a solution.
Find the index.php file in the divi directory and find 54 lines, change to:
Then upload it to the sub-template directory of divi:
Get it, now the search results and tag page also have a "read more" link.
For example, his search and tag pages, why not make a read more links by default.
Go to their forum to find a solution.
Find the index.php file in the divi directory and find 54 lines, change to:
truncate_post( 270 );
printf( ' <a href="%1$s" class="more-link" >%2$s</a>' , esc_url( get_permalink() ), esc_html__( 'read more', 'et_builder' ) );
Then upload it to the sub-template directory of divi:
scp \path\index.php [email protected]:/home/yourusername
ssh [email protected]
sudo mv index.php /var/www/yourwebsite.com/wp-content/themes/divi-child/
Get it, now the search results and tag page also have a "read more" link.
Related Articles:
- 2018/09/16 How to setup Fullwidth Video Background with DIVI and FFMPEG
- 2018/09/16 21 Wordpress Plugins Activated in My Website
- 2018/09/10 Optimize Wordpress, Nginx and PHP to Reduce Server Response Time
- 2018/09/08 Step-by-step Tutorial Show How to Build a Nice Wordpress Blog with Perfect 100 Score of Google Pagespeed Insights and A Rating of SSL Certificate within 2 Hours
Authored By Jesse Lau
A freelancer living in New Zealand, engaged in website development and program trading. Ever won 1st ranking twice in the Dukascopy Strategy Contest. This article is licensed under a Creative Commons Attribution 4.0 International License.