Skip to:
Content
Pages
Categories
Search
Top
Bottom

Widget logic 1.2

  • Does anyone know a plugin, that let’s me show different widgets on different parts of this theme (example: in profile, startpage, directories)? So far I used TS custom widgets in my “normal” blogs, but as far as I get it, I would need certain pages etc to show it. But no pages like that in BP-Themes… Any solutions/ideas? Thanks already!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Profile photo of jivany
    jivany
    Participant

    @jivany

    Did you try widget logic? https://wordpress.org/extend/plugins/widget-logic/

    Crafting the correct logic might be the tricky part but the plugin is fantastic for controlling when to display (or not display) any widget.

    Hmmm – yes, this plugin sounds logic :-) (and would be the forum-titel… :-). That is exactly the question, for I am not a php-guru. Can anyone point me in the right direction, who that would work with buddypress (example: how could I show a widget with that plugin just on a users profile…?)

    Profile photo of David Carson
    David Carson
    Participant

    @davidtcarson

    bp_is_my_profile() should work if you are only trying to show a widget on a user’s own profile.

    Profile photo of @mercime
    @mercime
    Moderator

    @mercime

    One way is

    if (bp_is_profile_component()) {
    include ('profile.php');
    }

    where profile.php is widgetized and you can add the widget in your dashboard’s Appearance > Widget panel. Are you using 1.2 bp-default theme or bp-sn-parent theme?

    https://codex.buddypress.org/developer-docs/conditional-template-tags/

    Btw, if you use conditional statements for bp themes, do not add a standalone is_page() – need to add page ID/slug/name within () – otherwise it will override conditional statement for bp_is_profile_component() and other conditional statements for other BP-generated pages.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Widget logic 1.2’ is closed to new replies.
Skip to toolbar