Filter to disable post link on thumbnails in archives

Community Forums Forums General Discussion Filter to disable post link on thumbnails in archives

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  cehwitham 12 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #24020

    emzo
    Participant
    Post count: 5

    One for the Genesis dev team. Would it be possible to have a filter to disable the post link around thumbnail images on archive pages? It’s already possible to do this for the post titles by doing:

    add_filter( 'genesis_link_post_title', '__return_false' );

    Would be nice to have something similar for the post thumbnails. Maybe add it to the `genesis_do_post_image()` function like so:

    function genesis_do_post_image() {
      if ( ! is_singular() && genesis_get_option( 'content_archive_thumbnail' ) ) {
        $img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'alignleft post-image' ) ) );
        if( ! empty( $img ) ) {
          if ( apply_filters( 'genesis_link_post_image', true ) )
            printf( '%s', get_permalink(), the_title_attribute( 'echo=0' ), $img );
          else
            echo $img;
        }
      }
    }

    #37585

    cehwitham
    Participant
    Post count: 396

    Hi Emzo,

    Have you submitted a support ticket for this? Might be better for getting a response from the developers rather than asking in the community forum.

    Chris


    Twitter: cehwitham Web: cehwitham.com

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

You must be logged in to reply to this topic.