[Support request] Issue with display rules

Home Forums Support Issue with display rules

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1447811
    Fabien

    Hi,

    I believe there is a small issue when using Elements and the display rules.

    Let’s say you have a CPT : Product – You don’t want an archive page for this CPT (cf. has_archive = false)
    Then you attach a Custom Taxonomy : product_cat

    –> You are unable to find the archive for the custom taxonomy in the display rules. In order to see it, you need to change has_archive to true for the CPT. But it doesn’t make sense as you can have has_archive = false for the CPT but you still have archive for the custom tax.

    Let me know if you have any questions,

    Fabien

    #1447934
    David
    Staff
    Customer Support

    Hi there,

    Thats correct – Display Rules will only show archives that exist. Without an archive there is no template to tag. You should still be able to target the Single CPT Category though.

    #1450320
    Fabien

    Nope, it didn’t work, there was no option to target my tax archive (cf. is_tax()) that is existing… I needed to enable the archive at the CPT level to be able to target the tax archive.

    #1450461
    Tom
    Lead Developer
    Lead Developer

    I’m not sure if this is how archives in CPTs/custom taxonomies work.

    If you set has_archive to false for the CPT, are you able to load the taxonomy archive that’s attached to that CPT on the frontend?

    #1450564
    Fabien

    Yes definitely (exemple in the private information, the CPT has_archive set to false, the page you see is an archive of the custom tax attached to the CPT).

    #1450816
    David
    Staff
    Customer Support

    That is using the default post category taxonomy and arhive.
    So for the example given you could use:

    Single Post: Post Category > Banque Pro
    Archive: Post Category Archive > Banque Pro

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