[Resolved] Completely Custom Category Page

Home Forums Support [Resolved] Completely Custom Category Page

Home Forums Support Completely Custom Category Page

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #2545817
    Marc

    I’m a bit lost. I’m trying to make completely custom category pages. Other posts on this topic refer more to content template blocks, but that’s not really what I’m after. Not only do I want the posts loop, but I need to add custom content to the page. Is there a way to do with with the elements features of GP Pro? I also have GP Blocks.

    As a workaround, I’m currently using static pages with query loops to get the posts which works fine. But the category links in the post meta obviously still points to the native WP cat page. I can write a function to point it to my custom page, but I’d rather not do that. I’d like to achieve this functionality with GP elements if possible.

    Thank you!

    #2546358
    David
    Staff
    Customer Support

    Hi there,

    when it comes to adding custom content to an archive page, there are two main methods that could be used, and this comes down to how and where that custom content is saved.

    Option 1 – Static Content.
    This is akin to what you’re doing today, but instead of creating a Page for each Category Term, you would create a separate Block Element – Loop Template for each term.

    1. Appearance > Elements -> Add New –> Block Element.
    2. Select the Element Type -> Loop Template
    3. Set the Display Rules -> Location –> Category Archive —> The Specific Term.
    4. In The editor you can now add your content.
    4.1 The content should include a GB Query Loop Block that you can set to Inherit Query from Template or set the Params manually to match your term.
    5. Publish that.
    6. Repeat the above for every term.

    Option 2 – Dynamic
    The Custom Content would need to be stored in term meta Custom Fields which is then managed from the Category term edit page. That would need custom development or a plugin like ACF or Metabox.
    Then you could do the above with just 1 loop element, that uses GenerateBlocks Dynamic data, or in some cases a shortcode to add custom content dynamically to the element.

    If you are ok maintaining static pages today, then you may want to use option 1, and not bother with the custom field route of option 2.

    Let me know

    #2546747
    Marc

    Thanks, David. From a practical standpoint, what’s the difference between using a custom page with query loops vs Block Element – Loop Template? Both require a manual query loop setup, right?

    #2547326
    David
    Staff
    Customer Support

    custom page with query loops vs Block Element – Loop Template
    For option 1 – not a lot of difference.
    Both require you to create a “post” be that a page or an element for each individual term.
    The Loop Element has benefits as it “replaces” the themes archive.php template so:
    1. it will be automatically linked to by post meta terms without redirects.
    2. it doesn’t require the request filter function to work

    #2547754
    Marc

    Got it, thanks.

    #2548302
    David
    Staff
    Customer Support

    You’re welcome

    #2600777
    Kyle

    YES. This finally solved what I was trying to do.

    David, As I’m building out my site I have come to look for your face and try out your answers first. I’m guessing you’re helping more people than you even think.

    Several of your custom shortcodes for other people have come in handy for me as well.

    Thanks for the quality answers.

    #2600934
    David
    Staff
    Customer Support

    Hi Kyle,

    thank you for the kind words it is much appreciated, and i am glad to hear this 🙂

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