[Resolved] Customizing the Post Archive and Category Archive Pages

Home Forums Support [Resolved] Customizing the Post Archive and Category Archive Pages

Home Forums Support Customizing the Post Archive and Category Archive Pages

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #354324
    marianco

    Hi Tom,

    I wonder if there is a way or a hook available that allows you to disable displaying the contents of the Post Archive and Category Pages and replace them with your own content – or shortcode.

    Something like:

    add_action( 'generate_after_archive_description','romeo_archive_shortcode_function' ); 
    function romeo_archive_shortcode_function() { ?> 
        echo do_shortcode("[elementor-template id="4734"]");
    <?php }

    Plus the ability to hide the current existing content.

    The reason is that I would like to be able to customize the content of these pages using a page builder like Elementor. But they are not normally accessible. Currently, Generate Presses Post Archive/Category pages need a lot of work look good and I want to style them more easily with a page builder.

    The Beaver Themer plugin lists Generate Press as a compatible theme that has the built-in hooks that allows them to replace the content of the post archive pages and expose them for customization using Beaver Builder.

    It would be nice to see Generate Press be able to provide this without having to use the Beaver Themer Plugin.

    #354437
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    It’s not very easy to do, but I believe Anywhere Elementor Pro might be worth looking at.

    Otherwise, you would need to create custom template files for each specific category, and add your specific Elementor template shortcode with the ID in the template instead of the function that displays the regular loop/content.

    #354473
    marianco

    Hi Tom,

    Thanks for the reply. Sorry to learn it isn’t easy to do. I racked my non-developer brain trying to learn how to do this.

    Generally, nearly every theme I have seen doesn’t allow you to customize the structure of the category archive pages. The only theme I know that allows this is the Extra Theme from Elegant Themes. They built a category builder within the theme which doesn’t exist even in their Divi theme.

    The next best solution then is to use the Beaver Themer plugin. This plugin hacks Generate Press and multiple other themes to make customization of category archive pages possible with at least the Beaver Builder page builder – as well as other usually non-customizable theme pages.

    Apparently the coding of Generate Press’s archive.php page is standardized enough for them to add this feature to Generate Press.

    It is expensive, however, a plugin at $150 a year. And it only works with Beaver Builder. So Elementor is out of luck.

    #354965
    Tom
    Lead Developer
    Lead Developer

    The reason this isn’t done more often is there’s no solid way to do it while adhering to WordPress coding standards.

    In general, you should always try your best to use the standard WordPress loop when it comes to displays posts, and try to design them to fit using theme options/CSS.

    #355036
    marianco

    Thanks Tom.
    I appreciate your answers.
    Best.

    #355081
    Tom
    Lead Developer
    Lead Developer

    No problem 🙂

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