WordPress.org

Ready to get started?Download WordPress

Forums

get_option for Thumbnail Alignment (3 posts)

  1. colindunn
    Member
    Posted 4 years ago #

    I am attempting to align my thumbnail images based on the settings chosen on the edit post screen. From what I read on this page it seems like I need to use the get_option tag to figure out what alignment is being used. This is what I think needs to be done (I am a rather inexperienced coder)

    $a = get_option('thumbnail_align') / 2;
    
    the_post_thumbnail(array(100, 100), array('class' => 'align$a'));

    The problem is that get_option('thumbnail_align') (as far as I know) isn't valid. The current documentation on get_option doesn't mention anything about thumbnails. Anyone have any ideas?

  2. Tibor Paulsch
    Member
    Posted 4 years ago #

    I think you can do it like this:

    <?php the_post_thumbnail( 'thumbnail', 'class=alignleft'); ?>

  3. Tibor Paulsch
    Member
    Posted 4 years ago #

    Oops I am sorry; you're asking for something more complicated..

Topic Closed

This topic has been closed to new replies.

About this Topic