How to Display “Read More” Links on DIVI Search and Tag Pages

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:

 
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.

 

Comments

Jesse Lau · @jesselaunz

Let's connect

Long-form on the blog, videos on YouTube, daily notes on 𝕏 — one person, one thread.