Archived topic
Is it possible to make GP to ignore "more tag"?
4 replies · Started by Andrei on April 21, 2019
This is follow up question to my earlier problem - https://generatepress.com/forums/topic/block-archive-view-always-shows-first-picture-from-the-post-along-with-feature/
Removing "more tag" does solve the problem... unfortunately, my site has more than 300 posts and it am really not looking forward editing every single one of them :(
Is there way to instruct GP to ignore "more tag"?
Cheers,
Andrei
Hi there,
Try this function:
add_filter( 'generate_more_tag', '__return_false' );
Let me know :)
Hi Tom,
Thanks for quick reply.
Your suggestion worked beautifully (maybe one day you can make this a configurable option?).
For future references:
I have edited two files:
- index.php (we are using "list of recent posts" as an index page)
- archive.php
In both cases I have added
add_filter( 'generate_more_tag', '__return_false' );
just before
get_header(); ?>
line at the top of the file.
Sorry, forget to mark as resolved.
Instead of adding that to those files, you can add it using one of these methods: https://docs.generatepress.com/article/adding-php/
Glad I could help! :)