- This topic has 32 replies, 2 voices, and was last updated 7 years, 7 months ago by
Leo.
-
AuthorPosts
-
September 1, 2018 at 7:34 pm #666306
Jesus Higuerey
Hello there, I’ve added text to the post, deleted the excerpt and now it seems to be working.
So just to be clear, if I write an excerpt the read more button won’t appear?
September 1, 2018 at 7:36 pm #666308Leo
StaffCustomer SupportIt should be if you have the second block of code added:
https://docs.generatepress.com/article/activating-read-custom-excerpt/September 1, 2018 at 7:38 pm #666312Jesus Higuerey
Well the button is there is just if I write the excerpt it doesn’t appear which makes no sense to me atm
September 1, 2018 at 7:41 pm #666314Leo
StaffCustomer SupportWhen you use the custom excerpt metabox, WordPress assumes that you want the full excerpt to show – hence there isn’t the read more link.
The article I linked will force read more to show even if you are using custom excerpt.
Take a look at the first 2 sentences on that article.
September 1, 2018 at 7:43 pm #666317Jesus Higuerey
Well it doesn’t seem to work then.. I have the code in a snippet since the beginning though …
September 1, 2018 at 7:46 pm #666320Leo
StaffCustomer SupportI can see read more link showing here when you were using the custom excerpt so something is working:
https://gyazo.com/6050e4798a1ae99def6bd45349cfed1cAre you sure you added the second block for the button and not the first block?
https://docs.generatepress.com/article/activating-read-custom-excerpt/September 1, 2018 at 7:59 pm #666328Jesus Higuerey
With that post custom excerpt is not enabled .. It is what I’m trying to say, if I add custom excerpt the button goes away. And yes I have the code you mentioned, I can give you an username and password if you would like to take a look 🙂
September 1, 2018 at 8:25 pm #666332Leo
StaffCustomer SupportCustom excerpt was enabled in the video (aka you were using the excerpt metabox) which is why the options aren’t working in your video and I was seeing different content in single post page:
https://gyazo.com/6050e4798a1ae99def6bd45349cfed1c
https://www.screencast.com/t/B6C8m84E6XiDSeptember 1, 2018 at 8:28 pm #666333Jesus Higuerey
Yeah in the video it was enabled. But you said that even if I have an custom excerpt it should show the button which it doesn’t
September 1, 2018 at 8:31 pm #666334Leo
StaffCustomer SupportIt showed the “Read More” link (by default it shouldn’t show that) which is what the first block of code does, if you add the second block of code then it should be a button:
https://docs.generatepress.com/article/activating-read-custom-excerpt/September 1, 2018 at 8:36 pm #666336Jesus Higuerey
Yeah like I said before, I have the code you mentioned, but I want to be able to create a custom excerpt without the button disappearing.. which is what’s happening right now .. Custom excerpt = button disappears, having the code you mentioned.
September 1, 2018 at 8:38 pm #666338Leo
StaffCustomer SupportCan you write a custom excerpt again?
September 1, 2018 at 8:46 pm #666339Jesus Higuerey
Please check, my excerpt is currently at 20 words, which it now clearly more than that..
September 1, 2018 at 8:48 pm #666341Leo
StaffCustomer SupportRight so now the only problem is that it’s a read more link and not a read more button?
https://www.screencast.com/t/gA8JqJEtLXCan you copy and paste you are using here? be sure to highlight the code and click
<code>September 1, 2018 at 8:52 pm #666342Jesus Higuerey
It doesn’t really matter tbh I actually prefer the link instead of the button, rather fix why the excerpt is so long, it should’ve stopped at 20 words.
add_filter( 'wp_trim_excerpt', 'tu_excerpt_metabox_more' ); function tu_excerpt_metabox_more( $excerpt ) { $output = $excerpt; $settings = wp_parse_args( get_option( 'generate_blog_settings', array() ), generate_blog_get_defaults() ); if ( has_excerpt() ) { $output = sprintf( '%1$s <a href="%2$s">%3$s</a>', $excerpt, get_permalink(), wp_kses_post( $settings['read_more'] ) ); } return $output; } -
AuthorPosts
- The topic ‘Read More not displaying after writing Excerpt.’ is closed to new replies.