• Resolved Vinay Desai

    (@vinayd97)


    Hi first of all thank you for this awesome plugin!
    It works perfectly with Jarida theme, but not working with Newsmag theme…
    The thumbnails are not visible, i looked out on previous support thread where “MyLifeGameRU” asking for “Newspaper” theme support HERE!

    and this Newsmag theme is from same developer of Newspaper theme.
    i tried to follow your instruction from that thread but this theme codes bit different than Newspaper theme.

    So im almost newbie to templates editing,
    I just want to visible featured images on My blog homepage…

    I emailed theme details to your email: [ email redacted, do not post those here ]

    Here’s my website https://www.apkorigin.com (currently using my old Jarida theme)

    Please help me to solve this issue.. ??
    Once again thanks for the plugin!

    https://www.ads-software.com/plugins/external-featured-image/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Nelio Software

    (@nelio)

    Hi, Vinayd. Thanks for contacting us. I can confirm we received your e-mail with a copy of your theme. I’ll look at it as soon as I have some spare time and get back to you soon!

    Thread Starter Vinay Desai

    (@vinayd97)

    no problems, take your time. ??

    Plugin Author Nelio Software

    (@nelio)

    Hi Vinay.

    Apparently, your theme uses the method called get_image of the class td_module_single (file includes/modules/td_module_single.php) for inserting featured images. If you modify that method and include the following piece of code*:

    //do not show the featured image if...
    if (td_util::get_option('tds_show_featured_image') == 'hide' and get_post_format($this->post->ID) != 'video') {
      return;
    }
    
    /* NELIO EDIT (line 213) */
    if ( function_exists( 'uses_nelioefi' ) && uses_nelioefi( $this->post->ID ) ) {
      echo nelioefi_get_html_thumbnail( $this->post->ID, $thumbType );
      return;
    }
    /* END OF NELIO EDIT */
    
    //handle video post format
    if (get_post_format($this->post->ID) == 'video') {

    the featured image should be visible! Please, let us know if this works.

    Keep in mind that any edit you perform in your theme will be lost when the plugin is updated. In order to solve is, either you add this tiny piece of code after the updates or you create a child theme (which in this case is not trivial).

    * The only piece of code relevant is the “NELIO EDIT”. The other lines are already in the method; we just put them here for context.

    Thread Starter Vinay Desai

    (@vinayd97)

    hi,
    i added extra code (on line 213) as you said but still its now showing featured images..
    https://s25.postimg.org/c1lw00ffj/Newsmag.jpg

    Im using Homepage style 3 from “Template Option”

    and here is the same homepage of my older posts (when im not using our external image plugin) i.e default featured images.
    https://s25.postimg.org/3xid90ie7/converted_b55ab137.jpg

    Please help me to solve this issue. ??
    Thanks!

    Plugin Author Nelio Software

    (@nelio)

    Hi! I see; this other template option uses a different piece of code for inserting the featured image. Try adding the following piece of code in a method called get_image, which is in file includes/wp_booster/td_module.php line 279:

    if ( function_exists( 'uses_nelioefi' ) && uses_nelioefi( $this->post->ID ) ) {
      $buffy .= get_the_post_thumbnail( $this->post->ID, array(180,120) );
    }
    else {
      $buffy .= '<img width="' . $td_temp_image_url[1] /* ... */ . '/>';
    }

    Note that the code in the else part is a line that was already in your theme. That line is the one that’s inserting the featured image. If the current post is using an external featured image (first part of the if clause), then the image we print in $buffy is the external featured image. If it’s not, then we use the theme’s regular code.

    Thread Starter Vinay Desai

    (@vinayd97)

    hi
    followed as you say but got an error on website :
    Parse error: syntax error,
    unexpected end of file, expecting
    function (T_FUNCTION) in /****/****/public_html/wp-content/themes/Newsmag/includes/wp_booster/td_module.php on line 404

    please help… :/

    Plugin Author Nelio Software

    (@nelio)

    This error means you didn’t copy the code properly. Make sure all the brackets ({ and }) are properly placed, that no parenthesis are missing, and that the $buffy .= '<img width.../>'; instruction (which was already in your code) is properly inserted in the else statement. Double check your code; the error is there.

    Thread Starter Vinay Desai

    (@vinayd97)

    yes you are right! i forget to put “}” after my original code, now everything works fine.
    Thank You So Much! ??

    Plugin Author Nelio Software

    (@nelio)

    Glad to hear! Please, don’t forget to rate and/or comment on our plugin ?? Thanks!

    Hi, This plugin works great with Newsmag theme, Im using this theme.
    This is my site

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Not working with Newsmag theme.. :(’ is closed to new replies.