Re: The Relate categories to Groups plugin
Further to the request above, through a process of elimination I have managed this:
Using the following code from the plugin’s template_tag file thus :
`//get post permalink which leads to group blog single post page
function bcg_get_post_permalink($post){
global $bp;
return bp_get_group_permalink($bp).$post->post_name;
}
function bcg_pagination($q) {
$posts_per_page = intval(get_query_var(‘posts_per_page’));
$paged = intval(get_query_var(‘paged’));
$numposts = $q->found_posts;
$max_page = $q->max_num_pages;
if(empty($paged) || $paged == 0) {
$paged = 1;
}
$pag_links = paginate_links( array(
‘base’ => add_query_arg( array( ‘paged’ => ‘%#%’, ‘num’ => $posts_per_page ) ),
‘format’ => ”,
‘total’ => ceil($numposts / $posts_per_page),
‘current’ => $paged,
‘prev_text’ => ‘?’,
‘next_text’ => ‘?’,
‘mid_size’ => 1
));
echo $pag_links;
}`
It renders the permalinks like so – http://www.racecraftmodels.co.uk/groups/mercedes-b
It appears to be the return function on line 4 that controls the post permalink.
What do I need to do to this line to make the rendered permalink point to the original post – NOT within a group – like so;
http://www.racecraftmodels.co.uk/mercedes-b
Any assistance would be very much appriciated.