Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   How to place post title under image (http://forum.bytesforall.com/showthread.php?t=1542)

Antsliedown May 5, 2009 12:47 AM

How to place post title under image
 
Does anyone know how to place the individual post headline so that the image of the post is above both the headline and the body?
i.e http://www.uncrate.com/men/home/art-decor/kaleido-r7/

core4 May 13, 2009 05:40 AM

Did you figure this out? I'd love to know a method to do this.

TIA.

Flynn May 13, 2009 07:09 PM

Add the image file name as the value of a new custom field to the post or page

Posts -> Edit -> [Post Title] -> [scroll down to:] Custom Fields -> [scroll down to:] Add new Custom field -> Enter new ->

Name: postheadingimg
Value: myimage23.jpg

-> Click "Add custom field"

... and reference that image in the post kicker at i.e. Post/Page Info Items -> KICKER: Single Post Pages as

PHP Code:

<img src="/path/to/images/%meta('postheadingimg')%" alt="%post-title%" /> 

Or linked to the single post page
PHP Code:

<a href="%permalink%"><img src="/path/to/images/%meta('postheadingimg')%" alt="%post-title%" /></a

Additionally, adding a class and ID to each image so they can be group-styled or individually styled:
PHP Code:

<a href="%permalink%"><img id="postheadingimg-%post-id%" class="postheadingimg" src="/path/to/images/%meta('postheadingimg')%" alt="%post-title%" /></a

CSS Insert:
HTML Code:

/* base style for all */
img.postheadingimg {
border: 5px solid black;
}
/* specifically for post ID 13 */
img#postheadingimg-13 {
border: 5px solid red;
}


eperon Nov 6, 2010 10:25 AM

this works pretty well! except when a post does not have a custom field defined, it will show a 'image missing / broken ' sign...


All times are GMT -6. The time now is 01:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.