This topic has 6 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #158130
     wilfriedMarseille
    Participant

    Hello

    I try to display some thumbnail in a CPT post.
    I make a ACF name  ACF_telechargement_liens.
    I get the link with the title.
    But i don’t find the way to display thumbnails.
    This is my code :
    ` <?php $ACF_telechargement_liens = get_field( ‘ACF_telechargement_liens’ ); ?>

    <?php if ( $ACF_telechargement_liens ): ?>

    <?php foreach ( $ACF_telechargement_liens as $post ):  ?>

    <?php setup_postdata ($post); ?>

    <a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a>

    <?php endforeach; ?>

    <?php wp_reset_postdata(); ?>

    <?php endif; ?>`

    I have to make a function in function.php or we have shortcode ith Kleo to post thumbnails like archive.php

    If you love Ableton check my blog :
    www.zikrea.com

    #158146
     wilfriedMarseille
    Participant

    So i find how display thumbnails.

    But if i want a masonry list or a postgrid.
    What is the way ?

    This is my actually code ` <!– Afficher Les liens utiles [ACF Relation] –>
    <section>
    <h3 class=”aligncenter”>Liens utiles</h3>
    <?php $ACF_telechargement_liens = get_field( ‘ACF_telechargement_liens’ ); ?>
    <?php if ( $ACF_telechargement_liens ): ?>
    <?php foreach ( $ACF_telechargement_liens as $post ): ?>
    <?php setup_postdata ($post); ?>
    <a class=”aligncenter”href=”<?php the_permalink(); ?>”><?php the_post_thumbnail(‘medium’); ?></br><?php the_title(); ?></a>
    <?php endforeach; ?>
    <?php wp_reset_postdata(); ?>
    <?php endif; ?>
    </section>`

    Thanks you

    If you love Ableton check my blog :
    www.zikrea.com

    #158239
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #158560
     Radu
    Moderator

    Use the the_post_thumbnail() function to retrive the post featured image

    https://developer.wordpress.org/reference/functions/the_post_thumbnail/

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #158919
     wilfriedMarseille
    Participant

    Thanks.
    And I remember on Kleo Demo.
    Thann you make a video thumbnails.
    I have to put a video file in the featred image to get that ?
    And is possible with a Youtube Link ?

    If you love Ableton check my blog :
    www.zikrea.com

    #159002
     wilfriedMarseille
    Participant

    So i put the_post_thumbnail(‘medium’) and i got a simple thumbnail
    But If i want a thumbnail like the KLEO POST > Grid Format.

    Which code i have to put to replace the_post_thumbnail(‘medium’)

    Thanks

    If you love Ableton check my blog :
    www.zikrea.com

    #159432
     Radu
    Moderator

    We cannot offer support for custom development, but you can do that using our shortcode to pull posts from a CPT in masonry template having also thumbnails and the

    Then render the shortcode on that CPT

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?