Skip to:

What script file is do_action( ’bp_after_sidebar_me’ ) located in? [Closed]

  • I am using a dynamic widget / text widget that will not show up in a page I have coded as a blog list in the template.

    I need to find the script for `do_action( ‘bp_after_sidebar_me’ )` so I can hard code my widget.

    Not the best solution but I have spent 3 days tweaking the dynamic widget and simply conclude that the sidebar does not work when I code a template as a blog page.

    Thanks for helping.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Profile photo of EyeMagicGraphics


    Have you tried “Conditional Logic” ( There’s also a “Dynamic Widgets” plugin ( I’ve found that works well!

    Thanks @EyeMagicGraphics — I am using the Dynamic Widgets plug-in. It has a very peculiar glitch in it.

    I created a static text widget in WP. Then I use Dynamic Widgets to have the static text widget appear only on a certain page and all of its child pages.

    The glitch is that (from every WP & DynWidg setting I have tried) I can only get the text widget to appear on the child ages. I cannot get it to appear on the parent page.

    So I give up after 4-5 days of effort and just want to go into the production of the sidebar code and hard code my widget.

    I’ll have a look at your suggestion on “Conditional Logic” and see where that leads me.

    Profile photo of Roger Coathup
    Roger Coathup


    @frank13 — there is no specific script for a do_action ( ‘abc123’ );

    You have to register functions (hooks) that are invoked by the do_action — check out these pages from the WordPress Codex for more information on programming actions:

    Thanks @RogerCoathup…poorly phrased question on my part.

    I am looking for the code file or source document in WP/BP that contains the function `do_action( ‘bp_after_sidebar_me’ )`

    Profile photo of Roger Coathup
    Roger Coathup


    it’s not a function itself… it’s a call to the do_action() function, passing ‘bp_after_sidebar_me’ as the parameter. The call is being made in sidebar.php in the bp-default template folder.

    You can find these things by searching through a buddypress install in any good code editor / development environment.

    do_action() itself is defined in the core WordPress files. In this case, do_action() will invoke any functions that you hook onto the bp_after_sidebar_me action.

    Profile photo of valuser


    Thanks again @RogerCoathup.

    I continue to phrase my need very poorly.

    I know about functions, calls, etc. I also know where `do_action( ‘bp_after_sidebar_me’ )` is located…that’s how I honed in on needing to track it down.

    Here’s what I need to do:
    I need to get in the process when `’bp_after_sidebar_me’` is happening as a result of the `do_action()` call.

    I need to add some hard coding when this process is taking place.

    So it’s the location/file/script/doc (whatever it ends up being called) within WP that I am looking for when `do_action( ‘bp_after_sidebar_me’ )` is happening.

    Continuing to dig :)

    Profile photo of Roger Coathup
    Roger Coathup


    Then you need to add an action that hooks in the function you want to run:

    add_action ( ‘bp_after_sidebar_me’, ‘my_function’ );

    If you read the link I gave earlier, it explains how this action whole process works.

    Here’s why I need to get into the code @RogerCoathup:

    I have a page called Business.

    Off Business, I have about 10 child pages.

    I created a static-text widget. I used every conceivable settings combination within Dynamic Widgets to get the static-text widget to appear in the right-sidebar of Business and all of its Child Pages.

    The widget is positioned in the middle of the right sidebar — not the top and not the bottom.

    I can only get the static-text widget to appear on the Child Pages. Not the parent page.

    So I give up and want to hard code it within the process of the right-sidebar build.

    How does adding my own function get me to where I want to be?

    I simply need to get to the script that produces that right sidebar so I can hard code my content.

    I have no idea what I would even code in my won function to make this happen.

    Gave up and hard coded inside the sidebar.php template

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘What script file is do_action( ’bp_after_sidebar_me’ ) located in? [Closed]’ is closed to new replies.
Skip to toolbar