Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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,765 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



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 10:49 AM.


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