Skip to:
Content
Pages
Categories
Search
Top
Bottom

content not loading in custom Activity subnav item

  • I’m struggling to get some code working in a custom theme. Two points that may or may not be relevant: (1) it’s a child theme (parent is a ‘base’ we use for our projects), and (2) in the theme (child theme) we have all the BuddyPress templates (overriding the core templates).

    I wondered if part of the problem was the code running in the theme. I remembered bp-custom.php and tried putting the code there, same problem. I’m keeping it there for now.

    Here’s the code I have: https://paste.ee/p/3HDql

    The subnav item for ‘Likes’ lives under ‘Activity’ on a member profile. It displays OK, and is highlighted when I click through to it. But the content is just the same as for the ‘Personal’ subnav item. The two title / content functions don’t seem to have an effect.

    Digging down into bp_core_load_template(), the template doesn’t seem to be loaded, I think I’m missing something there.

    Any ideas?

    WP: 4.9.8
    BP: 2.9.4

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

  • shanebp
    Moderator

    @shanebp

    It’s not your BP overloads in the child theme.

    Sorry I can’t give you a detailed explanation re why your subnav item still loads the listings.
    Here’s an overly simplistic one…
    Due to how BP handles activity ( ajax ), you’ll need to create your content ( and suppress the activity listings ) via custom code in the activity template that you’re already overloading.

    That’s crazy. Why are there loads of code samples out there, very close variations on what I’ve got, with no mention of this need to stick code into the main activity template? I assume you mean members/single/activity.php – it’s the one being displayed despite me specifying members/single/plugins in the subnav screen function callback. I’ll work with that for now but it seems like a clumsy hack for something that should be basic.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar