[Resolved] custom taxonomy for images

Home Forums Support [Resolved] custom taxonomy for images

Home Forums Support custom taxonomy for images

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #2376502
    Ernst Wilhelm

    Perhaps I am wrong but generatepress hooking functionality does not provide access to custom taxonomies.

    #2376528
    David
    Staff
    Customer Support

    Have you created an archive template or a content template for the attachments ?
    If you have not then it will use the themes index or archive.php – so the hooks should be there.

    #2376535
    Ernst Wilhelm

    nope. Give me some time. I’ll copy the archive.php to my child theme directory.

    #2376545
    Ernst Wilhelm

    The hooks are there, I am thinking about the display rules. I want apply the modification only custom taxonomy archives, right??

    #2376547
    David
    Staff
    Customer Support

    Yeah you won’t need to make your own custom archive.
    You can add the condition to your PHP eg.

    
    <?php
    if (is_tax('attachment_category') {
        echo wp_get_attachment_image( $post->ID, 'thumbnail' );
    }
    ?>

    And the Hook Elements Display Rules you can then set to the Entire site.

    #2376567
    Ernst Wilhelm

    Better but…

    Let’s call it a day. I’ll come back to you in a few days.

    Thank you so much for your input.

    #2377070
    David
    Staff
    Customer Support

    You’re welcome – let us know how you get on

    #2416791
    Ernst Wilhelm

    Hi.

    Many thanks for your help here. For now I am closing this ticket. Other points are more interesting to me.

    #2416828
    David
    Staff
    Customer Support

    You’re welcome

Viewing 9 posts - 16 through 24 (of 24 total)
  • You must be logged in to reply to this topic.