Support

Account

Home Forums General Issues Text on image

Solving

Text on image

  • Hi, can someone help me with this. How to with ACF plugin display alt or some other text on image. example. I have news portal with a number of posts and we often download imgs from other websites and we want to display small grey box in left corner of image with text like “Source of image”….

  • This is really a basic WP/HTML/CSS/Design question and does not relate to ACF specifically.

    I suggest you look for coding techniques for doing what you want to do and for WP coding tips.

    If you are using an image field https://www.advancedcustomfields.com/resources/image/ or a gallery field https://www.advancedcustomfields.com/resources/gallery/ there is documentation on the values you can from these fields.

    If you have specific code that you need help with that relates to ACF you can post that and someone can try to help.

  • Maybe you dont understand me, I want to display alt text directli on left corner of image. Style and other I can do with css but I want wp function or ACF posibikity to do with.

    Like this https://ibb.co/1KNYR87

  • What @hube2 means is your basically asking a 2 part question.
    #1 – How to pull the relevant data / text per image.
    #2 – How to visually display the above data / text on each image in a small box giving credit to the original source.

    With #1 he linked you to how (with writing some simple code) you could pull the data / text you need from the image.
    This is the kind of help you would get from this site / forum. When you go on to ask for #2 specific “design” help also, then you would look for that kind of “specific” help from a site / forum where they concentrate on that.

    So, once you atleast try #1 and post back here your code where you atleast tried, then someone could probably help you the rest of the way.

    In your case, it would be more difficult to try and pull “the image’s source credit info” from the image itself.
    Why not just create custom field(s) for each image?

    Example:
    News Article Image Name – Custom field for the image upload.
    News Article Text Source – Custom field for the text you want to use inside the box.
    News Article URL Source – Which is a url custom field to the source website / page.

    Then on your page, in a DIV (you will have to determine your CSS styling)..
    1. set the background image of the DIV to the image from the News Article Image Name custom field.

    2. create an inner div, set that to absolute position (lower left) and use the News Article Text Source custom field

    3. set that inner div’s hyperlink to News Article URL Source custom field.

  • Hi, tell me the difference between using ACF and PACF?
    send tutorial to understand how wp/html code functions in this.

  • Its possible to use text on image on specific side like left or right

  • I have created an extra field for image descriptions (image_description)
    the whole thing is integrated with me with <figcaption>

    		<div class="druckerimage">
    			<?php $image = get_field('image');
    				if( !empty($image) ): ?>
    					<figure class="gesamt">
    						<img src="<?php the_field('image'); ?>" alt="<?php the_field( 'modell' ); ?>" class="druckerimg" />
    						
               				<figcaption><?php the_field( 'image_description' ); ?></figcaption>
    
          				</figure>
    
    			<?php endif; ?>
    		</div>
    		

    maybe this will help you?!?

  • Let’s understand what do we mean by ACF and PACF first, ACF is an (c o mplete) auto-correlation function which gives us values of auto-correlation of any series with its lagged values . We plot these values along with the confidence band

  • For your situation, it would be more hard to attempt to pull “the picture’s source credit information” from the actual picture. Why not simply make custom field(s) for each picture?
    I recommend you search for coding methods for doing what you need to do and for WP coding tips.

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Text on image’ is closed to new replies.