WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Business Directory Plugin] Single view problems :-(

[Resolved] [Plugin: Business Directory Plugin] Single view problems :-(

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author businessdirectoryplugin

    @businessdirectoryplugin

    Hi tomsand,

    When you say you used the guide provided and set things up, can you elaborate on what you’ve done there?

    Also, what version of BD are you running?

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still – use the pastebin ]

    I copied my theme’s (thesis) index file into the three fils:
    – wpbusdirman-category.php
    – wpbusdirman-search.php
    – wpbusdirman-single.php

    And inserted these files into a folder named “single”

    Last I put this into my “custom_functions.php:

    /* BEGIN New function here to show business directory content WORKS*/
    function custom_single_dir_listing() {
    if (get_post_type() == 'wpbdm-directory')
    {
    print(wpbusdirman_post_main_image());
    print(wpbusdirman_post_extra_thumbnails());
    print(wpbusdirman_post_single_listing_details());
    }
    }
    add_action('thesis_hook_after_post', 'custom_single_dir_listing');
    /* END New function here to show business directory content WORKS*/ 
    
    /* BEGIN New function here to show business directory category Name WORKS*/
    function custom_category_dir_name() {
    print(wpbusdirman_catpage_title());
    }
    add_action('thesis_hook_before_content', 'custom_category_dir_name');
    /* END New function here to show business directory category Name WORKS */ 
    
    /* BEGIN New function here to show business directory content */
    function cust_cat_shortdisplay() {
    if (is_tax($wpbdmposttypecategory))
    {
    print(wpbusdirman_display_excerpt());
    }
    }
    add_action('thesis_hook_after_headline', 'cust_cat_shortdisplay');
    /* END New function here to show business directory content */ 
    
    /* BEGIN New function here to show business directory content */
    function cust_cat_searchpage() {
    if ( is_search() ) {
    print(wpbusdirman_display_excerpt());
    }
    }
    add_action('thesis_hook_after_headline', 'cust_cat_searchpage');
    /* END New function here to show business directory content */

    I too, am having what appears to be the same issue. The post entry is on the page twice:

    http://kansasseed.org/KSIA-directory/hnr

    From “wpbusdirman_single.php”

    <?php 	if (have_posts())
    	{
    		while (have_posts())
    		{
    			the_post();
    ?>

    I am going to try to remove the “the_post();” and see if that fixes it…

    I am running BD 2.0.5
    OK. Removing the line that said “the_post();” did not fix the issue.

    But, I think I can help out by saying that the ONLY listings I have a problem with are the ones I added/ edited in the Directory > Directory > Edit listing page (the one that looks like editing a regular plain ol’ wordpress post.)

    The ones I put into the directory and edited in the Directory Admin > Manage Form Fields > Preview Form > Add New Listing in a previous version of Business Directory Software have no problems.

    I think the previous software version was not even 2.0…it might have been JUST at 2.0…but I think the version was prior to that.

    I don’t know if that helps, but if you have old code revisions, you might be able to track down the difference between what was then and what is now.

    Tom. Your Thesis is running fine as far as I can tell. I also run Thesis. The issue, as far as I can tell is in the wpbusdirman-single.php….

    grnidone: and I kan se your directory is formated ok…

    I have thought it could be my wpbusman-single.php, but it only contains 11 lines so it should not be a problem:

    <?php
    /**
    * Cue the star of the show…
    *
    * @package Thesis
    */
    if (! defined(‘ABSPATH’))
    die(‘Do not access this file directly.’);

    thesis_html_framework();
    ?>

    Do this look like yours?

    Tom: Do you notice that you have data on the page twice? Once at the top which is not formatted and again below that is formatted?

    AAAH. I think I see what I was doing wrong: I just realized I was looking at the wpbusdirman-single.php which is in the

    /plugins/business-directory-plugin/posttemplate/wpbusdirman-single.php

    and NOT the

    /thesis_184/single/wpbusdirman-single.php file…

    Stupid mistake. Let me look at this again with the *right* file.

    Hmm. Still does not explain why my old stuff works and my new edits do not work.

    Hopefully businessdirectoryplugin can see a solution on our problem 🙂

    Plugin Author businessdirectoryplugin

    @businessdirectoryplugin

    Hi guys,

    I need to have my developer take a look at it. Not sure why this is happening.

    One thing I notice off hand is that both of you are using an older template name. The new single listing template is templates/business-directory-single.tpl.php.

    You might start with that instead, but I suspect the problem will end up being the same.

    2.0.4 had some template upgrades in it, that was one of them.

    Plugin Author businessdirectoryplugin

    @businessdirectoryplugin

    Also, have you guys browsed the new and updated customizing your theme doc here: http://businessdirectoryplugin.com/docs/matching-the-design-to-your-theme/

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Resolved] [Plugin: Business Directory Plugin] Single view problems :-(’ is closed to new replies.