Adding widgets to centre of buddypress fun

Hi

How do I add content (or widgets) to the centre of my buddypress fun theme?

Please see attached image for where I mean. I’m hoping this will also fix the problem I have here; https://premium.wpmudev.org/forums/topic/why-dont-categories-display-on-classifieds-page

I can’t seem to get anything to this part of the site on any page except for blog posts.

Am I able to add widgets to this area on different pages/sections of my site, to allow me to have a summary of classifeds categories at the top of my classifieds page?

Also, when I add any widgets to the left, centre or right column in my theme, nothing changes on any pages. What are these supposed to be for? Only blog sidebar, buddypress right and bbpress sidebar actually add widgets.

Thanks.

  • aristath
    • Recruit

    Hello again @sally,

    You will probably have to create a child theme in order to achieve what you’re after.

    You can create your own child theme by following the instructions here: http://codex.wordpress.org/Child_Themes

    Then simply copy the main theme’s header.php file to your child theme and add a new custom sidebar to that using the instructions here: http://codex.wordpress.org/Widgetizing_Themes

    I hope that helps!

    Cheers,

    Ari.

  • Sally
    • The Crimson Coder

    Thanks Ari

    Have created a child theme following all instructions up to adding a new custom sidebar.

    I have a question. You mentioned copying the main themes header.php file to my child theme, which I did using cpanel, but my main theme also has loads of other files which are now not in the child theme. Should I copy them all? I’ve just counted 38 files in the parent theme compared to just 2 in the child theme.

    As a result, the functions.php file is missing from the child theme. So I can’t add the code to it in the instructions on how to widgetize themes.

    Thanks

    Sally

  • Sally
    • The Crimson Coder

    Update;

    I’ve created a file in my child theme folder called functions.php and inserted;

    <?php

    /**

    * Register our sidebars and widgetized areas.

    *

    */

    function arphabet_widgets_init() {

    register_sidebar( array(

    ‘name’ => ‘Home right sidebar’,

    ‘id’ => ‘home_right_1’,

    ‘before_widget’ => ‘<div>’,

    ‘after_widget’ => ‘</div>’,

    ‘before_title’ => ‘<h2 class=”rounded”>’,

    ‘after_title’ => ‘</h2>’,

    ) );

    }

    add_action( ‘widgets_init’, ‘arphabet_widgets_init’ );

    ?>

    That’s all I have in the functions.php file, is that correct?

    Now the only thing which has changed is ‘home right sidebar’ has appeared in appearances>widgets, but when I put a widget in there nothing happens, same as nothing ever happens when I put anything into the ‘left column, centre column or right column’ widget areas. Why is this?

    The instructions on the page you gave me seem to stop at adding the code to the functions.php file. I still can’t seem to work out how to add a widget area to the very centre of the page (ie not a sidebar)

    Everything I can find online tells me how to add another sidebar area.

    Thanks

    Sally

  • Jack Kitterhing
    • Code Norris

    Hi there @sally,

    Hope you’re well today and thanks for the additional information.

    If you want to widgets to a page, you’d be best using a plugin for this, rather than trying to add a sidebar within the center.

    Try this plugin here http://wordpress.org/plugins/widgetize-pages-light/ :slight_smile:

    Or there’s a tutorial here http://www.wpbeginner.com/plugins/how-to-add-wordpress-widgets-in-post-and-page-content/ which will also achieve what you need :slight_smile:

    Thanks!

    Kind Regards

    Jack.

  • aristath
    • Recruit

    I have a question. You mentioned copying the main themes header.php file to my child theme, which I did using cpanel, but my main theme also has loads of other files which are now not in the child theme. Should I copy them all? I’ve just counted 38 files in the parent theme compared to just 2 in the child theme.

    If a file does not exist in the child theme, the file from the parent theme is used. So no, you don’t have to copy all of them. Just the stuff that you want to override.

    Now the only thing which has changed is ‘home right sidebar’ has appeared in appearances>widgets, but when I put a widget in there nothing happens, same as nothing ever happens when I put anything into the ‘left column, centre column or right column’ widget areas. Why is this?

    The code you added in your functions.php file registers the sidebar.

    Now you’ll have to add the sidebar in a file to make it show up.

    You can try adding it to your header.php for example to see if it shows up.

    <?php dynamic_sidebar( 'home_right_1' ); ?>

    I hope that helps!

    Cheers,

    Ari.

  • Sally
    • The Crimson Coder

    Thanks Ari, think I understand all that now.

    As for the classifieds categories, I’m still having no joy. I’ve followed the instructions to the letter, they all make sense. I’ve gone through them again and again but still no joy.

    All I want is for this page Link removed at members request to display a little box which lists the categories of classifieds available in the very space where there is currently a test classified. Then I just want the classifieds to begin below that. Or even just scrap all that and just have a list of classifieds categories on the main part of the page along with a search form to find what they are looking for, but when I follow these instructions, nothing whatsoever appears.

    I don’t understand why inserting a shortcode results in nothing? Is there something wrong with my site?

    Thanks

  • Sally
    • The Crimson Coder

    I seem to be having a bit of an issue with adding widgets to the centre still.

    I’m using ‘amr shortcode any widget’ plugin to try to get a search function added to the top centre of the page Link removed at members request but it’s just saying I need to debug.

    I’ve tried all the options I’m told to try eg

    [do_widget classifiedssearch]

    [do_widget “classifiedssearch”]

    Even tried the weird code given in the debug – [do_widget facetious_widget-5] Don’t even know why it would be called that! I named it classifiedssearch but nothing is making it work.

    Any clues? :disappointed:

  • Sally
    • The Crimson Coder

    Hi Jack

    Yes it is, it’s this page; Link removed at members request

    Also having a problem with the equivilent page for the directory plugin at Link removed at members request

    Both pages I’ve created in order to make the classifieds/directory category shortcodes display.

    Thanks

    Sally

  • Jack Kitterhing
    • Code Norris

    Hi there Sally,

    Hope you’re well today and thanks for that :slight_smile:

    I’ve taken a look at this and it isn’t working for me on your site or my test site, I’ve checked the widget name is correct and I’ve tried with the widget ID’s from the debug info, yet it doesn’t work at all.

    I did see the plugin hasn’t been updated in a while which could be the reason :slight_frown:

    Thanks!

    Kind Regards

    Jack.

  • Sally
    • The Crimson Coder

    Hi Jack

    Thanks for that, installed it and it works, except for I can’t select more than one option ie I can’t allow people to search by category and location. I tried holding ctrl down and highlighting both options, but it doesnt allow me to do more than one.

    Is there a way around this?

    Thanks

    Sally

  • Sally
    • The Crimson Coder

    Hi Jack

    Thanks for replying

    Whatever caused this issue was caused by something I did during trying to add a menu to my footer, as shown in this thread https://premium.wpmudev.org/forums/topic/adding-a-footer-menu-to-buddypress-fun

    I think basically I’ve messed up some code somewhere when I added to the child theme? But I’m not sure what. I’m just waiting for some help on that thread to try to find out at the moment :slight_frown:

    Thanks

    Sally

  • Sally
    • The Crimson Coder

    Hi

    I’ve now managed to fix the issue with the faulty code, so I’m back to trying to fix this taxonomy issue again now.

    Is anyone able to look at my back end to see if I have taxonomies set up correctly please?

    The locations taxonomy is still not displaying anywhere I try to add it in drop down search widgets.

    Thanks

    Sally

  • Sally
    • The Crimson Coder

    Hi Ari

    Yes still very much stuck on this and still needing help I’m afraid.

    Jack, I thought of that too, but it won’t allow me to tick the box to allow it to be used by WP plugins. It’s kind of faded out. Why would this be?

    Thanks

    Sally

  • Sally
    • The Crimson Coder

    Hi Jack

    Thanks for explaining that

    Have redone the custom field, and created a new taxonomy. It still doesnt appear to work.

    Also, every time I create a taxonomy for either the classifieds or the directory, they seem to overwrite each other. I never noticed this before, I used to have 2 I’m sure?

    I presume its because they both have the same names, but I do need a locations drop down for both plugins.

    Do you have any idea what I could still be doing wrong? I’m initially trying to get the directory one fixed, then I’ll try to get the classified one working.

    Feel free to log in to my site and take a look :slight_smile:

    Thanks

    Sally

  • Jack Kitterhing
    • Code Norris

    Hi there Sally,

    Hope you’re well today.

    I’ve just checked and can see you have two custom fields named location and one taxonomy named location for directory.

    Was you looking to use both taxonomies and custom fields with two locations each, (1 per post type?)

    Please advise :slight_smile:

    Thanks!

    Kind Regards

    Jack.

  • Sally
    • The Crimson Coder

    Hi Jack

    To be honest, I’m really not sure!

    I’ve not really got any experience with taxonomies and everything you see there is just my attempt to get it to work, but I have no real idea whether what I’m doing is wrong or right! How should it be set up?

    All I want is for users to be able to select one location in each case when adding a directory or classified listing (and select one location in one drop down location list when searching either directory or classifieds)

    Thanks

    Sally

  • Jack Kitterhing
    • Code Norris

    Hi there Sally,

    Hope you’re well today and thanks for the additional information.

    A taxonomy, is a tag or category, that is filterable, a custom field, is more of a meta display field, to display the information on the front-end.

    It sounds like you may want a custom drop down field?

    Thanks!

    Kind Regards

    Jack

  • Sally
    • The Crimson Coder

    Hi Jack

    Yes I have a drop down custom field called location which is a directory listing type, and I have a taxonomy drill down widget displayed on my home page which has both the directory listing and locations taxonomies ticked to display there, but only the directory listing does actually show up on the front end.

    This is what my problem has been for about 2 weeks now and I’ve tried to get answers to why it’s doing this in a couple of different threads but not got anywhere yet :slight_frown:

    Thanks

    Sally

  • Jack Kitterhing
    • Code Norris

    Hi there Sally,

    Hope you’re well today, sorry about the delay.

    Thanks for the additional information, don’t worry we’ll get this sorted :slight_smile:

    Do you have a plan of where the locations should show and how it should be displayed? I.e, should they display on the listing as a dropdown, or should it be a radio button etc.

    Let me know, the locations and a few of the locations name and I’ll add them as you need, then you can just add the additional locations to the field :slight_smile:

    Thanks!

    Kind Regards

    Jack.

  • Sally
    • The Crimson Coder

    Hi Jack

    Ok, for example, directory;

    I have ‘Taxonomy Drill-down’ widget running on the right hand side of that homepage, and it should be displaying ‘Listing Categories’ (which it does in a drop down menu) and directly underneath that it should have the locations drop down, which is ticked in the back end but doesnt display at all.

    The actual locations (as can be seen in my custom field called ‘Location’:wink: begin with Bedfordshire, Berkshire and Bristol, and there are several others. If you log in to my back end you can see all this and as far as I know it’s all already set up correctly, am I wrong?

  • Jack Kitterhing
    • Code Norris

    Hi there Sally,

    Hope you’re well today, that drilldown takes the locations from the taxonomy, the custom field is a separate part.

    I see you have some locations added to the taxonomy, I’ve edited the taxonomy and now if you add something to the location, the drill down should show front-end, from what I could see, if the locations were empty it won’t show.

    Thanks!

    Kind Regards

    Jack.

  • Sally
    • The Crimson Coder

    Hi Jack

    Thanks for getting back to me.

    Where exactly do I add something to the location? The only place I can see to actually add any areas to a drop down menu is within the custom field called ‘Location’.

    The taxonomy called location doesn’t have any actual space to add areas ie berkshire, bristol that I can see, but maybe I’m missing something obvious?

    I specifically want to be able to give users a drop down choice of areas to choose from when they add a directory listing, otherwise I just end up with a mishmash of towns,cities and suburbs, hence the reason I put those areas in the custom field called Location myself for users to choose from.

    At the moment, I’m having trouble getting to any part of the directory listing page to see if anything’s changed there due to the issues I’m having with https://premium.wpmudev.org/forums/topic/blocking-url-not-working-for-directory so if you can’t see the listing page at the moment, this is why, but would be good to get all this working today :slight_smile:

    Thanks

    Sally

  • Sally
    • The Crimson Coder

    Hi Jack

    Thank you! Finally have locations listed in the widget on the home page :slight_smile:

    Only thing is, since doing this, this has happened to my listings page; Link removed at members request

    Where there should be things like dog beds and dog crates there are now various locations instead :disappointed:

    What have I done wrong?!

    Thanks :slight_smile:

    Sally

  • Sally
    • The Crimson Coder

    Hi again Jack

    I appear to have somehow fixed this whilst playing with my taxonomies, even though I wasn’t actually trying to fix this problem lol – no idea what I did right! But it’s fixed anyway, so just marking as resolved :slight_smile:

    Thanks again

    Sally

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.