• Resolved MrDaniel90

    (@mrdaniel90)


    [Moderator Note: Topic title modified. When you start a new topic, use a good topic title. “thumb” is not a good topic title.]

    Hi.
    It is possible to show images and play youtube videos directly on homepage? Now if I add img or video I have on homepage that images “mysite.com/wp/wp-content/themes/hueman/img/thumb-medium.png”. I want do do site like failblog.cheezburger.com where you can watch images and videos directly on homepage, without click on each for open whole article just for watch img or vid.
    Im going to add only images and videos with small text describing it.
    I hope you understand me because my english is not very well ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi there! Please put a bit more descriptive thread title so others can find these easier ?? (If any mod sees this, feel free to edit it)

    In content.php, just do this:

    Locate this:

    <div class="post-thumbnail">

    Add this right above:

    <?php if ( has_post_format( 'video' ) ): ?>
    	<?php get_template_part('inc/post-formats'); ?>
    <?php else : ?>

    Locate this:

    </div><!--/.post-thumbnail-->

    Add this right below:

    <?php endif; ?>

    And viola! Works.

    Here is the complete content.php for those who just want to pop it in their child themes: https://pastebin.com/vuhnazZY

    Add this to your CSS too if you wish to have same margin as the thumbs to bottom:

    .post-format { margin-bottom: 1em; }
    .single .post-format { margin-bottom: 2em; }

    /inc/featured.php can be edited in the exact same way, and it will work to have videos directly in the featured spot or the slider.

    Hi this works for video! That’s great. But I can’t figure out how to make it work for images. I would like for the image to appear on the blog home page, not a huge thumbnail. I tried duplicating this code and replacing the word ‘video’ with the word ‘image’ but it doesn’t work.

    Maybe there is something I don’t have set up correctly in the theme options, but currently I cannot make an image appear on the blog home page/feed. All that appears is a huge thumbnail of a gray camera.

    Hi,

    Love your theme Alexander, but this modification still doesn’t show the video on the homepage.

    You can check it out here: https://bit.ly/1mnzl8O

    Thanks,

    Sahil

    So I put in a script inside your if condition to see if it actually enters that condition, but seems like it doesn’t, even though the post type is set to ‘video’…

    My apologies.
    It worked.
    I had to edit the content-featured file too.

    Is there any way I can get it to work in the sidebar now?

    Hello experts i am new to wordpress i liked the theme made by Alexander Agnarson.. i have read all the discussion but still have a problem. please let me know what i have to edit in “/inc/featured.php” and content-featured.php

    hope for reply soon

    Hi,
    I’ve solved it in homepage, but in YOU MAY ALSO LIKE… section, the thumbnails are still not showing….any clues?

    tks in advance!

    Hi all! Great theme! Sorry for bad english!

    I have the same issue as the topicstarter. The above code works fine for video, but how about the images? How to make responsive ‘Featured Image’ from the first picture of the post? Instead of prepared previously.

    jmenaia – how u solve this???

    Hi

    I can not show to thumbnail images in my site .
    https://yoominjung.com/

    I don’ t know why…
    please Help me..

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Show images & videos on home page’ is closed to new replies.