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.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
  #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
  #2  
Old 09-28-2012, 06:40 AM
andrea_r's Avatar
andrea_r andrea_r is offline
Forum Manager
 
Join Date: Nov 2009
Location: Eastern Canada
Posts: 36,279
Default

You'll have to aks at the Buddypress forums.

Your permalinks are the same regardless of theme used.
__________________
*****
These forums were CLOSED to new posts on November 19th, 2012. New forums are here: http://www.studiopress.com/forums/ and you will need to SIGN UP AGAIN.

If you need assitance with setting up your theme, go to http://my.studiopress.com/ and read the SETUP links or the TUTORIALS link on the side tab.

If you need Account Assistance, file a help desk ticket at the same location.
  #3  
Old 09-28-2012, 11:10 AM
trishasalas trishasalas is offline
Registered User
Genesis Member
Pro Plus Member
 
Join Date: May 2012
Location: Tulsa, OK
Posts: 3
Default

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

-Trisha
 

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 12:07 PM.

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