Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other post_thumbnails

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #30752
    almcrorie
    Participant

    http://dmartinng.com/tutorial/use-nivo-slider-for-an-awesome-wordpress-slider/

    I have been looking at trying this out on a local wordpress setup, can someone explain to me how to create post thumbnails? i really don’t understand them and need help. I downloaded the example demo in this tutorial and it needs them set up and I have no idea what to do?

    Al

    #74378
    TheDoc
    Member

    Hey Al,

    If you’re comfortable in editing your functions.php, then this should be a breeze. If not, let me know if I need to explain it any further.

    Setting it up is as simple as:

    1. Open functions.php
    2. Add the following code:
    // add post-thumbnail functionality
    if (function_exists('add_theme_support')) { add_theme_support('post-thumbnails'); }

    If you want, you can even alter the size output:

    set_post_thumbnail_size( 100, 100, true ); // Generic settings
    add_image_size( 'sidebar-ads', 125, 125, true ); // You can add custom sizes, too!
    add_image_size( 'custom-size-2', 255, 236, true ); // As many as you like

    To call a post_thumbnail in your loop (will use the ‘generic’ settings):

    To call a custom size (will use your custom defined settings):

    the_post_thumbnail('your-custom-name'); 
    #74382
    TheDoc
    Member

    My apologies, I didn’t look at the article.

    Each image in the slider is related to a post. When you create a new post there should be a “Set Featured Image” option on the right side.

    #74292
    TheDoc
    Member

    You can create a new category, called it “Slider Images”, and make sure to exclude that category from all other loops.

    Make sure that the loop running the slider is set to only include that category.

    https://css-tricks.com/snippets/wordpress/run-loop-on-posts-of-specific-category/

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Other’ is closed to new topics and replies.