Reply To: Any way to eliminate redundancy/weirdness in permalinks (i.e. "forums/forum")?
Or maybe it’s down here
/**
* Output the view url
*
* @since bbPress (r2789)
*
* @param string $view Optional. View id
* @uses bbp_get_view_url() To get the view url
*/
function bbp_view_url( $view = false ) {
echo bbp_get_view_url( $view );
}
/**
* Return the view url
*
* @since bbPress (r2789)
*
* @param string $view Optional. View id
* @uses sanitize_title() To sanitize the view id
* @uses home_url() To get blog home url
* @uses add_query_arg() To add custom args to the url
* @uses apply_filters() Calls 'bbp_get_view_url' with the view url,
* used view id
* @return string View url (or home url if the view was not found)
*/
function bbp_get_view_url( $view = false ) {
global $wp_rewrite;
$view = bbp_get_view_id( $view );
if ( empty( $view ) )
return home_url();
// Pretty permalinks
if ( $wp_rewrite->using_permalinks() ) {
$url = $wp_rewrite->root . bbp_get_view_slug() . '/' . $view;
$url = home_url( user_trailingslashit( $url ) );
// Unpretty permalinks
} else {
$url = add_query_arg( array( 'bbp_view' => $view ), home_url( '/' ) );
}
return apply_filters( 'bbp_get_view_link', $url, $view );
}
Please someone help – I am a designer not a programer – honestly I hadn’t realized that bbpress WOULDN”T have the forum name associated with the topic…