Hi! I have an immediate need to change the interior pages of my blog
http://austinlivesoutdoors.com/blog
The most important is to feature a YouTube video on a post.
Secondly, I would like to feature thumbnail images in the featured photo space, rather than open in a new page. Is this possible?
Please advise! I need this completed by first thing tomorrow morning.
Pippin Williamson answers:
This plugin will take care of your youtube needs:
http://wordpress.org/extend/plugins/smart-youtube/installation/
It's really not very clear what you want in terms of the thumbnails. Can you elaborate?
Allie H comments:
When you are on an interior blog post, like http://austinlivesoutdoors.com/blog/bear-creek-curves/ , and you click on the thumbnail image, the the picture shows up on a new page (http://austinlivesoutdoors.com/blog/bear-creek-curves/olympus-digital-camera-4/)
I would like this image to be the featured image on the same blog post page, rather than take visitors to a new page.
Pippin Williamson comments:
Fancy Box for Wordpress should do the trick just right.
http://wordpress.org/extend/plugins/fancybox-for-wordpress/
It's a simple little plugin that will make the images "pop up" in a nice jquery box.
Pippin Williamson comments:
All you do is install it, click activate, and it does all the magic for you.
Pippin Williamson comments:
If for any reason it doesn't work right away, make sure that you choose "Link to image (or file)" when inserting an image into a post.
Allie H comments:
That worked! Thank you so much. One quick last question/issue and then you are definitely the "winner"...
While the video plugin worked, look at what happened in the post since i needed an image there. http://austinlivesoutdoors.com/blog/post-3/
any solutions?
Pippin Williamson comments:
Do this:
First, add a new category to your blog called "videos",
Then add this CSS to your theme's style.css:
<code>
.s-category-videos .full-photo {
display: none;
}
Pippin Williamson comments:
</code>
Every post that contains a video should then be filed under "videos".
Allie H comments:
will that make it so that no image appears on the homepage or will the youtube image appear there?
Pippin Williamson comments:
It will hide the image from the post page, but not the homepage. To show the video on the homepage, in place of the image, you'd have to do some serious modification to your theme.
Pippin Williamson comments:
The image on the homepage would link directly to the video
Buzu B answers:
You can add youtube videos through wordpress WYSIWYG editor interface. The second request looks like it needs a bit of modification. Can you explain a bit more about that second request? I don't quite understand what it is you want.
Allie H comments:
When you are on an interior blog post, like http://austinlivesoutdoors.com/blog/bear-creek-curves/ , and you click on the thumbnail image, the the picture shows up on a new page (http://austinlivesoutdoors.com/blog/bear-creek-curves/olympus-digital-camera-4/)
I would like this image to be the featured image on the same blog post page, rather than take visitors to a new page.
Buzu B comments:
OK, I can do that. I just need to access to your wordpress admin area and to your server via FTP. You can send me a private message with the info if you want me to do it.
West Coast Design Co. answers:
Hi Allie,
I highly recommend [[LINK href="http://vimeo.com"]]Vimeo[[/LINK]] over Youtube for both performance and aesthetics!
You can easily add videos when editing your Wordpress posts or pages.
As for showcasing them on the homepage, did you need help querying a particular page or post?
Allie H comments:
to clarify the second request, When you are on an interior blog post, like http://austinlivesoutdoors.com/blog/bear-creek-curves/ , and you click on the thumbnail image, the the picture shows up on a new page (http://austinlivesoutdoors.com/blog/bear-creek-curves/olympus-digital-camera-4/)
I would like this image to be the featured image on the same blog post page, rather than take visitors to a new page.
Deepak Thomas answers:
Here's a quick solution that would work perfect for you:
For having youtube in your posts, make use of a plugin like Smart YouTube
http://wordpress.org/extend/plugins/search.php?q=youtube
For thumbnail images being in the featured photos space:
Add this to your functions.php
function getImageURL($post)
{
$images = get_children( array(
'post_parent' => $post->ID,
'post_status' => 'inherit',
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => 'ASC',
'orderby' => 'menu_order'));
if ($images) {
$count = 1;
foreach ( $images as $id => $image ) {
if( $count === 1 ) {$imageSource = wp_get_attachment_url( $image->ID );}
$count++;}}
return $imageSource;
}
What the above code does is - It fetches the first image attachment from your post.
Now, find the code where your featured posts are being fetched and add the following <strong>(within the loop) </strong> and add :
<img src="<?=getImageURL($post);?>" alt='' height="100" width="80" />
Sidd answers:
HI Allie,
I see that your thumbnail problem is already solved -- thumbnails are already showing up on the same page with "fancybox" like on this page http://austinlivesoutdoors.com/blog/bear-creek-curves/
Now
Deactivate any plugins for video, like the smart youtube plugin.
To add a youtube or vimeo video you don't need a plugin.
Get the embed code from the video page whether youtube.com or vimeo.com and paste it in the HTML Mode View Window.
That's all and you are done.
See attached image.