Ankit Pokhrel
Forum Replies Created
-
Forum: Plugins
In reply to: [Dynamic Featured Image] Installed into 3.8 and theme 2014 – not workingHello sixtyseven,
Glad to know that it worked ?? . Thank you for the enhancement proposal along with the solution. I will add this functionality in the future version.
A plugin review at https://www.ads-software.com/support/view/plugin-reviews/dynamic-featured-image would be a great help ??
Regards,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] Featured image not available by JetPack REST APIHello sahilsaid,
Thank you for trying the plugin.
I haven’t tried to fetch the plugin contents using JetPack REST API. I don’t think i have any quick fix for this but can you please try the new version from here https://github.com/ankitpokhrel/Dynamic-Featured-Image (master branch)? This version is not yet live but it is working. It uses new media library “Set featured image” functionality to set the featured image. This might solve your problem.
Also the plugin contents are saved in ‘postsmeta’ table and it has nothing to do with WordPress default featured image functionality. I think that the plugin values should show up somewhere in meta values returned by the Jetpack Rest API.
Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] Installed into 3.8 and theme 2014 – not workingHello Sixtyseven,
Sorry to know that it didn’t work for you. I just tried it in fresh installation (WP 3.8.1 and Plugin ver. 2.0.2 ) and it is working as it should.
Would you like to try ver. 3.0.0? It is still under development but you can use it for normal use. You can download it from here (master branch). Sadly i am still not able to write the documentation for this version.
Thank you!
Forum: Plugins
In reply to: [Dynamic Featured Image] Installed into 3.8 and theme 2014 – not workingHello Sixtyseven,
Sorry to know that it didn’t work for you. I just tried it in fresh installation (WP 3.8.1 and Plugin ver. 2.0.2 ) and it is working as it should.
Would you like to try ver. 3.0.0? It is still under development but you can use it for normal use. You can download it from here (master branch). Sadly i am still not able to write the documentation for this version.
Thank you!
Forum: Plugins
In reply to: [Dynamic Featured Image] Get second featured imageHello imaginocracy. Thank you for using the plugin. Glad to know that you solved your issue. Additionally this post shows how to get second featured image – https://ankitpokhrel.com.np/blog/fetching-information-from-the-returned-data/.
Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] Replacing featured image in category.phpHello sinom,
Thank you for using the plugin. You need to fetch the featured image and display it in your bolg manually. Please go through this support thread https://www.ads-software.com/support/topic/featured-image-dont-show-in-post?replies=2 .
Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] Missing insert button in tab Media LibraryIf it was because of the plugin it should be missing from both pages and posts. Did you checked by deactivating the plugin?
Forum: Plugins
In reply to: [Dynamic Featured Image] Installed into 3.8 and theme 2014 – not workingHello metame,
I checked the plugin (v2.0.1) in a fresh WordPress(v3.8.1) installation and it is working as it should. Please visit these posts. Hopefully it will help you to solve the issue.
1. https://github.com/ankitpokhrel/Dynamic-Featured-Image/issues/9
Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] Missing insert button in tab Media LibraryHello,
I don’t know why you are having problem with already uploaded images. I checked it and there isn’t any problem. And since the old media uploader is outdated i will change it with new media uploader ASAP in the upcoming version.
Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] Getting image descriptionsHello Chris,
Thank you for using the plugin. I haven’t provided any function to fetch the description of an image but you can do it using similar function.
/* * Get image description * This code is not tested * @return String */ function dfi_get_image_description( $image_url ) { global $wpdb; $prefix = $wpdb->prefix; $post_description = $wpdb->get_col( $wpdb->prepare( "SELECT post_content FROM " . $prefix . "posts" . " WHERE guid = %s", $image_url ) ); return empty($post_description ) ? null : $post_description[0]; }
Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] Plugin Just Stopped WorkingHello Fxvdigital,
Thank you for using the plugin. If the plugin was working fine before then the problem can only be because of conflicts with some other plugins. Or if you have migrated your site from local to live server make sure that you changed the site url in your database.
UPDATE wp_posts SET post_content = REPLACE(post_content, 'localhost/yourlocalsite/', 'www.yourlivesite.com/');
Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] Is there a way to obtain url of featured image urlI am closing the issue because there is no any response from 2 weeks.
Hello Merosler,
Thank you for using the plugin. Currently there is no such functionality that allows you to associate featured image in category. I have had similar feature listed in my to do list for the plugin. But for now you have to find some other way.
Thanks,
AnkitHello creativemanner,
Thank you for using the plugin. I have tried to explain the code in comments.
<?php //if there is any post while ( have_posts() ) : the_post(); //get the psot $attachments = dfi_get_featured_images($post->ID); //dfi_get_featured_images will fetch all DFI images from your post foreach($attachments as $attachment) { //Now loop through your returned image array $medium_img_url = dfi_get_image_url( $attachment['attachment_id'], 'medium' ); //dfi_get_image_url will return medium sized url of your image ?> <li> <!-- Display your image. the_permalink() will get the link to your post. dfi_get_image_alt_by_id will get the alt field of your image. --> <a class="gall-img" href="<?php the_permalink() ?>" style="margin-bottom: 0;"> <img src="<?php echo $medium_img_url; ?>" alt="<?php echo dfi_get_image_alt_by_id($attachment['attachment_id']); ?>" /> </a> </li> <?php } endwhile; ?>
Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] Is there a way to obtain url of featured image urlAre you able to display second featured image in your page? I mean outside fancybox, in your theme page?