WordPress.org

Ready to get started?Download WordPress

Forums

Autofocus imageselection home.php (1 post)

  1. zottelbeyer
    Member
    Posted 2 years ago #

    Hello there,

    im using the autofocus theme for my page h2mo.de
    my problem is that with this theme by default the last uploaded picture of a post is used for the frontpage image.

    what i'd like to be able to do is selecting the image myself by adding a property to each image which says frontimage=1 (or something similar)

    my php knowledge is quite limited so forgive me if there is an obvious solution to this.

    home.php in this theme contains this code:

    <span class="attach-post-image" style="height:300px;display:block;background:url('<?php the_post_image_url('large'); ?>') center center repeat"> </span>

    refrencing to

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    so how do i manipulate the insert picture function to contain a new field and then check it within function the_post_image_url($size=large) ?

    Thanks for your help.

Topic Closed

This topic has been closed to new replies.

About this Topic