-
AuthorPosts
-
December 11, 2025 at 5:07 am #1492379
Hi, I’ve read 5+ old threads about adding HTML capabilities to the portfolio excerpt, but none of them work (possibly because the code isn’t relevant anymore).
I would like to add bullets to all of my portfolio excerpts so that my masonry gallery on the homepage shows a bulleted list under each title — alternatively, if I can display the preview text which already allows HTML instead of the excerpt that would be an option as well.
I manually added a bullet symbol (•) in front of each line item since
- xxxx
wasn’t working, but it doesn’t display correctly when the text takes up 2 lines.
December 11, 2025 at 9:26 am #1492392December 11, 2025 at 10:17 am #1492402on masonry – try:
function my_avf_masonry_loop_entry_content($loop_excerpt, $entry) { $loop_excerpt = $entry->post_excerpt; return $loop_excerpt; } add_filter('avf_masonry_loop_entry_content', 'my_avf_masonry_loop_entry_content', 10, 2);or maybe a bit stricter what is allowed (or better which is not influenced by strip_tags)
function my_avf_masonry_loop_entry_content($loop_excerpt, $entry) { $loop_excerpt = strip_tags( ($entry->post_excerpt) , '<br><p><ul><li>' ); return $loop_excerpt; } add_filter('avf_masonry_loop_entry_content', 'my_avf_masonry_loop_entry_content', 10, 2);the point is that on the class-avia-masonry.php (or legacy inside: av-helper-masonry.php) the loop-excerpt is set to :
$loop_excerpt = strip_tags( $entry->post_excerpt );December 11, 2025 at 1:14 pm #1492414Unfortunately, WordPress is very stubborn when it comes to automatically setting br tags. You could use the following in the excerpts:
<strong>Validation & Calibration</strong> <ul> <li>Supply and exhaust air volumes</li> <li>Room pressure differential</li> <li>Pressure gauges and monitors</li> <li>Air changes per hour</li> <li>Incubators and scales</li> <li>Refrigerators and freezers</li> </ul>All my attempts to remove these automatic br tags failed. So you could just use it like this:
<strong>Validation & Calibration</strong><ul><li>Supply and exhaust air volumes</li><li>Room pressure differential</li><li>Pressure gauges and monitors</li><li>Air changes per hour</li><li>Incubators and scales</li><li>Refrigerators and freezers</li></ul>see on “listpoints” post : https://webers-testseite.de/masonry-blog/
December 11, 2025 at 6:47 pm #1492429Hi Ismael, sorry I called it the wrong thing. You are correct, I am using the masonry gallery for the portfolio entries. What’s currently on the homepage is accurate. This is a staging site so don’t worry about messing with anything. The bullets that you show in your screenshot are a result of the symbols I entered in the excerpt since the html tags weren’t working
(screenshot: https://imgur.com/a/iUmI9pS)
Hi Guenni007, yes that’s what I had already attempted to do but it wasn’t working so that’s why I created the ticket. Thank you though!-
This reply was modified 1 day, 23 hours ago by
sjahan.
December 11, 2025 at 10:13 pm #1492434and you have inserted that snippet to your child-theme functions.php:
function my_avf_masonry_loop_entry_content($loop_excerpt, $entry) { $loop_excerpt = strip_tags( ($entry->post_excerpt) , '<br><p><ul><li>' ); return $loop_excerpt; } add_filter('avf_masonry_loop_entry_content', 'my_avf_masonry_loop_entry_content', 10, 2);But why does it work on my test page? And not on yours?
PS
you do not need the bullits on a ul li elemtent – it is allready there.PPS: where can i see the page you belong to. on https://aabc.com ?
You now like not to use the masonry portfolio ?
-
This reply was modified 1 day, 19 hours ago by
Guenni007.
December 12, 2025 at 8:24 am #1492452Hi,
Thank you for the upate.
The suggested snippets above should work. Please try adding this filter again in the functions.php file to retrieve the post excerpt without stripping the html tags.
add_filter( 'avf_masonry_loop_entry_content', 'avf_masonry_loop_entry_content_mod', 10, 4 ); function avf_masonry_loop_entry_content_mod( $loop_excerpt, $entry, $entries, $key ) { if ( ! empty( $entry->post_excerpt ) ) { return $entry->post_excerpt; } return $entry->post_content; }If this is not working, try this:
add_filter( 'avf_masonry_entry_content', 'avf_masonry_entry_content_mod', 10, 3 ); function avf_masonry_entry_content_mod( $content, $entry, $config ) { return $entry->post_excerpt; }Best regards,
IsmaelDecember 12, 2025 at 7:23 pm #1492469None of those codes work for me unfortunately. One of the codes just added extra spacing between the line items.
The bullets that are displaying are only there because I manually added them in as text thinking that could be my workaround since the code wasn’t working, but it doesn’t look great when the text uses up 2 lines vs 1. (Sample:
- • Room Pressure Differential
)
For testing purposes I removed them from the “Certification” portfolio item. Ismael, would you be able to login and see if I’m doing something wrong? I’ve tried all the codes you and Guenni007 provided (1 at a time of course vs incorporating all of them).
December 13, 2025 at 4:57 pm #1492486 -
AuthorPosts
- You must be logged in to reply to this topic.



