WordPress.org

Forums

Business Directory Plugin
[resolved] Single view problems :-( (12 posts)

  1. tomsand
    Member
    Posted 3 years ago #

    Im working on setting the plugin up but have a problem with single view!

    I have used the guide provided and everything else looks ok, but not single view. One example: http://dropshipbase.dk/dropshipper-kartotek/cph-afflicted/

    It's just like the page forgets its width?

    Any one know a solution for this problem?

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

  2. businessdirectoryplugin
    Member
    Plugin Author

    Posted 3 years ago #

    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?

  3. tomsand
    Member
    Posted 3 years ago #

    [ 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 */
  4. grnidone
    Member
    Posted 3 years ago #

    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...

  5. grnidone
    Member
    Posted 3 years ago #

    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.

  6. grnidone
    Member
    Posted 3 years ago #

    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....

  7. tomsand
    Member
    Posted 3 years ago #

    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?

  8. grnidone
    Member
    Posted 3 years ago #

    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.

  9. grnidone
    Member
    Posted 3 years ago #

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

  10. tomsand
    Member
    Posted 3 years ago #

    Hopefully businessdirectoryplugin can see a solution on our problem :-)

  11. businessdirectoryplugin
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  12. businessdirectoryplugin
    Member
    Plugin Author

    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Business Directory Plugin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.