Call a certain custom header image
-
Hello,
I enabled custom header images and uploaded three different header images. Now I want to show one at the top, one in the middle and one at the bottom (footer) of the page, but I’m stuck.
If I want to show ALL header images (for a slider for example) I know I can call
<?php $headers = get_uploaded_header_images(); foreach($headers as $header) { echo $header['url']; } ?>
and this works quite perfect, showing all images in a row.
But I can’t manage to show just the first or just the second or just the third.
I tried
$headers = get_uploaded_header_images(); foreach($headers as $header) { echo $header[0]; }
and
<?php $headers = get_uploaded_header_images(); foreach($headers as $header) { echo $header[0]['url']; } ?>
but I get the error message
Notice: Undefined offset: 0How can I achieve this?
I know I can use css for themes, but I want others without css experience to easily exchange the pics or just change it to random header / slider.Thanks very much, Martina.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Call a certain custom header image’ is closed to new replies.