[Support request] Generatepress and facetwp

Home Forums Support [Support request] Generatepress and facetwp

Home Forums Support Generatepress and facetwp

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #844985

    I’m experiencing some issues with generatepress and facetwp – first of all facetwp requires a wrapping container with the class facetwp-template for the articles otherwise it kind of adds the class to the uppermost container and produces an error message – I guess we basically need a structure like:

    <div class="page-header">...
    <div class="facets">
    <div class="articles facetwp-template">.... wrapper for articles

    another issue I’m experiencing is that on the homepage facetwp doesn’t seem to recognize the main query so the dropdown for categories and tags are empty – maybe this is how to solve this: https://facetwp.com/documentation/developers/querying/facetwp_is_main_query/

    hope somebody can shed some light – thanks

    Lead Developer
    Lead Developer

    Hi there,

    To add a wrapper around the posts, you can create two Hook Elements: https://docs.generatepress.com/article/hooks-element-overview/

    The first would be your opening element, and would be added to the generate_before_main_content hook:

    <div class="facets">

    The second would be your closest element, which would be added to the generate_after_main_content hook:


    Then you can use the Display Rules to choose where this element should be added.

    I’m not sure about the query thing, as GP just uses the standard WP query. Have you checked with FacetWP on this?

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.