canwild
Forum Replies Created
-
businessdirectoryplugin – Check out https://wordpress.stackexchange.com/questions/578/adding-a-taxonomy-filter-to-admin-list-for-a-custom-post-type for adding filtering for custom post types. I believe this is the type of added functionality that nathmie is seeking.
Normally you want “the_excerpt()” to appear in the “excerpt” view (e.g., View Listings) and “the_content()” to appear in the “single” view (e.g., View Listing). As WPBDP is currently coded, the “single” view includes both “the_excerpt()” and “the_content()”.
From a business perspective there are potentially other items when you may wish to display a short code in the “excerpt” view and more detail in the “single” view. Perhaps an note or icon in the “excerpt” view to indicate that the “single” view includes a detailed map, video, more photos, etc.
For each form field, you may want the option to specify if the field is to be displayed in the “excerpt only”, “single only”, or “both”. Ideally, you may also want the option to display the “excerpt” fields in a different order than the “single” fields.
I think WPBDP does provide a way to display individual form fields so all of this can already be accomplished through more complex templates. However, I am not sure if the info on https://businessdirectoryplugin.com/docs/matching-the-design-to-your-theme/ is up to date since it refers to “wpbusdirman” functions which I believe have been deprecated.As a workaround, I ended up using an HTML Parser to remove the “excerpt” div from $listing_fields in my “businessdirectory-listing” template. Is there a better way to do this?
I found “businessdirectory-listing” on line 479 of api.php as part of the “_wpbdp_render_single” function. However, it is called with “false” as one of its parameters so it was not overridden by the custom “businessdirectory-listing” in my template’s /single directory.
I changed “false” to “true” in line 479 so it used my custom template.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();”
Why are stickies excluded when browsing a category?
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 https://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.Thanks. I resolved my issue by using wp user functions and only displaying the Login Radius button when there is no current logged in user.
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.
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?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?Thanks – Correct me if I am wrong, but it looks like 2.1 does not use a template to render the sticky listings.
Thanks.
Can this be formatted so it doesn’t display the avatar and displays wording like “Logged in as:”?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.
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.