Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author David Aguilera

    (@davilera)

    Hi! Please, as I always say to everybody, share a couple of links to your site so that I can see (a) a regular featured image that’s working and (b) an external featured image that, according to what you’re saying, is not.

    There’s more than one possible explanation as to why external featured images might not work. If you don’t share any more information, there’s little I can do.

    Best!

    Thread Starter wilsonrljr

    (@wilsonrljr)

    Sorry to send little information for you.
    My website: https://www.culturapura.com.br
    All posts are configured with the regular featured image, except the news “Michael Chiklis se junta ao elenco de Gotham” (the first news beside the photo slide).

    https://www.culturapura.com.br/editora-seguinte-lancara-novos-livros-do-universo-de-star-wars/ (a regular featured image that’s working)

    https://www.culturapura.com.br/michael-chiklis-se-junta-ao-elenco-de-gotham/
    (an external featured image that is not working)

    When I put the external url and click on preview, the image appears in the box , but as you can see it does not appear on the site.

    Thank you for your attention.

    Hi! Please, change the following piece of code in content-single.php of your theme:

    if( has_post_thumbnail() ):
       $img_url = wp_get_attachment_image_src(
          get_post_thumbnail_id(), 'single-thumb' );
    ?>
    <img src="<?php echo $img_url[0]; ?>"
         alt="<?php the_title_attribute(); ?>"
         title="<?php the_title_attribute(); ?>" />
    <?php
    endif;

    With the following piece of code:

    if ( has_post_thumbnail() ):
      if ( function_exists( 'uses_nelioefi' ) &&
           uses_nelioefi( $post->ID ) ) {
        echo the_post_thumbnail();
       } else {
        $img_url = wp_get_attachment_image_src(
          get_post_thumbnail_id(), 'single-thumb' );
    ?>
      <img src="<?php echo $img_url[0]; ?>" alt="<?php
        the_title_attribute(); ?>" title="<?php the_title_attribute(); ?>" />
    <?php  }
    endif;

    And also change in your inc/profitmag-functions.php file of your theme the following fragment:

    $image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'slider-beside' );

    with this fragment:

    if ( function_exists( 'uses_nelioefi' )
       && uses_nelioefi( get_the_ID() ) ) {
       $image_url = nelioefi_get_thumbnail_src( get_the_ID() );
    } else {
       $image_url = wp_get_attachment_image_src(
           get_post_thumbnail_id(), 'slider-beside' );
    }

    Probably you’ll also need to change other parts of your theme where the wp_get_attachment_image_src function appears, but with these two examples you’ll get the idea of doing it.

    Best!

    Plugin Author David Aguilera

    (@davilera)

    Hi!

    @wilsonrljr, the new version of the plugin (1.3.1) fixes the issue you had without your editing the theme. Antonio’s answer was the right way to solve the issue in previous versions, but it’s no longer necessary.

    Best,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Doesn't work with ProfitMag Theme’ is closed to new replies.