Support » Plugin: Display Posts - Easy lists, grids, navigation, and more » Add “$category_display_text” to filter?

  • Hello –

    I noticed the post $output generated on line 492 puts $category_display_text before the excerpt and content. But sometimes, I’d like to display the category after the excerpt (e.g. like in a post footer/entry-meta).

    So I’m using the “display_posts_shortcode_output” filter to switch the output around, and have the category after the excerpt. But the filter currently is not passed the $category_display_text, even though it is passed almost all of the other components used to generate the post output on line 492 ($author being the other exception).

    Of course, I am still able to re-generate the $category_display_text again in my callback function (since $original_atts is passed), or I can also use preg_match to strip it out of the $output that’s passed by the filter, and then re-arrange as needed.

    But I’m wondering, as an enhancement idea, how about adjusting the plugin to simply add $category_display_text (and I suppose also $author) to the list of parameters being passed by the “display_posts_shortcode_output” filter? That way, for completeness, all the post $output components from line 492 would be passed, making it easier to modify or re-construct the $output as needed when using the filter.

    Thanks so much for your plugin, it’s amazingly great, enormously helpful and beautifully conceived and written – quite simply a masterful piece of code.

  • The topic ‘Add “$category_display_text” to filter?’ is closed to new replies.