I like the flexibility of the v2 template design for archive pages. However, I wish I could add html blocks both above and below the listings loop for each category. Currently, I believe that we can only add html either above or below the loop for each category.
As a workaround, I had an idea that I could create text blocks for each category as divi library modules. These library modules can be called in a template as shortcodes. So I should be able to echo shortcodes that display Divi text blocks using conditional php based on the GD category name or slug.
Can you please give me a clue where I’m going wrong. I’m using a php widget to do it. It works fine when I call the divi section shortcode without a condition, just not with the conditional statement. I’m trying to call the slug of each category page.
<?php
if ( is_category( 'napa-valley' )) {
echo do_shortcode('[showmodule id="220026"]');
else if ( is_category( 'sonoma-county' )) {
echo do_shortcode('[showmodule id="220049"]');
?>
The code is getting called in the GD Archive template.