- This topic has 26 replies, 5 voices, and was last updated 1 year, 11 months ago by Earl.
-
AuthorPosts
-
May 25, 2022 at 8:10 am #2232401DavidStaffCustomer Support
You’re welcome
May 25, 2022 at 11:46 am #2232603EarlHey Dave,
Added the code, cleared the cache and the excerpt still haunts me.May 25, 2022 at 12:05 pm #2232616YingStaffCustomer SupportI just tested the code, it works fine on my site.
Can you make sure the you are using
'
not’
in your code?And besides the more tag, are you using custom excerpt?
https://wordpress.com/support/excerpts/#create-an-excerptLet me know!
May 25, 2022 at 12:27 pm #2232635Earlthis is the code from my function php file:
<?php
/**
* GeneratePress child theme functions and definitions.
*
* Add your custom PHP in this file.
* Only edit this file if you have direct access to it on your server (to fix errors if they happen).
*/
add_filter( ‘generate_more_tag’, ‘__return_empty_string’ );Just to be clear, I am trying to remove the excerpt from the blog post from being displayed on archive pages. I did just check the page in another browser from the one I’m working in and the excerpt still displays.
May 25, 2022 at 12:36 pm #2232640YingStaffCustomer SupportI did just check the page in another browser from the one I’m working in and the excerpt still displays.
I know, I can see that too. But you didn’t answer my question. Are you using custom excerpt?
The code you pated is not wrapped with the code tag, so I can’t check if the format is correct, so can you wrap the code with the code tag?
https://www.screencast.com/t/FMicVg3blFMay 25, 2022 at 12:41 pm #2232647Earlsorry missed part of your question.
I haven’t added anything custom to the theme.
I did go to the theme customizer -> Layout -> blog -> and set the excerpt work count to ‘0’
May 25, 2022 at 1:13 pm #2232675YingStaffCustomer SupportMy question was are you using the custom expert, can you check if this field is blank in your post editor? Thanks!
Please refer to the first image in the blow article:
https://docs.generatepress.com/article/excerpt-issues/May 25, 2022 at 2:11 pm #2232702EarlSorry for being a knucklehead, now I know what you mean:)
No, nothing is entered at the blog post level for custom excerpts. I do use rank math and I’ve put in a custom description, but it’s pulling from the blog post not the rank math description.
May 25, 2022 at 5:49 pm #2232796Fernando Customer SupportHi Earl,
Also tested the code and it works as expected from my end, can you try checking for any syntax errors in your functions.php file?
The code should be exactly:
add_filter( 'generate_more_tag', '__return_empty_string' );
If that doesn’t work, as a 2nd course for debugging, try removing the code from your functions.php file, and then install a plugin called Code Snippets, and then add the PHP code there.
Lastly, can you also try disabling other plugins temporarily as another course of debugging? Try #1 here: https://docs.generatepress.com/article/debugging-tips/
Kindly let us know how it goes. Hope to hear from you soon!
May 26, 2022 at 5:46 am #2233305EarlGot everything to work this morning!
Big thank you to Dave, Ying and you Fernando for dealing with my shenannigans 🙂
Final question:
I want to do a blogroll on the front page with elements, can you provide a link to do that?Thanks again!
May 26, 2022 at 6:15 am #2233344DavidStaffCustomer SupportGlad to hear that – Would you mind raising a new topic? So we can mark this as resolved 🙂
May 26, 2022 at 8:12 am #2233655EarlWill do, thanks David
-
AuthorPosts
- You must be logged in to reply to this topic.