WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Sitewide tags with thumbnail (20 posts)

  1. kingco
    Member
    Posted 3 years ago #

    Hi, I am still trying to get post thumbnails to appear on the home page while using the Sitewide Tags plugin. Just wondering if anyone has found an effective way to do this until its added into the core of multi-site?

    I found this solution on the old MU foum:

    http://mu.wordpress.org/forums/topic/18095

    I haven't been able to make it work. If anyone has, could they post the full source of the sitewide-tags.php file - it would be much appreciated.

    Thanks in advance.

  2. It won't be added to the core of multisite that I know of.

    the SWT plugin guys are still working on it.

  3. spherical
    Member
    Posted 3 years ago #

    Still, it'd be really great if the OP in that original thread, posted above, could provide code lines before and after the inserted lines and we could take care of it ourselves. The descriptions of where stuff needs to be inserted could be more specific. There's a LOT of if() statements in there; some nested. "at the end of of the if() statement" can be read as "after it is closed the end" or "within at the end". I've tried nine combinations so far and, while no errors, also no thumbnails. Even tried doing a post update with each iteration, so that SWT would refresh.

    Thanks for any clarifications.

  4. kingco
    Member
    Posted 3 years ago #

    Any update on this? It's still a lingering issue on my site http://canadiangolfer.com

    Does anyone know of a way yet for sitewide tags to pull the thumbnail in and show it on the homepage?

    I have been just doing it manually for the past year, adding in the thumnail myself which isn't ideal.

  5. Does anyone know of a way yet for sitewide tags to pull the thumbnail in and show it on the homepage?

    Yes, get the latest version. It has support for it. (might be the dev version, but it's in there)

  6. kingco
    Member
    Posted 3 years ago #

    Great. I'm due for an upgrade anyhow, so, I'll give it a go and report back.

  7. Just fyi, I have used it to pull thumbs on a demo site. ;) I *think* it was the 3.1 beta, but I need to remember which site I tried it on first....

    :D

  8. kingco
    Member
    Posted 3 years ago #

    Just upgraded to 3.0.4 and it doesn't work on that version (so maybe it is included on 3.1).

    Have tried a variety of ways to make this work - and it is just a no-go. I've tried added thumb support to my theme:

    add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size( 150, 150, true );

    Also, my theme uses the get-the-image plugin from Justin Tadlock, can't get that to pass to the front page easier.

    Good thing that it looks like 3.1 is getting close. Fingers crossed its in there :)

    Jeff

  9. 3.1 RC3 is stable enough to use for reals.

  10. No, I meant the beta version of the SWT plugin.

    http://mamacommune.net

    See? I've pulled thumbnails. It took a couple tires to get the size right.

  11. kingco
    Member
    Posted 3 years ago #

    Where do I find the beta version of that plugin?

  12. kingco
    Member
    Posted 3 years ago #

    OK, so that seems to pass the featured image img src into the front page post as a custom field 'thumbnail_html'. Getting closer.

    Is there something you added to home.php to make it display? It doesn't seem to display automagically.

  13. kingco
    Member
    Posted 3 years ago #

    Would you need to add something like this to make the thumbs appear, or should they display automatically (meaning, maybe I have an issue with my theme)?

    <?php echo get_post_meta($post->ID, “thumbnail_html”, $single = true); ?>

    Just can't seem to get it to display?

  14. It's likely something to do with your theme.

    I haven't done it with every theme out there. ;)

    Since it's being passed as a custom field, you may need to adjust the theme so it displays the value of that custom field. ;) So yeah. you need to add a function like the one you tried above, tinkering until it works right.

  15. kingco
    Member
    Posted 3 years ago #

    Seems to be some debate whether this is a plugin issue, or a theme issue. Anyhow, I'm on hybrid and just thought I'd share the support thread over there for others seeking a solution.

    http://themehybrid.com/support/topic/display-a-custom-field-thumbnail-featured-image?replies=5#post-51950

  16. It;s a combo of both - the way SWT doesn't really pull the images, and the way the theme displays it.

    Yes, writing a small function to handle it usually gets the results you want. tho that functions may be slightly different for every theme.

    (In other words, my usual "it depends")

  17. lameian
    Member
    Posted 3 years ago #

    I tried to put this code to my theme, it works.
    <?php echo get_post_meta( $post->ID, 'thumbnail_html', true ); ?>

    what i input in the custom field 'thumbnail_html' :
    <img src="http://www.imagelink.jpg" />

    however. does this mean, the 'set featured image' function cannot be used?
    we have to use the custom field only?

  18. Only on the main site.

  19. kingco
    Member
    Posted 3 years ago #

    This seems to be working for me. Checks to see if thumbnail_html exists first and adds a class for styling.

    <?php if ( get_post_meta($post->ID, 'thumbnail_html', true) ) { ?>
    <div class="thumbnail thumbnail "><?php echo get_post_meta($post->ID, 'thumbnail_html', $single = true); ?></div>
    <?php } ?>

    Thanks all for your help on this.

Topic Closed

This topic has been closed to new replies.

About this Topic