i use the plugin WordPress MU Sitewide Tags Pages to pull posts from sub-blogs. text are fine however the feature images cannot be pulled. may anyone help me with this? thanks a lot.
i use the plugin WordPress MU Sitewide Tags Pages to pull posts from sub-blogs. text are fine however the feature images cannot be pulled. may anyone help me with this? thanks a lot.
The featured image does not come through, because they aren't copied to the main blog.
You need to use the custom_fields feature on the SWT options page and and.. thumbnail_html (I think that's it).
my theme use thiss to load the thumbnail:
<?php the_post_image('thumbnail'); ?>
how to integrate with custom field? instead of using the feature image function?
thanks
Try
<?php the_post_image('thumbnail_html'); ?>
and make sure you have the use thumbnail option checked in sitewide tags.
Also, the post thumbnail support is in the development version. You can find the link for that under Other Versions
Im having the same issue. It pulls the text from the posts just fine, but the thumbnails/featured images are not showing up. I am using the Arras theme if you needed to know that.
You have to add a function to the theme to show the thumbnails that are pulled.
I have just tried with several themes to get the thumbnails to work. The other ones dont even use featured images. I created custom fields, thumb, thumbnail, thumbnail_html. But have had no success. Any ideas?
Did you look at the SWT settings page?
Hi and thanks for the help,
Yes I have looked at the settings under Super admin > Sitewide Tags. Include Post Thumbnails has been enabled but the thumbnails still are not showing.
You need to edit your theme or use a theme that uses the WordPress thumbnail functions. See http://wpmututorials.com/plugins/post-thumbnails-for-sitewide-tags/
So have been looking around for solutions and have not been able to find one that works. What I have found out is that the SWT plugin creates at custom field in the post called thumbnail_html. In that field it has the link to the featured image that was added in the sub blog. I guess my theme is then not able to use that custom field and set it as the featured image on the main site.
Is there any way a custom field can be used to set a featured image?
Did you read the post Ron linked to above? It explains how to do that.
Hi,
Yes i read the link that Ron posted above. I am still just learning php so i really don't know where this <?php the_post_thumbnail(); ?> has to go. I tried several spots in the arras theme but cant seem to find a working location.
Any ideas where i have to put it?
Thanks.
Here's the codex page on the WP loop: http://codex.wordpress.org/The_Loop_in_Action
You have to find something similar to that in your theme.
I have read this multiple times, along with the help links here too. I am new to WP and PHP so I need a little help. I am using a WPZOOM theme (CadabraPress). I use the same theme for all blogs, including the main blog, so I assumed it would be seamless.
Looking at the home file, it uses this code to pull the image:
<em>[mod edit: please use pastebin for large code snippets]</em>
Can someone give me a detailed explanation how to fix the image issue?
Thanks for the help.
Per my posts above- to use SWT thumbnails your theme has to use the WP thumbnail feature/functions:
http://wpmututorials.com/plugins/post-thumbnails-for-sitewide-tags/
So, all I have to do is replace the current loop code with <?php the_post_thumbnail(); ?>? I have the "Include Post Thumbnails" enabled in my SWT dashboard. Is that it?
You need to replace your current thumbnail code in the loop with the_post_thumbnail()
The include post thumbnails check box is only to tell SWT to get the post thumbnail html tag and save it with the post in the tags blog. It's the theme's job to output the thumbnail in the content.
Thanks for the help Ron, I got the images to show on the main blog. My theme uses
has_post_thumbnail()
so I replaced it with
the_post_thumbnail()
Now, how do I get the image size to change - it is stuck on 150 x 150. It seems to be set from the timthumb.php file, but I can't fine the line of code that sets it at 150 x 150. Is there anything I can do to change the size?
Never mind. I have decided to not use Sitewide Tags plugin, too much changing of the original code. I guess I'll just manually update the main blog from the other 12 blogs.
Glad you found something that works for you :)
Sorry to bump this, but my problem is sort of related. I know how to get the thumbs easy enough, but on my main site's theme (where I am directing the sub-blog posts to) I have an if else statement that posts a default image if there's no thumb.
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php if (has_post_thumbnail()) {
the_post_thumbnail();
} else {
echo '<img src="'.get_bloginfo("template_url").'/images/nothumb.jpg" alt="Thumbnail" />'; }
?></a>
It won't show the thumbnail like this for the sub-blogs. I've tried writing it out ways, but can't figure anything out. Is there a way to fix this?
has_post_thumbnail() returns false on SWT posts whether or not there is a SWT thumbnail.
Try doing something like
$thumb = get_the_post_thumbnail();
if( $thumb )
....
else
...Ohhh! I had tried something like that, but didn't define it first. This worked perfectly, thanks!
Hey Ron and justarhymes,
sorry to dig up this old post but i believe i have the same issue as justarhymes had, except i dont know how to fix it correctly.
i have this code;
<?php if ( has_post_thumbnail() ) { ?>
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('thumbnail-home', array('title' => get_the_title())); ?></a>
<?php } else { ?>
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/thumbnails/thumbnail-home.jpg" width="290" height="125" alt="<?php the_title_attribute(); ?>" /></a>
It looks alot like justarhymes his code.
how would i put that in with the code ron gave me?
like this? ;
$thumb = get_the_post_thumbnail();
if( $thumb )
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('thumbnail-home', array('title' => get_the_title())); ?></a>
else
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/thumbnails/thumbnail-home.jpg" width="290" height="125" alt="<?php the_title_attribute(); ?>" /></a>
Thanks in advance, would help me out alot if i manage to get this to work.
As I said above
has_post_thumbnail() returns false on SWT posts whether or not there is a SWT thumbnail.
So, with your code you will always get the default thumbnail you have on SWT posts.
The second snippet should work if you include the appropriate braces and openong/closing php tags.
This topic has been closed to new replies.