Skip to:

Call to undefined function bp_has_forum_topics()

  • hitkid


    Keep getting this error: Fatal error:

    Call to undefined function bp_has_forum_topics() in C:\BitNami\wordpress-3.5.2-0\apps\wordpress\htdocs\wp-content\themes\My-Child\New Test.php on line 16

    When trying to put this loop found in the codex in a template:

    	<?php if ( bp_has_forum_topics('newest') ) : ?>
        <div class="pagination">
            <div id="post-count" class="pag-count">
                <?php bp_forum_pagination_count() ?>
            <div class="pagination-links" id="topic-pag">
                <?php bp_forum_pagination() ?>
        <table class="forum">
                <th id="th-title"><?php _e( 'Topic Title', 'buddypress' ) ?></th>
                <th id="th-poster"><?php _e( 'Latest Poster', 'buddypress' ) ?></th>
                <?php if ( !bp_is_group_forum() ) : ?>
                    <th id="th-group"><?php _e( 'Posted In Group', 'buddypress' ) ?></th>
                <?php endif; ?>
                <th id="th-postcount"><?php _e( 'Posts', 'buddypress' ) ?></th>
                <th id="th-freshness"><?php _e( 'Freshness', 'buddypress' ) ?></th>
            <?php while ( bp_forum_topics() ) : bp_the_forum_topic(); ?>
            <tr class="<?php bp_the_topic_css_class() ?>">
                <td class="td-title">
                    <a class="topic-title" href="<?php bp_the_topic_permalink() ?>" title="<?php bp_the_topic_title() ?> - <?php _e( 'Permalink', 'buddypress' ) ?>">
                        <?php bp_the_topic_title() ?>
                <td class="td-poster">
                    <a href="<?php bp_the_topic_permalink() ?>"><?php bp_the_topic_last_poster_avatar( 'type=thumb&width=20&height=20' ) ?></a>
                    <div class="poster-name"><?php bp_the_topic_last_poster_name() ?></div>
                <?php if ( !bp_is_group_forum() ) : ?>
                    <td class="td-group">
                        <a href="<?php bp_the_topic_object_permalink() ?>"><?php bp_the_topic_object_avatar( 'type=thumb&width=20&height=20' ) ?></a>
                        <div class="object-name"><a href="<?php bp_the_topic_object_permalink() ?>" title="<?php bp_the_topic_object_name() ?>"><?php bp_the_topic_object_name() ?></a></div>
                <?php endif; ?>
                <td class="td-postcount">
                    <?php bp_the_topic_total_posts() ?>
                <td class="td-freshness">
                    <?php bp_the_topic_time_since_last_post() ?>
            <?php endwhile; ?>
    <?php else: ?>
        <div id="message" class="info">
            <p><?php _e( 'Sorry, there were no forum topics found.', 'buddypress' ) ?></p>
    <?php endif;?>
Viewing 1 replies (of 1 total)

  • Unit9


    I’m getting this same exact error as well, using the latest installs of WordPress, Buddypress and BBpress.

    Anyone know how to fix it? Or rather… get it working? 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘Call to undefined function bp_has_forum_topics()’ is closed to new replies.
Skip to toolbar