Wordpress and Webdesign Forum go41 » WordPress Code Snippets

  1. The question is that the thumbnails on the current theme use the full path (http://www.domain.com/wp-content/uploads/) instead of the path that Arthemia uses (wp-content/uploads/etc...). Additionally, the field name for the thumbnails in the existing theme is "thumbnail".

    You can edit theme files to change the custom field name and to use full paths to accept this values!

    There are two things to change in Arthemias index.php and also in archive.php.

    In this two files the theme is using timthumb to resize images drawn from a custom field titled 'Image'

    find all lines containing

    $values = get_post_custom_values("Image")

    and replace with

    $values = get_post_custom_values("thumbnail")

    now the theme will draw the values of the thumbnail customfield

    BUT STOP! You are not yet done, because the theme inserts a "/" in front of the image path, you can't use full paths with this as it will look like ...timthumb.php?src=/http://ww....

    So you have to remove this slash in all lines looking first like:

    cripts/timthumb.php?src=/<?php

    to look like this:

    cripts/timthumb.php?src=<?php

    ie: just remove "/" after "timthumb.php?src="

    it's worth a try!

    Another hint:
    using the latest timthumb.php (version 1.11) from here:
    http://timthumb.googlecode.com/svn/trunk/
    will make it possible to use external images to be cached and resized!
    To make this work please create a new folder after arthemia/scripts with the name "temp"
    There is now the "arthemia/scripts/cache" folder and you need beside this the "arthemia/scripts/temp" folder set to 755 or 777

    See samples here: http://themes.go41.de/

    Posted 8 months ago #

RSS feed for this topic

Reply

You must log in to post.

Join us! or log in (lost password?):