Forum Replies Created
-
AuthorPosts
-
February 11, 2020 at 2:42 pm in reply to: Keep text formatting in Archive post content excerpt #496657
patgilmour
MemberHere's the solution:
add_filter('get_the_content_limit_allowedtags', 'childtheme_custom_allowedtags'); function childtheme_custom_allowedtags() { return '<em>'; // add whatever tags you want to this string, <b>, <strong>, etc. }
I found the solution here: https://pixert.com/blog/enable-formatting-tags-for-content-limit-in-genesis-featured-posts-widget/
February 10, 2020 at 9:06 pm in reply to: Keep text formatting in Archive post content excerpt #496629patgilmour
MemberAnyone?
February 8, 2020 at 5:00 pm in reply to: Keep text formatting in Archive post content excerpt #496571patgilmour
MemberLooks like my question could be rephrased:
- How can I preserve text formatting for content in
genesis_entry_content
on the archive page?February 8, 2020 at 4:38 pm in reply to: Keep text formatting in Archive post content excerpt #496570patgilmour
MemberI thought this was a Genesis/theme question, but it appears to be a general WordPress question instead.
I tried to resolve the issue with this plugin: https://wordpress.org/plugins/advanced-excerpt/
But it doesn't work with Genesis it seems.
Any other ideas?
patgilmour
MemberMy bad.
I was using
the_title()
instead ofget_the_title()
so my theme was echoing the title into the page atgenesis_entry_content
– where I was calling my function.patgilmour
MemberThanks for getting back to me, Andrea. Unfortunately, I can't make the site public until the end of the month. Would it help to post the page source – or anything else?
patgilmour
MemberI did try modifying the code found on Sridhar Katakam's page:
Display full content in category pages for selected categories in Genesis
Like so:
add_action( 'genesis_before_loop', 'adam_search_result_filter' ); function adam_search_result_filter() { global $post; if ( ( is_search() ) && ( get_post_type( $post ) == 'webcast' ) ) { remove_action( 'genesis_entry_content', 'genesis_do_post_content' ); add_action( 'genesis_entry_content', 'adam_do_search_content' ); } } function adam_do_search_content() { echo get_the_excerpt() . 'bingo'; }
But this removed the
genesis_entry_content
for every result listed.So, I guess
genesis_before_loop
isn't the right filter. Any suggestions what to use? -
AuthorPosts