Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Page & Category Menu Bars »

Using variables as image names


  #1  
Old Jun 18, 2012, 12:32 AM
majofa
 
13 posts · Jul 2009
My site has 20 fixed pages. I would like to use different images with the name of each page instead of the post headline.

Because I will be forced to make a call for each image in each post, I am looking to hardcode the line of code.

Is it possible to use a variable in the image call, lets say bfa_post_headline, so the call will be something like:
<img src=" $bfa_post_headline" ".jpg">
  #2  
Old Jun 18, 2012, 05:17 AM
juggledad's Avatar
juggledad
 
23,737 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
If you are going to edit the theme code, then yes however you have to make sure to escape in and out of php to use the variable name and may need to use the 'echo' command


or you could use CSS to hide the title and just add the image as the top of the post...
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by lmilesw; Jun 18, 2012 at 08:18 AM.
  #3  
Old Jun 18, 2012, 08:12 PM
majofa
 
13 posts · Jul 2009
Thank you juggledad.

As my knowledge on CSS is very limited, can you give an example of how to accomplish the task?

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] global variables todo1979 Plugins & Atahualpa 6 Apr 13, 2011 03:00 AM
FR: Add variables to the paths to images, headers, logo, favicon, etc. interfasys Atahualpa 3 Wordpress theme 0 Jan 22, 2011 12:58 PM
[SOLVED] Notices on undefined indexes, variables and deprecated functions Knut Sparhell New Versions, & Updating 1 Jan 3, 2011 09:07 AM
Can't get a second row to enter HTML variables Thomas Sidebars & Widgets 18 May 16, 2010 10:59 AM
Accessing PHP variables after header sent out twola Sidebars & Widgets 1 Oct 2, 2009 12:24 PM


All times are GMT -6. The time now is 01:27 PM.


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