Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter sscalifornia

    (@sscalifornia)

    I was able to add a line to the code found on your site here. For anyone that needs it, this is what I did:

    //Post Shortcode
    function be_display_posts_unlink_title( $output, $original_atts, $image, $title, $date, $excerpt, $inner_wrapper, $content, $class ) {
    
    	// Create a new title
    	$title = '<span class="title">' . get_the_title() . '</span> ';
    
    	$image = '<span class="image" href="' . get_permalink() . '">' . get_the_post_thumbnail( get_the_ID(), $image_size ) . '</span> ';
    
    	// Now let's rebuild the output
    	$output = '<' . $inner_wrapper . ' class="' . implode( ' ', $class ) . '">' . $image . $title . $date . $author . $excerpt . $content . '</' . $inner_wrapper . '>';
    
    	// Finally we'll return the modified output
    	return $output;
    }
    add_filter( 'display_posts_shortcode_output', 'be_display_posts_unlink_title', 10, 9 );
    Thread Starter sscalifornia

    (@sscalifornia)

    The code works but now the image size doesn’t.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unlink Featured Image’ is closed to new replies.