Support » Plugin: Network Latest Posts » [Plugin: Network Latest Posts] diffrent size for thumbnails

  • Resolved sergeyzimin

    (@sergeyzimin)


    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    You need to add:
    _____________________________________________________

    function network_latest_posts_shortcode($atts){
        // Constructor
        extract(shortcode_atts(array(
            'title' => null,
            'number' => '10',
            'days' => '0',
            'titleonly' => true,
            'wrapo' => null,
            'wrapc' => null,
            'blogid' => 'null',
            'thumbnail' => false,
            'cpt' => 'post',
            'ignore_blog' => 'null',
            'cat' => 'null',
            'tag' => 'null',
            'paginate' => false,
            'excerpt_length' => 'null',
            'display_root' => false,
            'auto_excerpt' => false,
            'full_meta' => false,
             <strong>'size' => 'thumbnail'</strong>
        ), $atts));
        // Avoid direct output to control the display position
        ob_start();
        // Check if we have set a title
        if( !empty( $title ) ) { echo "<div class='network-latest-posts-sectitle'><h1>".$title."</h1></div>"; }
        // Get the posts
    ___________________________________________________________________
    network_latest_posts($number,$days,$titleonly,$wrapo,$wrapc,$blogid,$thumbnail,$cpt,$ignore_blog,$cat,$tag,$paginate,$excerpt_length,$display_root,$auto_excerpt,$full_meta, <strong>$size</strong>);
    ____________________________________________________________________
    
    $blogdetails = get_blog_details( $blog_id );
    <strong>$size=explode('X',$size);</strong>
    $thumbcode = str_replace( $current_blog->domain . $current_blog->path, $blogdetails->domain . $blogdetails->path, get_the_post_thumbnail( $post_id, $size, $attrs ) );
    ____________________________________________________________

    and now you can use additional attribute in short code size=’100X100

    http://wordpress.org/extend/plugins/network-latest-posts/

Viewing 1 replies (of 1 total)
  • Plugin Author Jose Luis SAYAGO

    (@iluminatus)

    Hello Sergey,

    It’s funny, I’m reading this after applying the same idea into the version 3. I added the parameter thumbnail_wh where you can specify the width & height in that form (100×100).

    Thanks for your messages and feedback.

    Cheers.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Network Latest Posts] diffrent size for thumbnails’ is closed to new replies.