StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have -- and this forum will be removed on July 1st, 2013.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-27-2012, 11:35 PM
trishasalas trishasalas is offline
Registered User
Genesis Member
Pro Plus Member
 
Join Date: May 2012
Location: Tulsa, OK
Posts: 3
Red face Permalinks not working in Custom function

I wrote a custom function for displaying random buddypress groups and the permalinks arent' working no matter what I do. I have tried printf() as well as echo...all it does is display the link itself next to the item I want to be the link.

The code is in a custom template with other standard genesis widgets before and after it.

I am fairly new to php but know enough to at least get this far and understand what I'm doing but I can't figure out what I'm doing wrong. Can anyone help with this?

Here is the link: http://dev.trishasalas.com/

and here is the code:

PHP Code:
$args = array(
     
'type' => 'random',
     
'max' => 3
);

    if ( 
bp_has_groups $args ) ) {
 
        echo
'<div class="featured-middle-left">';

        echo
'<h3>Check Out Our Growing Network Of Groups</h3>';
 
        echo
'<ul id="groups-list" class="item-list">';
           while ( 
bp_groups() ) : bp_the_group();
 
        echo
'<li>';

        echo 
'<div class="thumbnail">';
            
        echo
'<a href='.bp_group_permalink().'>'.bp_group_avatar().'</a>';

        echo
'</div>';
         
         echo
'<h2>';

               
printf('<a href="%s">%s</a>',
                
bp_group_permalink(),
                
bp_group_name()
                );

           echo
'</h2>';

        echo
'<div class="item-desc">';
        
bp_group_description_excerpt();
        echo
'</div>';
 
         
do_action('bp_directory_groups_item');

        echo
'</div>';
 
        echo
'<div class="action">';
        
        
bp_group_join_button();
        echo
'</li>';

        endwhile;
          echo
'</ul>';
          echo
'</div>';
      } 
Thanks!
Trisha in Tulsa
 

Tags
buddypress loop, permalinks, template

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Permalinks not working robjan80 General Discussion 10 12-15-2009 09:22 AM


All times are GMT -5. The time now is 09:21 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.