StudioPress Community Forums

StudioPress Community Forums (http://www.studiopress.com/support/index.php)
-   General Discussion (http://www.studiopress.com/support/forumdisplay.php?f=7)
-   -   Permalinks not working in Custom function (http://www.studiopress.com/support/showthread.php?t=119038)

trishasalas 09-27-2012 11:35 PM

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

andrea_r 09-28-2012 06:40 AM

You'll have to aks at the Buddypress forums.

Your permalinks are the same regardless of theme used.

trishasalas 09-28-2012 11:10 AM

Thanks Andrea, I took that code snippet from the buddypress groups loop, hopefully they can help root out the problem.

-Trisha


All times are GMT -5. The time now is 02:43 PM.

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