Ankit Pokhrel
Forum Replies Created
-
Forum: Reviews
In reply to: [Dynamic Featured Image] Great, with one issueGlad to know that you liked the plugin. Can you please elaborate more about the issue? I didn’t get it.
Hello laurenfae,
Yes, it is possible! You need to fetch the featured image and display it in your page manually.
Example Code:
if( class_exists('Dynamic_Featured_Image') ) { global $dynamic_featured_image; $featuredImages = $dynamic_featured_image->get_featured_images( $postId ); //Loop through the image to display your image if( !is_null($featuredImages) ){ $links = array(); foreach($featuredImages as $images){ $thumb = $images['thumb']; $fullImage = $images['full']; $links[] = "<a href='{$fullImage}' class='dfiImageLink'><img src='{$thumb}' alt='' height='{$height}' width='{$width}' /></a>"; } echo "<div class='dfiImages'>"; foreach($links as $link){ echo $link; } echo "<div style='clear:both'></div>"; echo "</div>"; } }
Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] Way to manually add a default number of modules?Hello samrdbarnes,
Thank you for using the plugin! Unfortunately you need to modify the plugin code to achieve what you want. I have added it in the to-do list and this option will be available in the future version of the plugin.
Thanks,
AnkitHello gian-ava,
Did you tried passing the post id along with the position?
For example$nth_image = $dynamic_featured_image -> get_nth_featured_image( 3, 5 );
where 3 is the position of the featured image and 5 is the post id. So it will basically fetch the second featured image from the post with an id of 5.And thanks for the feature request. Actually that feature is in the to-do list. Future version will allow users to add their custom title as the heading.
Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] Latest build of 3.0.0 is not working for me…?Thank you everyone for reporting the problem. I will hopefully provide some solution as soon as possible. Please provide any information that could be helpful.
This issue is also being discussed here.
Forum: Plugins
In reply to: [Dynamic Featured Image] Plugin Just Stopped WorkingThank you everyone for reporting the problem. I will hopefully provide some solution as soon as possible. Please provide any information that could be helpful.
This issue is also being discussed here.
Hello gian-ava,
There is a function called get_nth_featured_image() available from ver. 3.0.0 .
Is it what you are looking for?
Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] Accessing add_image_size in functionsHello vikkineal,
Thank you for using the plugin. I believe you can use wp_get_attachment_image_src( $attachment_id, $size, $icon ) to get the url of the custom size you added in functions.php. The
attachment_id
is returned by the plugin.Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] dfi_get_featured_images not workingHello icakeov,
There has been a major change in ver. 3.0.0. Please go through the documentation. The function
dfi_get_featured_images()
no longer exists.Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] Please explain version 3.0Hello Jenna,
The process for calling the data as an image is same as before. Try this:
if( class_exists('Dynamic_Featured_Image') ) { global $dynamic_featured_image; $featuredImages = $dynamic_featured_image->get_featured_images( $postId ); //You can now loop through the image to display them as required if( !is_null($featuredImages) ){ $links = array(); foreach($featuredImages as $images){ $thumb = $images['thumb']; $fullImage = $images['full']; $links[] = "<a href='{$fullImage}' class='dfiImageLink'><img src='{$thumb}' alt='' height='{$height}' width='{$width}' /></a>"; } echo "<div class='dfiImages'>"; foreach($links as $link){ echo $link; } echo "<div style='clear:both'></div>"; echo "</div>"; } }
Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] Latest build of 3.0.0 is not working for me…?Hello joshuairi,
Does your picture has proper guid in the database?
Forum: Plugins
In reply to: [Dynamic Featured Image] Installed into 3.8 and theme 2014 – not workingHello sixtyseven,
Nice idea! Since you have already provided the solution, how about being the contributor of the plugin? You can fork, make changes and send the pull request. This project can be found in github: https://github.com/ankitpokhrel/Dynamic-Featured-Image
Thanks,
AnkitForum: Reviews
In reply to: [Dynamic Featured Image] Works okHere you go! Ver. 3.0.0 has new media uploader ??
Forum: Reviews
In reply to: [Dynamic Featured Image] Uses old WP codeHere you go! Ver. 3.0.0 has new media uploader ??
Forum: Plugins
In reply to: [Dynamic Featured Image] HelpHello dutx12,
Thank you for using the plugin. Unfortunately there is no way to get the image from the post editor. One solution would be to set the featured image using remote url.
Thanks,
Ankit