• Hello I have a feature request

    How about me being able to filter (or query) fo posts, that have a blank excerpt? The excerpt should be blank.

Viewing 1 replies (of 1 total)
  • Plugin Author Code Amp

    (@codeamp)

    Hey @desbest

    I’m just getting back on top of things after the Christmas break

    Regarding this feature request, I’m not entirely sure how we would go about programming something like this in our plugin.

    We create our posts lists using WordPress standards (WP_Query), and there isn’t a great mechanism for creating a query/condition like this.

    If you are comfortable doing a small amount of custom coding, I would like to suggest and alternative approach, the outline would be something like this:

    1. When saving a post, detect if there is an excerpt or not, and add a custom field value to signify this – this can be done using the save_post hook and the update_post_meta function.
    2. Then you can modify your layout query, to show only posts with this custom field value using our query_args filter here – https://customlayouts.com/documentation/action-filter-reference/

    This would achieve the effect that you desire, but of course requires some PHP coding knowledge.

    If you are happy to do the above coding, I can explain in a little more detail the steps to achieve this but I won’t be able to write the code for you.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘How do I query posts that have a blank excerpt? (Feature request)’ is closed to new replies.