Skip to:
Content
Pages
Categories
Search
Top
Bottom

Do child themes have access to bp_core template tags?

  • Avatar of Peterverkooijen
    peterverkooijen
    Participant

    @peterverkooijen

    This line in members-loop.php works fine when included from bp-sn-parent:

    <?php if ( bp_has_members( ‘type=active&per_page=10′ ) ) : ?>

    But when I include it from a child theme I get this:

    Fatal error: Call to undefined function bp_has_members()

    Am I missing something?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Avatar of Andrea Rennick
    Andrea Rennick
    Participant

    @andrea_r

    How are you calling it tho? If you’re making a relative link, then it’s looking relative to the child theme directory. And of course it’s not there. :)

    Avatar of Peterverkooijen
    peterverkooijen
    Participant

    @peterverkooijen

    This is in the included file:

    <?php if ( bp_has_members( 'type=active&per_page=10' ) ) : ?>

    Inclusion works fine from both bp-sn-parent and the child theme folder, but when pulled in from the child theme I get the error.

    So this works fine – but it takes members-loop.php from bp-sn-parent, which I don’t want:

    <div id="member-dir-list">
    <?php load_template( TEMPLATEPATH . '/directories/members/members-loop.php' ) ?>
    </div>

    But with this I get the ‘Call to undefined function bp_has_members()’ error, even though both versions of members-loop have the same function call:

    <div id="member-dir-list">
    <?php include get_bloginfo('stylesheet_directory').'/directories/members/members-loop.php'; ?>
    </div>

    EDIT: This works. No idea why…:

    <div id="member-dir-list">
    <?php include 'members-loop.php'; ?>
    </div>

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

You must be logged in to reply to this topic.