WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Eleven
Header Pictures (11 posts)

  1. AlfQWood
    Member
    Posted 2 years ago #

    Hi,
    I would like to put captions on the header pics which I have uploaded, is there a way?
    Thanks
    Regards
    Alf

    http://wordpress.org/extend/themes/twentyeleven/

  2. peredur
    Member
    Posted 2 years ago #

    Do you mean that you have fixed caption text you want to associate with each image, or are you looking for something more dynamic where your user chooses or creates the caption?

    The first seems to me to be doable, whilst the second would be much more difficult (i.e. I couldn't do it, personally, without a lot of struggling: but that may say more about me than about the requirement!)

    The first wouldn't necessarily be easy, either, unless somebody else knows better than I do, which is quite possible, even probable.

    Cheers

    PAE

  3. AlfQWood
    Member
    Posted 2 years ago #

    Hi,
    I would like to have fixed caption text on each pic describing each scene, Also I may also want to link the pic to a particular post so a short summary of the post content would be nice. Any ideas?
    Alf

  4. peredur
    Member
    Posted 2 years ago #

    Hmm. How good is your PHP?

    You don't provide a link to your site, so I can't really envisage exactly what you want; but I can't think of a simple way offhand to do what I think you require.

    Someone else may know better, though.

    Cheers

    PAE

  5. AlfQWood
    Member
    Posted 2 years ago #

    Sorry, I'm an amateur when it comes to this kind of thing, exuse my ignorance but what is PHP?
    The link to my site is:
    http://www.alfqwood.com
    Cheers
    Alf

  6. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    If you don't know what PHP is, then you won't be able to use it. Have a look at http://wordpress.org/extend/plugins/cimy-header-image-rotator/

  7. peredur
    Member
    Posted 2 years ago #

    Esmi is, as usual, exactly on the button.

    PHP is the programming language that WordPress is written in. It is a mixture of PHP and straight HTML that produces the HTML that the browser renders. PHP generates any HTML that might differ from one request for a page to another.

    As esmi says, if all that is news to you, you need to use whatever has been provided by other people, namely the theme and any suitable plugins and so on. And if you can't find a plugin to do the job, you'll just have to make the best of what your theme provides, I'm afraid.

    You can always learn PHP/HTML/CSS of course. It's fun. Honest.

    :-)

    PAE

  8. AlfQWood
    Member
    Posted 2 years ago #

    Thanks for that, but I'm afraid that I'm too dumb to try and learn this stuff now in my advanced years, I'll get my son to have a crack at it or do as you suggest and use what is available.
    Thanks alot for your help.
    Regards
    Alf

  9. photocurio
    Member
    Posted 2 years ago #

    Like the OP, I'm looking for a function that will add a caption to the header image. My php is fair to middling, but I'm not sure how to go about this, because the image is outside the loop.

    I'm using a child theme, and it does have a functions file.

    I'd have no trouble placing the php in the theme, and using CSS to style the caption as an overlay. I just don't know how to call up the caption field.

    The Cimy plugin looks very cool, but it does far more than I need, and adds complications, such as a dedicated media directory.

  10. photocurio
    Member
    Posted 2 years ago #

    I'd also love to find the php code that can just echo the featured image's description, that can be used outside the loop.

  11. photocurio
    Member
    Posted 2 years ago #

    found it here:
    http://www.wpbeginner.com/wp-tutorials/how-to-display-wordpress-post-thumbnails-with-captions/

    <?php echo get_post(get_post_thumbnail_id())->post_content; ?>

    I thought it would be something simple!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic