• groober1

    (@groober1)


    Hi,

    So im using WordPress with theme Theme Twenty Ten. I have created a news section in a toolbar, at the top of the site like any normal one. When you click this news section as desired there is a preview of the article and upon clicking it you view the full article with all images.

    How do i make the preview display an image / thumbnail to left of the text ?

    im assuming that its from a code front, but can anyone give me any pointers, one example i have is here (what im trying to achieve).

    a good example of how i want it to look is here: https://www.all-about-the-house.com/

    same applies to the homepage, how do i create the thumbnail look rather than the whole piece ?

    thanks in advance ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi

    (@esmi)

    Don’t edit the Twenty Ten theme! Your changes will be over-written the next time you upgrade WordPress or the theme. For this reason, it is recommended that you consider creating a child theme for your customisations.

    Thread Starter groober1

    (@groober1)

    so unless i use a child theme theres no other way to get the thumbnail image ?

    quite surprised at that, im pretty good with code normally but it seems over complicated

    was looking at a music site i go on which is here:

    https://www.gramagency.co.uk/?category_name=news

    they seem to have the same thing as me, but i want it to be just liek that but with a preview image on the left

    thecrazyest

    (@thecrazyest)

    You can use custom fields.

    .imgex {
    	float: left;
    	padding: 10px;
    }
    <?php $values = get_post_custom_values("Imgex"); if (isset($values[0])){?> <img src="<?php $values = get_post_custom_values("Imgex"); echo $values[0]; ?>" width="200" height="200" style="border: 2px #0079BB solid;"> 
    
    <?php } else { ?> 
    
    <img src="default.jpg" width="200" height="200" style="border: 2px #0079BB solid;"> 
    
    <?php } ?>

    Put this in index.php, single.php, etc.

    Thread Starter groober1

    (@groober1)

    hmm, i cant seem to do this – in the web admin it says i need to make the file writeable, also that code above looks like it requires individual links rather than creating a thumbnail for the preview automatically, or not ? confused.com !

    sabino106

    (@sabino106)

    Hi groober1 –

    The link you referenced above is my site!

    I started with the Obscure theme from WPcrunchy, after quite-a-bit of looking around. There’s a free version available; you can google for it. I’ve actually customized it a little over the past couple of months – and I’m still working on it (have two threads posted in here), but what you’re looking for is native to the theme. Thanks for posting my link – makes me feel good! Now, if I could only get links from, you know, “The New York Times” or something, maybe I would start getting more traffic… ??

    Hope this helps…

    thecrazyest

    (@thecrazyest)

    If you use custom fields you have to insert preview each time when you add post… Or you can use a theme that offer your this option.

    Thread Starter groober1

    (@groober1)

    when you say about custom fields do you mean the category’s or pages or posts??

    so in theme twenty ten i can do this ?

    spent about four hours reading through all the faqs last night and went to bed mad haha !

    thecrazyest

    (@thecrazyest)

    Download twenty ten from ftp. change in style.css

    /*
    Theme Name: NEW Twenty Ten
    Theme URI: https://www.ads-software.com/
    Description: The 2010 theme for WordPress is stylish, customizable, simple, and readable!
    Author: the WordPress team
    Version: 1.2
    License: GNU General Public License
    License URI: license.txt
    */

    and put all theme files in /themes/newtwentyten

    After that you can add custom fields in single.php etc. like i said before.

    When you add post you have there an option “Custom fields” (check Screen Options) you will see this tab after post form.

    and add there new Custom field “Imagex” and the url to your img (you have to host it on your host or tinypic.com).

    I’m not so good to explain in english. Maybe esmi will explain better :D. Anyway i hope you get it..

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Adding image thumbnails to a category / news’ is closed to new replies.