- This topic has 5 replies, 2 voices, and was last updated 6 years, 9 months ago by Tom.
-
AuthorPosts
-
July 24, 2017 at 5:11 pm #354324marianco
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.
July 25, 2017 at 12:47 am #354437TomLead DeveloperLead DeveloperHi 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.
July 25, 2017 at 2:00 am #354473mariancoHi 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.
July 25, 2017 at 7:44 pm #354965TomLead DeveloperLead DeveloperThe 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.
July 25, 2017 at 11:22 pm #355036mariancoThanks Tom.
I appreciate your answers.
Best.July 26, 2017 at 12:48 am #355081TomLead DeveloperLead DeveloperNo problem 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.