WordPress.org

Ready to get started?Download WordPress

Forums

Business Directory Plugin
[resolved] Thumbnail image not working (24 posts)

  1. canwild
    Member
    Posted 2 years ago #

    Version 2.0.5
    When I upload an image for a listing and specify that I want it to be the listing thumbnail, it is not set as the Featured Image in WP for that listing. As a result the listing displays with the default image. I have to manually edit the listing in WP to set the image as the Featured Image.

    http://wordpress.org/extend/plugins/business-directory-plugin/

  2. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    Hi canwild,

    Can you try to update to 2.1 and try this again? If it's still an issue, please post some specific info about the listing--a link would help.

  3. canwild
    Member
    Posted 2 years ago #

    I cannot upgrade to 2.1 because it does not render my theme correctly. In particular, I modified wpbusdirman_sticky_loop in 2.0.5 to properly render my featured (sticky) listings. The existing wpbusdirman_sticky_loop renders the listing using wpbdp_the_listing_excerpt but I need to render each field separately. WPBD supports separate field formatting for regular listings but not for sticky listings. I see wpbusdirman_sticky_loop has now been moved to deprecated.php and was surprised to see it still being used in your businessdirectory-category.tpl.php template and referenced in your documentation.
    My site is http://wildernesstravelguide.com

  4. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    The new upgrade has a major revamp of the display system. It's now page based, with template includes (and simpler templates), instead of just template-based, which meant you had lots of customization work to do before to make it look good.

    Try this: Install 2.1, and temporarily remove your template customizations from your theme directory. Does it look better then? The customizations you have will be included by 2.1, even though they may no longer be necessary.

  5. canwild
    Member
    Posted 2 years ago #

    Looking more closely at wpbusdirman_sticky_loop in deprecated.php, I see it now uses wpbdp_the_listing_excerpt now where it used wpbusdirman_post_excerpt in 2.0.5. This looks similar to the modification I made to the function in 2.0.5 so my sticky listings could be rendered using a listing template.
    Is there something like "is_sticky()" that I can use in the listing template to provide specific formatting for my sticky listings?

  6. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    Let me check with my developer--we did make some upgrades in this area, but the specific API I'm not sure about now since it's brand new.

  7. canwild
    Member
    Posted 2 years ago #

    I installed 2.1 and changed /single to /single-205 in my themes folder to hide my template customizations. My site now shows no listings on the main page or the category pages. Search results display correctly and similar listings appear correctly when I click on a tag. Nothing displays when I click on a listing for more details or try to edit a listing. The Manage Listings and Submit A Listing pages do display correctly.

  8. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    So I poked around a bit. Clicking a category like this: http://wildernesstravelguide.com/?category=horseback-trips

    show an empty page. The listings all come up fine for me. I can't edit any listing so I can't speak to that.

    Can you turn on permalinks for your site to see if that changes the display behavior at all? Use something like /%category%/%postname%/ for a non-default structure, just to test.

  9. canwild
    Member
    Posted 2 years ago #

    The listings do appear now on the main page but they are not formatted correctly. If you search the site for something like "canada" you will see the listings displayed as they should be. This is the way they were displaying on the home page and in the categories before I upgraded to 2.1.
    I have added my businessdirectory-category.tpl.php template now so the category listings appear. The sticky listings have the default formatting and appear underneath the regular listings which are formatted correctly.

  10. canwild
    Member
    Posted 2 years ago #

    I have downgraded my site to 2.0.5 so you can see how it supposed to work. I will have to look at the templates for 2.1 and see if I can format my listings correctly before upgrading.

    I think I found the reason for my confusion about the thumbnail images. WPBD does not use the listing's "Featured Image" as its thumbnail, but my theme does. WPBD has its own code for handling each listing's images.

  11. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    Ah--you did some heavy customizations to the listing page. Yeah, I see that now.

    You may need to revisit the template upgrades with 2.1. You should start with the new businessdirectory-listings.tpl.php that is in the templates/ directory as a starting point. From there, you can look what you did in your old one and make the changes accordingly.

  12. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    Heard back from my developer:

    In the new templates all sticky posts would come with a "sticky" class set for their container DIV. The new "businessdirectory-listing.tpl.php" (which handles the listing single
    view) also supports a $is_sticky variable that is set to TRUE if the
    listing is featured/sticky. It is used in the default template code,
    in fact to check if we should show the "Featured" image along with the
    listing.

  13. canwild
    Member
    Posted 2 years ago #

    Thanks - Correct me if I am wrong, but it looks like 2.1 does not use a template to render the sticky listings.

  14. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    The system is different now. 2.1 does include 2 templates, one for the listings view and one for the single listing view. They are displayed in the context of a page from your theme, which greatly improves how much work you need to do to make BD look like part of your site. You can customize the layout of those two pages easily now with templates. We will probably add others later, but those are the two we allow to start with.

  15. canwild
    Member
    Posted 2 years ago #

    Thanks. When customizing WPBD I had the following problems in 2.0.5 which required modification to the code rather than just the templates. They are not major, but it looks like I will need to make similar modifications to 2.1.

    1. Sticky or featured listings.
    These are not rendered using the businessdirectory-listings template so they cannot be customized like the regular listings. I had to modify the sticky_loop function to render these using my own sticky-listings template.

    2. Random order listings.
    Required changes to wpbusdirman.php to set the orderby to rand. This could also be achieved by adding a random option in the settings.

    4. Pagination
    My theme uses infinite scroll so I had to remove the pagination of the sticky listings in wpbusdirman.php which were rendered using a different query loop.

    5. Changing "Listings" to a different term.
    I wanted to call my listings something other than "Listings". This required many changes to view.php and wpbusdirman.php. It did not appear to be achievable through changes to the language file.

    6. Changes to the templates for adding and managing their listings.
    I made changes to various back-end templates like manage-listings in the plug-in /template directory. These templates were not overridden by similar named templates in my theme's /single directory.

    7.Customizing my index page.
    I used businessdirectory-main-page-categories to customize my main page. Does 2.1 remove this template?

  16. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    I will need to check with my developer for these. Will get back to you ASAP.

    We did workaround the problem we found on your site--there is an old WordPress bug about using pages for your main site page that bit us here (http://core.trac.wordpress.org/ticket/16373) that we need fixed to really get past it, but we did the best we could given that it exists. We have that fix for 2.1.1, releasing ASAP.

  17. canwild
    Member
    Posted 2 years ago #

    Thanks.
    I have upgraded to 2.1 and set all my listings to normal for now to avoid issues with sticky listings.
    I have added the name of the template to each listing so I can see how they are generated.
    My main page works okay and is generated by "businessdirectory-listings". My categories work fine and are generated by "businessdirectory-categories".
    My View Listings does not display anything and Manage Listings uses the "businessdirectory-listings" template which is not correct for my site.
    Search results appear to include pages now. Is there a way to suppress this?

  18. canwild
    Member
    Posted 2 years ago #

    My main page (generated by [WPBUSDIRMANUI]) uses my "businessdirectory-main-page-categories" template and works fine. It displays the same as ViewListings should on my site. I basically copied the code from the view_listings function in views.php to create my "businessdirectory-main-page-categories" template so I am not sure why View Listings doesn't work.

  19. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    View listings is affected by a bug that I just released as a fix in 2.1.1. Try that version instead.

  20. canwild
    Member
    Posted 2 years ago #

    Version 2.1.1 works fine now for View Listings. My "businessdirectory-category" template is a duplicate of my "businessdirectory-listings" template with "get_header();" function added at the top. Both templates use a "get_footer();" function at the end.
    Your documentation on http://businessdirectoryplugin.com/docs/matching-the-design-to-your-theme/ says not to use these functions in the templates but mine don't work without them.

  21. canwild
    Member
    Posted 2 years ago #

    Why are stickies excluded when browsing a category?

  22. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    I will have to update the documentation shortly because some things have changed. We're still in bug fix mode yet.

    I'm not sure I understand your second question--featured ads should be part of a category if they belong to that category. Are you seeing something different? Can you provide links and which listing seems to be missing? Is it really gone, or just not sorting at the top?

  23. canwild
    Member
    Posted 2 years ago #

    Version 2.1.2
    Sorry, it looks like your default "businessdirectory-category" template calls the "wpbusdirman_sticky_loop" function. I added this to my catergory template and my categories now show the featured ads correctly.

    The category paging using "wpbusmandir_sticky_loop" works but is interesting . I have 22 listings, 11 featured and 11 normal. I get 10 featured and 10 normal on page 1, and 1 featured and 1 normal on page 2. Also a message is displayed saying no listings in category if all the listings in the category are featured.

    The paging using "wpbdp_sticky_loop" for View Listings page doesn't appear to work correctly. I get the first 5 featured ads and 10 normal ads on page 1, the same 5 featured ads and the 11th normal ad are then repeated on each successive page.

    I need a way to render my featured ads using a template instead of just rendering them using "_wpbdp_render_excerpt();"

  24. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    OK, we're going to look into it--can you resend access to the site again? http://businessdirectoryplugin.com/contact/ And please link to this forum post.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.