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

    (@davilera)

    Hi Nico!

    I tried to download your theme, but I couldn’t. Can you please re-share it?

    Thread Starter Nico913

    (@nico913)

    Plugin Author David Aguilera

    (@davilera)

    Thanks for sharing the theme, Nico. This is what you’ll have to do. Open the functions.php file and look for a function named dp_thumb_url. Right before the function adds a default thumbnail (line 832):

    // ...
    /* If this is a video by jplayer, try to get thumbnail from video_posts */
    if(empty($thumb_url) && $poster = get_post_meta($post_id, 'dp_video_poster', true))
      $thumb_url = $poster;
    
    /* If still no image or is wp error, define default image */
    if(empty($thumb_url) || is_wp_error($thumb_url)) {
    //...

    add the following piece of code:

    // ...
    /* If this is a video by jplayer, try to get thumbnail from video_posts */
    if(empty($thumb_url) && $poster = get_post_meta($post_id, 'dp_video_poster', true))
      $thumb_url = $poster;
    
    if ( function_exists( 'uses_nelioefi' ) &&
         uses_nelioefi( $post_id ) ) {
      $thumb_url = nelioefi_get_thumbnail_src( $post_id );
    }
    
    /* If still no image or is wp error, define default image */
    if(empty($thumb_url) || is_wp_error($thumb_url)) {
    //...

    This will do the trick! Let us know if it worked ??

    Thread Starter Nico913

    (@nico913)

    Hi David, the code you provided is worked like a charm.
    Thank you very much for your support, I really appreciated it.

    Plugin Author David Aguilera

    (@davilera)

    I’m glad to know! And, please, don’t forget to rate our plugin.

    that does not work for me. I use theme “Hitchcock”

    Thread Starter Nico913

    (@nico913)

    Hello David, the new function which can set the first image as the featured image is not working on my theme. I’m using the same detube theme. Can you help me? Thank You, for your time.

    Plugin Author David Aguilera

    (@davilera)

    @anreechess:

    I didn’t see your reply, I’m sorry. Can you please open a new support thread with a link to your theme? Thanks!

    @nico913:

    You said the fix works if you set an external featured image, right? But it doesn’t use the first featured image automatically. Is that the issue you’re facing right now?

    Thread Starter Nico913

    (@nico913)

    Hey David, take a look at the picture i uploaded for detail.
    I hope you understand.

    Thank you very much, for your time.

    Click here

    Plugin Author David Aguilera

    (@davilera)

    Hi!

    Can you please show me the source code of the image in the post? I’d like to see how you added it. A screenshot where I can see the first few lines of your entry would suffice.

    Thread Starter Nico913

    (@nico913)

    You mean the text version of the post?
    Like this? Screenshot here

    <img class=”alignnone” src=”https://2.bp.blogspot.com/-tjv7GUg4rQI/Vt2wt3uxlpI/AAAAAAAAB5E/IDQlnxkf7Dw/s1600/lorem_ipsum.jpg&#8221; alt=”” width=”1240″ height=”832″ />

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque euismod neque magna, quis pharetra libero facilisis vel. Pellentesque auctor ligula ut erat mollis, nec fermentum orci maximus. Pellentesque augue tortor, viverra at finibus et, laoreet a ante. Sed finibus lectus et turpis dignissim blandit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Morbi purus magna, molestie at rhoncus feugiat, rutrum consequat urna. Nullam bibendum, mi non rhoncus elementum, leo risus congue purus, quis mattis dui nunc quis est. Integer at orci et enim faucibus ultrices sed eget augue. Fusce sit amet ex orci. Duis imperdiet felis vel est pulvinar ultrices. Aenean accumsan tincidunt vestibulum. Morbi nec fermentum diam. Morbi vel sodales mauris, non convallis lectus. Pellentesque dignissim pellentesque tempus. Sed mollis in nulla eu convallis. Quisque fringilla urna sit amet massa accumsan tincidunt.

    Donec tempus ultrices lorem sed suscipit. Quisque sodales augue quis lorem dignissim, id semper diam consequat. Curabitur suscipit elit ipsum, at placerat felis porta id. Mauris placerat, massa sed bibendum efficitur, felis justo congue lacus, sit amet pharetra est urna a neque. Sed vitae porttitor massa. Fusce sagittis velit nec metus ultrices eleifend id eu odio. Proin magna turpis, interdum eu mauris vel, fermentum tempus urna. Donec sed rutrum ante, ut ullamcorper libero. Aliquam pretium at justo vel bibendum. Praesent id erat nisi.

    Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis non commodo neque. Proin consequat lacus metus, ut imperdiet ipsum consequat id. Phasellus id mi facilisis, imperdiet elit vel, ullamcorper massa. Integer quis eros enim. Sed purus dui, aliquet eget nisl in, egestas molestie massa. Duis dictum libero eget placerat vulputate. Aenean neque nulla, ultricies eget aliquet sed, porttitor nec libero.

    Maecenas rutrum orci orci, ut dapibus lacus dapibus vitae. Aliquam in accumsan nisl, ac suscipit arcu. Mauris euismod pulvinar lorem, sit amet posuere nulla congue eu. Nulla in justo eu magna placerat fermentum. Morbi in accumsan quam, ut auctor dui. Curabitur congue risus nec pharetra convallis. Quisque euismod velit at lectus semper vulputate. Aliquam porta odio orci, nec posuere nisi sollicitudin sed.

    Sed malesuada lobortis justo ornare pharetra. Quisque dignissim viverra nisl vitae tempor. Nunc rutrum blandit mauris, ac scelerisque nisi tristique at. Donec ultricies pulvinar nulla imperdiet posuere. Aenean id semper tortor, eget fermentum magna. Fusce dolor tortor, tincidunt ac orci lacinia, suscipit mattis libero. Suspendisse elementum lacinia mauris in ullamcorper. Fusce sed nisl at enim condimentum aliquet at nec arcu. Etiam a dignissim urna, ac lacinia nisl. Nunc vehicula felis vitae mi fringilla, eu ultrices dui ornare. Sed consectetur ipsum eget nisi efficitur luctus.

    Plugin Author David Aguilera

    (@davilera)

    OK, I see what’s amiss. We find the first image looking for the following string:

    <img src="..."

    However, your post uses the following pattern:

    <img class="alignnone" src="..."

    Because of this class="alignnone" between theimgtag name and itssrc` attribute, our plugin isn’t able to get the image. I’ll work on a fix and upload it later on today. Once it’s ready, I’ll let you guys know!

    Thread Starter Nico913

    (@nico913)

    Thank you David! You’re the best!. I can’t wait for your good news. ??

    Plugin Author David Aguilera

    (@davilera)

    There you have it! Verison 1.4.2 uploaded. Can you give it a try and let me know if it works?

    Thread Starter Nico913

    (@nico913)

    Hey David, just tried the newest (1.4.2) version of your plugin, and… WOW it works! :D. Now the first image is automatically saved as the featured image.

    Thank you David! For your great support. I’ll mark this topic as resolved.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Nelio didn't work on detube theme.’ is closed to new replies.