Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5030

    Hello!

    The problem is that at post preview there is an image in thumbnail size as it is preview! When i push the Read More button and i am going in the whole post the image continues to be the same size and not the full size! How can i fix this?

    I read something about thumbnails with custom fields! Is this the solution of the problem? If the answer is “Yes” please guide me to make a custom field thumbnail…

    Thanks a lot in advance!

    #48573

    Hey,

    you can use post meta. I can give you some hints though:

    1) You can use custom fields and the get_post_meta function: http://codex.wordpress.org/Function_Reference/get_post_meta to implement custom images. You need to modify the portfolio options if you want to use custom fields with portfolio entries. To do this, open /theme_options/portfolio.php and find this code

    $args = array(
    'labels' => $labels,
    'public' => true,
    'show_ui' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => array('slug'=>$slugRule,'with_front'=>true),
    'query_var' => true,
    'show_in_nav_menus'=> false,
    'menu_position' => 5,
    'supports' => array('title','thumbnail','excerpt','editor','comments')
    );

    Change the supports to include custom fields like this:

    $args = array(
    'labels' => $labels,
    'public' => true,
    'show_ui' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => array('slug'=>$slugRule,'with_front'=>true),
    'query_var' => true,
    'show_in_nav_menus'=> false,
    'menu_position' => 5,
    'supports' => array('title','thumbnail','excerpt','editor','comments','custom-fields')
    );

    2) Kriesi wrote a tutorial here: http://www.kriesi.at/archives/how-to-use-wordpress-custom-fields

    I.e. use a custom field with the name “preview_image” and the value “http:/my-image.jpg”. Depending on various decisions (i.e. do you want to set the fullwidth version by using post meta or the preview version, do you want to link the image or not, etc.) you need to implement the post meta code in your theme. You can use single.php (for the fullwidth version) or index.php + archive.php for the small image version. You’ll need some php/html (maybe css) skills.

    To receive the preview image url use:

    <?php $image = get_post_meta($post->ID, 'preview_image', true); ?>

    #48574

    Hi guys,

    First off thanks so much for creating an amazing template! It’s allowed me to heavily customize it and make it my own. I’d like to add a custom field to use a separate thumbnail for my portfolio entries. This is is a really important feature to me that I thought was a part of this template when I purchased it :(

    I read the guide but I’m still unsure as to where to insert certain lines of code shown in Kreisi’s tutorial. Is there an in-depth step by step guide somewhere that will show me the results of adding the edits you posted?

    Many thanks.

    Nick

    #48575

    Hi Nick,

    Not that I know of no. The above is a good start but if you really need it and are not comfortable with editing php I would recommend looking into a freelance web developer. The changes should take a few hours at most since the above is a good starting point.

    Unfortunately however it isn’t something we can offer as support.

    Regards,

    Devin

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Post problem!’ is closed to new replies.