Skip to:
Content
Pages
Categories
Search
Top
Bottom

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

  • Avatar of frank thirteen
    frank thirteen
    Member

    @frank13

    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)
  • Avatar of EyeMagicGraphics
    EyeMagicGraphics
    Member

    @eyemagicgraphics

    Have you tried “Conditional Logic” (http://codex.wordpress.org/Conditional_Tags)? There’s also a “Dynamic Widgets” plugin (http://wordpress.org/extend/plugins/search.php?q=Dynamic+Widgets) I’ve found that works well!

    Avatar of frank thirteen
    frank thirteen
    Member

    @frank13

    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.

    Avatar of Roger Coathup
    Roger Coathup
    Participant

    @rogercoathup

    @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: http://codex.wordpress.org/Plugin_API

    Avatar of frank thirteen
    frank thirteen
    Member

    @frank13

    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’ )`

    Avatar of Roger Coathup
    Roger Coathup
    Participant

    @rogercoathup

    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.

    Avatar of valuser
    valuser
    Participant

    @valuser

    Avatar of frank thirteen
    frank thirteen
    Member

    @frank13

    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 :)

    Avatar of Roger Coathup
    Roger Coathup
    Participant

    @rogercoathup

    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.

    Avatar of frank thirteen
    frank thirteen
    Member

    @frank13

    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.

    Avatar of frank thirteen
    frank thirteen
    Member

    @frank13

    Gave up and hard coded inside the sidebar.php template

Viewing 10 replies - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.