Search Results for 'remove sidebar'
-
Search Results
-
Hi there. I’m using the suffusion theme along with a bbpress forum plugin. The point is, that, I removed the sidebar and the previous widgets from the forum pages, but if I add new widget to the sidebar, the widget is showing on the forum pages. I want to know if I’m missing something like some functions like dynamic_widgets() or the problem is something else.
Thanks in advance !
I have run into some problems while theming bbp-twenty ten on my site. BBpress is installed, The forum fits within my custom theme after changing the template files. But some CSS does not seem to stick and my forum got issues with padding/margins and width or height at many places.
Some guidance would be much appreciated!
Here is my forum: http://www.fruitpickingjobs.com.au/forums
I started with copying all files from bbp-twenty ten folder to my own wp theme folder. I have also changed all template files so the forum fits within my theme with sidebar.
I have also added nesecery code to functions.php
like instructed here: http://www.youtube.com/watch?v=lB2Oodx2GJw
This is how my functions.php file looks like:
// bbpress functions below this line
add_theme_support( ‘bbpress’ );
/**
* Functions of bbPress’s Twenty Ten theme
*
* @package bbPress
* @subpackage BBP_Twenty_Ten
* @since Twenty Ten 1.1
*/
// Exit if accessed directly
if ( !defined( ‘ABSPATH’ ) ) exit;
/** Theme Setup ***************************************************************/
if ( !class_exists( ‘BBP_Twenty_Ten’ ) ) :
/**
* Loads bbPress Twenty Ten Theme functionality
*
* Usually functions.php contains a few functions wrapped in function_exisits()
* checks. Since bbp-twenty-ten is intended to be used both as a child theme and
* for Theme Compatibility, we’ve moved everything into one convenient class
* that can be copied or extended.
*
* See @link BBP_Theme_Compat() for more.
*
* @since bbPress (r3277)
*
* @package bbPress
* @subpackage BBP_Twenty_Ten
*/
class BBP_Twenty_Ten extends BBP_Theme_Compat {
/** Functions *************************************************************/
/**
* The main bbPress (Twenty Ten) Loader
*
* @since bbPress (r3277)
*
* @uses BBP_Twenty_Ten::setup_globals()
* @uses BBP_Twenty_Ten::setup_actions()
*/
public function __construct() {
$this->setup_globals();
$this->setup_actions();
}
/**
* Component global variables
*
* @since bbPress (r2626)
* @access private
*
* @uses plugin_dir_path() To generate bbPress plugin path
* @uses plugin_dir_url() To generate bbPress plugin url
* @uses apply_filters() Calls various filters
*/
private function setup_globals() {
global $bbp;
// Theme name to help identify if it’s been extended
$this->name = ‘bbPress (Twenty Ten)’;
// Version of theme in YYYMMDD format
$this->version = ‘20110921’;
// Setup the theme path
$this->dir = $bbp->themes_dir . ‘/bbp-twentyten’;
// Setup the theme URL
$this->url = $bbp->themes_url . ‘/bbp-twentyten’;
}
/**
* Setup the theme hooks
*
* @since bbPress (r3277)
* @access private
*
* @uses add_filter() To add various filters
* @uses add_action() To add various actions
*/
private function setup_actions() {
// Add theme support for bbPress
add_action( ‘after_setup_theme’, array( $this, ‘add_theme_support’ ) );
// Enqueue theme CSS
add_action( ‘bbp_enqueue_scripts’, array( $this, ‘enqueue_styles’ ) );
// Enqueue theme JS
add_action( ‘bbp_enqueue_scripts’, array( $this, ‘enqueue_scripts’ ) );
// Enqueue theme script localization
add_filter( ‘bbp_enqueue_scripts’, array( $this, ‘localize_topic_script’ ) );
// Output some extra JS in the <head>
add_action( ‘bbp_head’, array( $this, ‘head_scripts’ ) );
// Handles the ajax favorite/unfavorite
add_action( ‘wp_ajax_dim-favorite’, array( $this, ‘ajax_favorite’ ) );
// Handles the ajax subscribe/unsubscribe
add_action( ‘wp_ajax_dim-subscription’, array( $this, ‘ajax_subscription’ ) );
}
/**
* Sets up theme support for bbPress
*
* Because this theme comes bundled with bbPress template files, we add it
* to the list of things this theme supports. Note that the function
* “add_theme_support()” does not /enable/ theme support, but is instead an
* API for telling WordPress what it can already do on its own.
*
* If you’re looking to add bbPress support into your own custom theme, you’ll
* want to make sure it includes all of the template files for bbPress, and then
* use: add_theme_support( ‘bbpress’ ); in your functions.php.
*
* @since bbPress (r2652)
*/
public function add_theme_support() {
add_theme_support( ‘bbpress’ );
}
/**
* Load the theme CSS
*
* @since bbPress (r2652)
*
* @uses wp_enqueue_style() To enqueue the styles
*/
public function enqueue_styles() {
// Right to left
if ( is_rtl() ) {
// TwentyTen
wp_enqueue_style( ‘twentyten’, get_template_directory_uri() . ‘/style.css’, ”, $this->version, ‘screen’ );
wp_enqueue_style( ‘twentyten-rtl’, get_template_directory_uri() . ‘/rtl.css’, ‘twentyten’, $this->version, ‘screen’ );
// bbPress specific
wp_enqueue_style( ‘bbp-twentyten-bbpress’, get_stylesheet_directory_uri() . ‘/css/bbpress-rtl.css’, ‘twentyten-rtl’, $this->version, ‘screen’ );
// Left to right
} else {
// TwentyTen
wp_enqueue_style( ‘twentyten’, get_template_directory_uri() . ‘/style.css’, ”, $this->version, ‘screen’ );
// bbPress specific
wp_enqueue_style( ‘bbp-twentyten-bbpress’, get_stylesheet_directory_uri() . ‘/css/bbpress.css’, ‘twentyten’, $this->version, ‘screen’ );
}
}
/**
* Enqueue the required Javascript files
*
* @since bbPress (r2652)
*
* @uses bbp_is_single_topic() To check if it’s the topic page
* @uses get_stylesheet_directory_uri() To get the stylesheet directory uri
* @uses bbp_is_single_user_edit() To check if it’s the profile edit page
* @uses wp_enqueue_script() To enqueue the scripts
*/
public function enqueue_scripts() {
if ( bbp_is_single_topic() )
wp_enqueue_script( ‘bbp_topic’, get_stylesheet_directory_uri() . ‘/js/topic.js’, array( ‘wp-lists’ ), $this->version );
if ( bbp_is_single_user_edit() )
wp_enqueue_script( ‘user-profile’ );
}
/**
* Put some scripts in the header, like AJAX url for wp-lists
*
* @since bbPress (r2652)
*
* @uses bbp_is_single_topic() To check if it’s the topic page
* @uses admin_url() To get the admin url
* @uses bbp_is_single_user_edit() To check if it’s the profile edit page
*/
public function head_scripts() {
if ( bbp_is_single_topic() ) : ?>
<script type=’text/javascript’>
/* <![CDATA[ */
var ajaxurl = ‘<?php echo admin_url( ‘admin-ajax.php’ ); ?>’;
/* ]]> */
</script>
<?php elseif ( bbp_is_single_user_edit() ) : ?>
<script type=”text/javascript” charset=”utf-8″>
if ( window.location.hash == ‘#password’ ) {
document.getElementById(‘pass1’).focus();
}
</script>
<?php
endif;
}
/**
* Load localizations for topic script
*
* These localizations require information that may not be loaded even by init.
*
* @since bbPress (r2652)
*
* @uses bbp_is_single_topic() To check if it’s the topic page
* @uses is_user_logged_in() To check if user is logged in
* @uses bbp_get_current_user_id() To get the current user id
* @uses bbp_get_topic_id() To get the topic id
* @uses bbp_get_favorites_permalink() To get the favorites permalink
* @uses bbp_is_user_favorite() To check if the topic is in user’s favorites
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
* @uses bbp_is_user_subscribed() To check if the user is subscribed to topic
* @uses bbp_get_topic_permalink() To get the topic permalink
* @uses wp_localize_script() To localize the script
*/
public function localize_topic_script() {
// Bail if not viewing a single topic
if ( !bbp_is_single_topic() )
return;
// Bail if user is not logged in
if ( !is_user_logged_in() )
return;
$user_id = bbp_get_current_user_id();
$localizations = array(
‘currentUserId’ => $user_id,
‘topicId’ => bbp_get_topic_id(),
);
// Favorites
if ( bbp_is_favorites_active() ) {
$localizations = 1;
$localizations = bbp_get_favorites_permalink( $user_id );
$localizations = (int) bbp_is_user_favorite( $user_id );
$localizations = __( ‘favorites’, ‘bbpress’ );
$localizations = __( ‘?’, ‘bbpress’ );
$localizations = __( ‘This topic is one of your %favLinkYes% [%favDel%]’, ‘bbpress’ );
$localizations = __( ‘%favAdd% (%favLinkNo%)’, ‘bbpress’ );
$localizations = __( ‘×’, ‘bbpress’ );
$localizations = __( ‘Add this topic to your favorites’, ‘bbpress’ );
} else {
$localizations = 0;
}
// Subscriptions
if ( bbp_is_subscriptions_active() ) {
$localizations = 1;
$localizations = (int) bbp_is_user_subscribed( $user_id );
$localizations = __( ‘Subscribe’, ‘bbpress’ );
$localizations = __( ‘Unsubscribe’, ‘bbpress’ );
$localizations = bbp_get_topic_permalink();
} else {
$localizations = 0;
}
wp_localize_script( ‘bbp_topic’, ‘bbpTopicJS’, $localizations );
}
/**
* Add or remove a topic from a user’s favorites
*
* @since bbPress (r2652)
*
* @uses bbp_get_current_user_id() To get the current user id
* @uses current_user_can() To check if the current user can edit the user
* @uses bbp_get_topic() To get the topic
* @uses check_ajax_referer() To verify the nonce & check the referer
* @uses bbp_is_user_favorite() To check if the topic is user’s favorite
* @uses bbp_remove_user_favorite() To remove the topic from user’s favorites
* @uses bbp_add_user_favorite() To add the topic from user’s favorites
*/
public function ajax_favorite() {
$user_id = bbp_get_current_user_id();
$id = intval( $_POST );
if ( !current_user_can( ‘edit_user’, $user_id ) )
die( ‘-1’ );
if ( !$topic = bbp_get_topic( $id ) )
die( ‘0’ );
check_ajax_referer( ‘toggle-favorite_’ . $topic->ID );
if ( bbp_is_user_favorite( $user_id, $topic->ID ) ) {
if ( bbp_remove_user_favorite( $user_id, $topic->ID ) ) {
die( ‘1’ );
}
} else {
if ( bbp_add_user_favorite( $user_id, $topic->ID ) ) {
die( ‘1’ );
}
}
die( ‘0’ );
}
/**
* Subscribe/Unsubscribe a user from a topic
*
* @since bbPress (r2668)
*
* @uses bbp_is_subscriptions_active() To check if the subscriptions are active
* @uses bbp_get_current_user_id() To get the current user id
* @uses current_user_can() To check if the current user can edit the user
* @uses bbp_get_topic() To get the topic
* @uses check_ajax_referer() To verify the nonce & check the referer
* @uses bbp_is_user_subscribed() To check if the topic is in user’s
* subscriptions
* @uses bbp_remove_user_subscriptions() To remove the topic from user’s
* subscriptions
* @uses bbp_add_user_subscriptions() To add the topic from user’s subscriptions
*/
public function ajax_subscription() {
if ( !bbp_is_subscriptions_active() )
return;
$user_id = bbp_get_current_user_id();
$id = intval( $_POST );
if ( !current_user_can( ‘edit_user’, $user_id ) )
die( ‘-1’ );
if ( !$topic = bbp_get_topic( $id ) )
die( ‘0’ );
check_ajax_referer( ‘toggle-subscription_’ . $topic->ID );
if ( bbp_is_user_subscribed( $user_id, $topic->ID ) ) {
if ( bbp_remove_user_subscription( $user_id, $topic->ID ) ) {
die( ‘1’ );
}
} else {
if ( bbp_add_user_subscription( $user_id, $topic->ID ) ) {
die( ‘1’ );
}
}
die( ‘0’ );
}
}
/**
* Instantiate a new BBP_Twenty_Ten class inside the $bbp global. It is
* responsible for hooking itself into WordPress where apprpriate.
*/
if ( ‘bbPress’ == get_class( $bbp ) ) {
$bbp->theme_compat->theme = new BBP_Twenty_Ten();
}
endif;
?>
As per the topic title. Is there an order in which the bbPress plugin chooses which WordPress template file to display the board? Is it index.php first, then maybe page.php?
Is it possible to have a page-forum.php file in my WordPress theme, and have the plugin use that?
Most of my template files have a sidebar, and I’d like to remove that for the forum.
I recently added bbpress to my existing site. Everything is working good except the layout is kinda funky. The Sidebar looks stupid. Is there a way to remove this all together from bbpress pages? Or is there a way to adjust the width of bbpress on the bbpress pages?
See here
http://thefitnessking.com/groups/
http://thefitnessking.com/members/
http://thefitnessking.com/activity/
Any help is appreciated
Thanks
Pat
How do I make the forum full width in the Twenty Eleven theme?
Viewing the forum on the Twenty Eleven theme there is a blank sidebar.
How do I remove this sidebar so the forum is presented in full width?
Hey guys,
I’m searching for an option to remove the sidebar from all subpages (topics, posts…).
On my main forum page is no sidebar, because I use a template there, but on every other page there is a sidebar. Hope you understand what I mean. Just have a look here:
http://www.abi13-ass.de/?page_id=127
I tried a few things but nothing worked.
I hope one can help me
Greetings
What I want people to see:
http://pride.mmbr.no/wp-content/uploads/2011/10/bbpress2.png
What people really see:
http://pride.mmbr.no/wp-content/uploads/2011/10/bbpress3.png
Only stickys show up in the forum. Also: notice how it says the forum has 2 topics, but viewing only 1.
http://pride.mmbr.no/wp-content/uploads/2011/10/bbpress5.png
http://pride.mmbr.no/wp-content/uploads/2011/10/bbpress4.png
Here is the actual pages so you can see for yourselves:
http://pride.mmbr.no/forum/delforum/minecraft » the forum
http://pride.mmbr.no/forum/emne/1-9-og-apaxia-nova » the topic
I installed bbPress via the WordPress Plugins tab and I have copied the template files to my custom theme and customized them (basicly just removed the sidebar) and added the
add_theme_support( 'bbpress' );
line in functions.php.It’s like the topics are set to hidden.
I have checked and double checked that the publish status is set to published. What do?
Thank you for any help.
I have a blog with the Suffusion-theme on wich I just installed bbpress. I don’t need a fancy theme for bbpress.
* Created a new page for the forum (blablabla.com/Forum)
* Set up all the forums/subforum etc.
* Used the shortcode for showing the forum = [bbp-forum-index]
Things looks okey so far! Now I want to remove the sidebars from the forum (not the page, I know how to do that) and I have read a couple of tutorials but still don’t get it.
I don’t want to use a theme or childtheme, I want the forum to have the same coloring etc. as the Suffusion theme I use. So where do I remove the sidebars?
I have removed <?php get_sidebar(); ?> from:
* single-forum.php
* single-topic.php
* single-reply.php
as described in another thread in here. I changed this in mypage.com/wp-content/plugins/bbpress/bbp-themes/bbp-twentyten
But I don’t use that theme. I use NO theme. So where do I remove the sidebars?
Please let me know what I’m doing wrong here!