Ankit Pokhrel
Forum Replies Created
-
Forum: Plugins
In reply to: [Dynamic Featured Image] To get featured images in a post loop?The lightbox will not automatically pick up your image. You need to apply your own logic to display the image in lightbox. The use of the plugin is to allow the user to set images in admin and get those image in the theme. Now its up to you on how to use the received image.
Forum: Plugins
In reply to: [Dynamic Featured Image] Website completely broken after installationOh sorry to hear that :(. The plugin just save image information in
postmeta
table. The meta key isdfiFeatured
. You can remove entries under metakeydfiFeatured
frompostmeta
table.If possible, please provide me the information on the wordpress version you are using and the list of plugins you are using. I think there might be conflict with some plugin. I will investigate the issue.
Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] To get featured images in a post loop?Hi,
Thank you for using the plugin. Can you provide more details?
Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] 2.0.1 Broke functionalityThat happens Nate. After all programming is not an easy job ;). Glad to know that it worked. I will add it in the documentation too.
Forum: Plugins
In reply to: [Dynamic Featured Image] 2.0.1 Broke functionalityI replaced the text link with image in ver 2.0.1. Does the plugin folder has images after upgrade? Can you clear the cache and check it again? Also is the firebug console showing any kind of javascript conflict?
I checked it in ver 3.7.1 by upgrading it from 2.0.0 to 2.0.1 but it is working good. I will check for the issue in detail and will get back to you as soon as possible. Sorry for the trouble you guys are facing.
Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] 2.0.1 Broke functionalityCan you provide more details? And from which version you updated?
Forum: Plugins
In reply to: [Dynamic Featured Image] Integration TroublesHi,
If its possible please attach and send me your theme folder to
[email protected]
. Also let me know the WordPress version you are using. I would love to help you but i cannot do anything without checking the issue manually.Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] Integration TroublesHi,
The problem is completely related to your coding issues. The plugin is working as it should. The
alt
field is empty because you need to set thealt
field of the image in media library. Regarding empty source, try attaching the featured image by removing previous one. This usually happens if you delete the image you attached previously. Its attachment id will no longer exist or may be the medium thumbnail was not created for that image.The link you provided is broken. You need to use debugging techniques to find the issue.
Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] Integration TroublesI guess you are little confused with the proper implementation of the plugin. Try following code:
<?php $attachments = dfi_get_featured_images($post->ID); foreach($attachments as $attachment) { $medium_img_url = dfi_get_image_url( $attachment['attachment_id'], 'medium' ); ?> <li> <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 } ?> </ul> </div> <?php } else { ?> <a class="gall-img entry-image" href="<?php the_permalink() ?>" style="margin-bottom: 0;"> <?php the_post_thumbnail('featured_list_image'); ?> </a> <?php } ?>
Forum: Plugins
In reply to: [Dynamic Featured Image] Integration TroublesLooks like the error message is because of a typo. It’s
attachment_id
not “attatchment_id”. Can you fix the typo and let me know if it fixed it or not?Forum: Plugins
In reply to: [Dynamic Featured Image] Integration TroublesHi,
Thank your using the plugin. I guess you are already inside a loop so you can just call the function like this:
$attachments= dfi_get_featured_images( $post->ID );
and to get the medium image url you can use following function:
$medium_img_urls = dfi_get_image_url( $attachments['attachment_id'], 'medium' );
You can learn more about these functions at https://github.com/ankitpokhrel/Dynamic-Featured-Image/wiki/Available-Functions
You may also find this blog useful: https://ankitpokhrel.com.np/blog/
Forum: Plugins
In reply to: [Dynamic Featured Image] Featured image don't show in postYou need to fetch the featured image and display it in your bolg manually. The next version will have the feature to automatically display the data. For now you need to do it manually. To display the image in single blog post you can add following code in your
single.php
.if( function_exists('dfi_get_featured_images') ){ $featuredImages = dfi_get_featured_images(); //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] Twentythirteen childtheme images in loop errorHi Thomas,
Thank you for using my plugin :). Could you send me your
page.php
file at[email protected]
so that i can examine it? I guess you are using loop inside a loop.Thanks,
AnkitForum: Plugins
In reply to: [Dynamic Featured Image] No "Featured Image" optionThank you for contacting. Your problem seems to be a theme specific problem. The plugin is independent of default or main featured image. It looks like your theme haven’t enabled featured image functionality. In order to enable featured image functionality to your theme you can add
add_theme_support( 'post-thumbnails' )
in your functions.php file. You can refer this tutorial for that.The featured image you are referring in the screenshot needs to be enabled by the theme. Sorry that you were confused by that screenshot. Refer the third screenshot, there is no main featured image in the screen shot. There is “Featured image 2” and a mouse clicking “Add new” link to generate next featured image “Featured image 3”. That’s exactly the plugin is for.
Please remember that this plugin only simulates the functionality of featured image dynamically. You can add multiple featured image dynamically and get it in your theme using some simple functions (See documentation here).
The shortcode and fancybox functionality will be available in next version of the plugin.
If you have any problem with the plugin, do contact me.
Forum: Reviews
In reply to: [Dynamic Featured Image] it worksThanks for the review ??