Skip to:

Favorites on wordpress profile

  • Hi,

    I would like to integrate bbpress user favorites to wordpress profile page. Is there any hook I could use?

    I search the forum but I couldn’t find anything relevant.


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

  • so1o


    here is the hacked code.. this will show the favorites on profile page in the admin section of wordpress. I haven’t tested it but this is the basic idea.

    please note that the wordpress must be integrated both ways before you can do this. visit this for more


    function my_plugin_show_favorites() {
    $topics = get_user_favorites( $user->ID, true );
    <br clear="all" />

    <table width="99%" border="0"
    cellspacing="2" cellpadding="3">
    <th><?php _e('Topic'); ?></th>
    <th><?php _e('Posts'); ?></th>
    <th><?php _e('Freshness'); ?></th>
    <th><?php _e('Remove'); ?></th>

    <?php foreach ( $topics as $topic ) : ?>
    <tr<?php topic_class(); ?>>
    <td><a href="<?php topic_link(); ?>">
    <?php topic_title(); ?></a></td>
    <td class="num"><?php
    <td class="num"><small><?php
    <td class="num">[<?php
    <?php endforeach; ?>

    <div class="nav">
    <?php favorites_pages(); ?>


    So if I understand right, I should use this code as a WP plugin?

    I tried that and I get an error:

    Warning: Invalid argument supplied for foreach() in /home/ on line 30

    It is shown in profile main page…it is possible to create another separate page for that?



    yup use it in wordpress.. if i understand you right.. you want to show it on the wordpress profile page right? the one which is


    try changing the code to

    <?php if ($topics): foreach ( $topics as $topic ) : ?>






    <?php endforeach; endif; ?>

    I change it, know there is no error, but no favorite forum shows up.

    The deal is that my favorites dissaper, if I point my browser to, it redirects me to

    It worked before, but probably I changed something so I thought maybe I create another favorites page :)




    you said you want to show the favorites in the wordpress profile.

    this is the link to the bbpress profile page.

    i am confused now :) can you try to explain again what are you trying to do?

    I’m sorry, I confused little myself too:)

    Ok here is the deal

    Because the bbpress profile page doesn’t work, I want to show user favorites on wordpress profile page (the best on separate page – tab), like Extended Profile from Userextra plugin.

    I still didn’t solve this, so If anybody has an good point I will preciated;)

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