Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

What does this php code mean?

Featured Replies

Hi all,

 

been asked to change the images on my mate's website - on the silder on the front page - www.ipcwrexham.co.uk

 

It's a wordpress site, as you can probably tell.

 

But I can't for the life of my work out how or where the slider is 'pulling' the images from?

 

In the backend of the wordpress, all I can find in relation to the slider is code under

- Appearance;Editor:

 

<div class="slide">

 

<img src="<?php bloginfo('template_url'); ?>/images/banner.jpg" class="floatleft" alt="IPC" />

 

</div>

 

<div class="slide">

 

<img src="<?php bloginfo('template_url'); ?>/images/banner1.jpg" class="floatleft" alt="IPC" />

 

</div>

 

can anyone help tell me how to change this images please? There are no images in the library called banner or banner1 or banner2 etc.

 

Thanks!

Have you ever tried to search for the "banner.jpg" file in your web directory? Or just simply look at the source of the webpage you linked, i find: "wp-content/themes/ipc/images/banner.jpg". I think that is the file what you searching for (in your public web dir).

surely you just change the images in the slider plugin? Should be like an option down the left, that relates to the slider, and you should just be able to manage the images in that section?

I agree with Keo, half of that URL isn't dynamic so put the desired image in the images folder and change the URL :)

 

The code is giving you the absolute url of the image.

 

php bloginfo('template_url') + /images/banner.jpg

 

effectively, where "bloginfo('template_url')" refers to if I remember right the base folder of your template. So if that's say "http://example/home/...ifeguard-theme" then this plus the image banner bit would equal

 

"http://example/home/...lifeguard-theme + /images/banner.jpg" which equals

 

http://example/home/...ages/banner.jpg - That is the url that will be parsed for your image.

 

So looks like an images folder within your "lifeguard" theme folder within your "themes" folder. Obviously lifeguard = the theme you are working with.

 

That was what you were asking, no?

Edited by Gibson

  • Author

erm, thanks a lot guys, I'm still a bit confused tho (sorry, crap at coding)

 

Emailed my mate - he said:

 

Hi mate,

The images are hardcoded into the front-page.php template so they could just be replaced via ftp as they have generic names like banner1.jpg.

Let me know if you need me to do anything else.

Andy

 

 

How the hell do I change them? I have Dreamweaver so know how to upload stuff by ftp normally...

Also, been looking at the uploaded files already, and can't find the front-page.php anywhere

 

Thanks, sorry for being thick!

  • Author

Made a little progress!

I've connected with Dreamweaver, finally found the images I need to replace...

However, not sure how to replace them, when I open them, they open up in photoshop

I'm not sure how to upload an image that's not within a html doc?

Edited by lifeguard

Simply create new banners in Photoshop, Fireworks etc, save them in a folder on your desktop, save them as banner.jpg & banner1.jpg. Then using a ftp program such as Filezilla, connect to the server, find the images folder on the server, find the image folder you saved on your desktop, upload them to overwrite the existing ones. Job's a good 'un!!

Made a little progress!

I've connected with Dreamweaver, finally found the images I need to replace...

However, not sure how to replace them, when I open them, they open up in photoshop

I'm not sure how to upload an image that's not within a html doc?

 

Images are not stored in the html page, they are called by the html using the <img> tag. Look for the <img> tag and it will give you the path to where the image is being stored. So all you'd need to do, (if you want to replace the images not add more to the slide show) is simply create the new image in a graphics package, save it as the same file name as the images currently being used, and simply FTP them to the folder where the images are being stored.

  • Author

Thanks guys :)

Was a bit confused as didn't know how to upload images in jpeg form without putting them in a webpage first, but will try filezilla when I get home!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.