Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to call in plugins in page template


  • Archie Webmaker
    Participant

    @weblogian

    Actually I want to place the activity widget on my custom template page. I am using the default Buddypress theme.

    If it can be done, I love to know template code for all the plugins.

    Any ideas?

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

  • Archie Webmaker
    Participant

    @weblogian

    I will at least love to hear whether it is possible or not.

    Thank you.


    Burt Adsit
    Participant

    @burtadsit

    The bp widgets aren’t designed to be called from templates. They don’t pay any attention to parameters passed to them yet.


    Archie Webmaker
    Participant

    @weblogian

    Thanks a lot, that had saved a lot of time working around.

    I think I have to switch to java code by converting the activity feed

    In the latest trunk (and RC2 coming out soon) you can use these template tags to render activity feeds:

    <?php if ( bp_has_activities( 'type=personal&amp;max=30' ) ) : ?>
    <ul id="activity-list">
    <?php while ( bp_activities() ) : bp_the_activity(); ?>
    <li class="<?php bp_activity_css_class() ?>">
    <?php bp_activity_content() ?>
    </li>
    <?php endwhile; ?>
    </ul>
    <?php endif;?>

    ‘type’ can be personal, sitewide, or friends. You can also pass a ‘user_id’ value if you wish. Otherwise it will use the ‘displayed_user’ id.


    Burt Adsit
    Participant

    @burtadsit

    Well, hell Andy. Where did all these template classes come from all of a sudden? Maybe I’m just noticing them. Looks like as soon as you say:

    bp_has_<component type>() a template class is instantiated and we get an instant <component type> loop. I see them for all the components. That’s going to make creating and extending themes pretty easy.

    Look in each component directory in the bp-<component>-templatetags.php file

    Have I just been so buried in other stuff I never noticed them?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to call in plugins in page template’ is closed to new replies.
Skip to toolbar