Home Forums WoodMart support forum Custom Taxonomy Archive – Woodmart Layout Conditions

Custom Taxonomy Archive – Woodmart Layout Conditions

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #698968

    selqs
    Participant

    Hello,
    I created a custom taxonomy, and it works correctly — I can assign products to it without any problem. However, I want this new taxonomy archive page to use the same layout as my regular product category archives.

    The issue is that in Woodmart Layout / Conditions, my new custom taxonomy does not appear. So I cannot select it as a condition for applying a layout.

    How can I include this custom taxonomy archive inside Woodmart’s layout conditions?
    In short: I want my custom taxonomy archive to use the same layout as product categories.

    Thank you.

    #699122

    Hello,

    WoodMart layout conditions work only with WooCommerce’s default catalog pages, such as the Shop page, product categories, tags, attributes, and search results.

    Custom taxonomies do not appear automatically because the theme has no way of detecting or knowing the names of these custom taxonomies.

    To include your custom taxonomy archive inside WoodMart’s layout conditions, additional custom coding would be required. Unfortunately, this falls outside the scope of our theme support.

    If possible, we recommend using WooCommerce product attributes instead of creating a custom taxonomy, as attributes are fully supported by WoodMart and will work correctly with layout conditions.

    Best Regards,

    #699138

    selqs
    Participant

    Hello,
    first of all, the fact that this detection does not exist or that we cannot select it as custom is a deficiency of the theme; please consider addressing it in your next update.
    While creating the taxonomy definition, I added it inside Woo product, so it should automatically be detected in the layout.
    I have coding knowledge, so could you please provide the hook definition for the layout? I would like to try adding a custom one. Or, if there is another method—for example, copying a template PHP file—please let me know.

    #699247

    Hello,

    Sorry, but there is no option in the theme settings available for that.

    It requires customization, and this is beyond our limitations and support policy.

    Best Regards,

    #699265

    selqs
    Participant

    Hello,

    this issue is caused by the limitations of your theme, but it shouldn’t be this difficult for you to provide a solution or an idea. We did not ask you to change all your code; we only asked for guidance. It seems that your support system works only through screenshots.

    #699462

    Hello,

    We’ve checked this with the developers and they confirmed that Woodmart Layout > Conditions currently does not support selecting custom taxonomies. This is a limitation of the theme, and the team already has it on the list for future improvements.

    However, they can offer a code-based solution that lets you force any layout to be applied to your custom taxonomy archive.

    You can add the following filter to your child theme’s functions.php or via a code-snippet plugin:

    add_filter( 'woodmart_layout_id', function( $layout_id ) {
        // Apply a specific layout when viewing your custom taxonomy archive
        if ( is_tax( 'custom_taxonomy' ) ) {
            return 1234;
            // Replace 1234 with the ID of the layout you want to use
        }
        return $layout_id;
    } );

    Best Regards,

    #699508

    selqs
    Participant

    Hello, we are eagerly waiting for your update. The code you provided works very well and has been useful for my project. The only issue is that the dynamic page title is being pulled from the first product’s title (page title bar). I’m not sure whether this can be adjusted, but for now, thank you — it does the job.

Viewing 7 posts - 1 through 7 (of 7 total)