WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Sitewide Tags Pages
[resolved] Option for setting the thumbnail size (6 posts)

  1. Jon Breitenbucher
    Member
    Posted 2 years ago #

    I tried my hand at adding an option to allow the user to set the size of the thumbnail pulled by the plugin, but couldn't get it to work. Would it be possible to add an option for thumbnail size? Or can you tell me the best way to alter the size of the thumbnail pulled by the plugin? Thanks.

    http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags/

  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    You need version 0.4.2

    add_filter( 'sitewide_tags_thumb_size', 'my_swt_thumb_size' );
    function my_swt_thumb_size( $size ) {
    return 'your_size';
    }

    if you want to use a custom size across the network

    add_image_size( 'your_size', 300, 200, true );

  3. Jon Breitenbucher
    Member
    Posted 2 years ago #

    Thanks. I figured there would be something to filter. Would the above be going into the main site's functions.php or am I looking at having to maintain a modified version of the plugin?

  4. Jon Breitenbucher
    Member
    Posted 2 years ago #

    I made a simple plugin and enabled it sitewide.

  5. wadams92101
    Member
    Posted 2 years ago #

    Hi Ron & Jon: Could you confirm my understanding of your conversation above?

    add_filter( 'sitewide_tags_thumb_size', 'my_swt_thumb_size' );
    function my_swt_thumb_size( $size ) {
    return 'your_size';
    }

    Add this to the plugin to get an option for thumbnail size?

    `add_image_size( 'your_size', 300, 200, true );'

    This added to SWT will create a consistent thumbnail size across all blogs in the network?

    Jon, you mentioned making a plugin - mind sharing? :-)

  6. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 2 years ago #

    Bill, you have all the code for the plugin. The only thing I didn't do above was put it in a php file.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic