Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1296937

    Hey there,

    i can`t for the life of me figure out how to display the featured image on the portfolio page. is this achievable?

    thanks,
    richard

    #1297325

    Hey floka168,

    Thank you for the inquiry.

    Did you switch the editor to the advance layout builder (ALB)? The featured image will not display automatically when ALB is active. You have to manually insert an Image element or a Slider from the builder to display an image in the portfolio page. If the classic or default editor is active, the featured image should display automatically.

    Best regards,
    Ismael

    #1297375

    you can have on child-theme functions.php this:

    function thumbnail_in_content($atts) {
        global $post;
        return get_the_post_thumbnail($post->ID);
    }
    add_shortcode('thumbnail', 'thumbnail_in_content');

    you use it on the pages / posts as shortcode then: [thumbnail]

    #1297377

    maybe this could be an informative topic: https://kriesi.at/support/topic/beitragsbild-eines-blogbeitrags-automatisch-anzeigen/#post-1202606

    this little Snippet enables you to set even on alb based portfolios/posts the featured image if meta-box is set to : “show on single entry”:

    function avf_template_builder_content_postimage_mod($content = ""){
      if(is_singular('post')   && ( '1' != get_post_meta( get_the_ID(), '_avia_hide_featured_image', true ) ) || 
         is_singular('portfolio') &&  ( '1' != get_post_meta( get_the_ID(), '_avia_hide_featured_image', true ) ) ) {
            $featuredImage = get_the_post_thumbnail( $the_id, 'entry_with_sidebar' );
            $content = '<div class="post-image">' .$featuredImage. '</div>' . $content ;
          }
      return $content;
    }
    add_filter('avf_template_builder_content', 'avf_template_builder_content_postimage_mod', 10, 1);

    on that line: $featuredImage = get_the_post_thumbnail( $the_id, 'entry_with_sidebar' );
    you decide what dimension the source of the image has ( entry_with_sidebar ) is 845×321

    #1297708

    Hi,

    Thanks for helping out @guenni007 :-)

    Best regards,
    Rikard

    #1349904

    Hi
    I’m facing the similar issue, couldn’t set thumbnail image? May I know what’s your solution? Thanks!

    #1349949

    Hi kimhoegcit,

    Please open a new thread and include WordPress admin login details in private, so that we can have a closer look at your site.

    Best regards,
    Rikard

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Display featured image on portfolio page’ is closed to new replies.