Snippets: Customize the excerpt […] problem


#1

Hi!

Simple question: where exactly do I paste the code shown in the website below?

There is no indication of the file I need to append this modification…

Regards


#2

Hello there,

Thank you for reaching out to us here. That is a PHP function which must be added into the child theme’s functions.php file. If you haven’t yet been running a child theme, you can use Code Snippets plugin.

Regards,
Kharis


#3

Thanks, the plugin worked!

Another question, this snippet doesn’t do what I thought it would as it only works if I don’t insert the read more tag while writting a post (the <!–more–> tag in the text view).

Is there a way to make it work both when the text doesn’t fit and when I do insert a pause myself?

Regards


#4

Hello there,

Please manually append this code:


<a class="moretag" href="http://yoursite.com/link-to-post-details"> Continue reading</a>

if you don’t insert the read more tag.

Then apply the following CSS code through the Simple Custom CSS plugin or child theme’s style.css.

.single .moretag{
  display: none;
}

Regards,
Kharis


#5

Turns out I had to change the Contect/Excerpt options in Customize to get the (more…) to show up when needed (Checking the Show Full Content Display box).

Now it works everywhere but in Perth’s Latest News widget… Is there a way to change this in the widget too? I don’t mind manually adding a more tag in every post in case I turn off the widget’s usage of excerpt…

Regards


#6

You should manually insert the read more link for widget as well.

Regards,
Kharis