WordPress.org

Ready to get started?Download WordPress

Forums

Business Directory Plugin
[resolved] display one category and subcategories (14 posts)

  1. fercho74
    Member
    Posted 1 year ago #

    i need do this...
    When i click in one category in the main page, i need list the subcategories, then the sticky posts , then the posts...
    there is some way to show the subcategories in a sidebay or in a menu?
    Im editing businessdirectory-category.php to matching my theme...

    Example: this are my main categories
    Cars - Jobs -....

    when i click in Jobs...
    Design - Computers - Freelance...
    stikys post
    .....
    Regular post
    .....

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

  2. businessdirectoryplugin
    Member
    Plugin Author

    Posted 1 year ago #

    There's a tidbit about displaying categories in a dropdown in this article about customizing the plugin here:

    http://businessdirectoryplugin.com/support-forum/faq/customizing-bd-to-fit-your-theme/

    See if that helps.

  3. glassraven
    Member
    Posted 1 year ago #

    I'm also trying to sort this - On the main page of the directory it only displays the top level categories.

    When a user clicks into the category I would like them to see the subcategories at the top and then the listings underneath - but I can't find a way of displaying the subcategories. Are there any functions I can call which get the subcategories of the current category in the template file?

    Thanks,
    Sadie

  4. businessdirectoryplugin
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Sadie,

    No, we don't expose that granularity of information in the plugin right now. To do what you're looking for, you'll need to hack the plugin directly.

  5. glassraven
    Member
    Posted 1 year ago #

    I was looking to see where the subcategories were formed but couldn't find the code for it, so I've simulated it with CSS instead until I have more time to work on it:
    http://www.mumpreneuruk.com/blog/business-directory/

    :) Sadie

  6. miroslav123
    Member
    Posted 1 year ago #

    Hi there,

    I am looking for the same thing, I see on your website that you manage to implement it. Can you share how did you solve it?
    Also I think this would be nice addition to BD plugin since lot of sites can have category tree structure and this would make much better overview.

    Kind regards,
    Miroslav

  7. glassraven
    Member
    Posted 1 year ago #

    Hi Miroslav,

    I ended up using CSS to hide the subcategories on the main directory page - so the directory is set to show child categories in the settings -but then I override it and use display:none; for the child list in the CSS. This is not ideal, but it was the best solution I had to achieve what was needed.

    I heavily customised the CSS of the directory to get the layout and design to look right within the website in the website linked above.
    I hope this helps.
    Sadie

  8. businessdirectoryplugin
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Sadie,

    Great site BTW. Would you like to be on the BD Showcase? That's some pretty amazing work you've done there. It deserves to be shown off!

  9. miroslav123
    Member
    Posted 1 year ago #

    Thanks a lot for quick response Sadie, you done great job, but I think I'll try to code something although I am new to wordpress
    Kind regards,
    Miroslav

  10. glassraven
    Member
    Posted 1 year ago #

    Hiya,

    I'm sure they would love to be featured in the showcase, just waiting for client sign off on another project which will likely use the directory so I'll be delving back into the CSS customisation soon :)

    Miroslav - let me know if you want me to post the specific CSS that did the customisation above if you need it.
    Sadie

  11. miroslav123
    Member
    Posted 1 year ago #

    Hi Sadie,

    Please post it, if its not to much trouble for you.
    Kind regards,
    Miroslav

  12. glassraven
    Member
    Posted 12 months ago #

    No problem, I added the following into the wpbdp_custom_style.css file in the custom theme folder:

    .wpbdp-main-page ul.children { display:none }

    This is the single bit of code that hides the subcategories on the homepage of the directory. I've then got various other styles that control the layout and design of this page and the listings pages etc.

  13. miroslav123
    Member
    Posted 12 months ago #

    Thanks a lot Sadie,

    In latest version of BD plugin you are able to select option 'Show only parent categories in category list?' which would hide all subcategories on main page, but I am more interested who did you manage to display subcategories when you select one of parent categories?
    So for example when you select Baby & Kids you have a list of subcategories: Baby Essentials, Fashion, Furniture etc. which is not the case on my website (only listing of top category is displayed but I can't select any sub-category)?

    Kind regards,
    Miroslav

  14. glassraven
    Member
    Posted 12 months ago #

    Hiya

    In order to get the functionality I used you need to have the 'show parent categories in category list' not ticked. This means that when you go into the subcategories it lists the child categories - but the CSS I posted hides them on the main page.

    Hope this helps
    Sadie

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.