Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,801 through 6,825 (of 32,505 total)
  • Author
    Search Results
  • #172447

    In reply to: vbulletin 3.x import

    Pascal Casier
    Moderator

    Hi @blandow,

    Styling can be done in a lot of ways. You can play yourself with some CSS starting from https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/

    Or you can check plugins. bbP style pack might be able to help you for the background.

    Pascal.

    #172445

    In reply to: bbp_new_forum hook

    Antipole
    Participant

    @fterra – thanks for your suggestions.

    I have it working using ‘bbp_forum_attributes_metabox_save’ as you suggested but have found, perhaps not surprisingly, my function is fired on an update to the meta date. So with the code below I create a new forum and all users are subscribe; some choose to unsubscribe; I update something in the meta data and everyone is subscribed again – not good. Any idea how I can determine whether this is a first time save or an update?
    Also I do not want to auto subscribe to group forums. I have fixed this by hard-coding in the group forum’s id, but maybe there is a better way of testing whether a forum_id is a group forum?

    Any ideas welcome thanks.

    function ovni_subscribe_users_to_new_forum($forum_id){  // subscribe all users to a new forum unless it is a group forum
    	if (bbp_get_forum_parent_id( $forum_id ) == 969) return;  // if this is group forum, do nothing
    	$all_user_ids = get_users();
    	foreach ($all_user_ids as $this_user){
    		bbp_add_user_forum_subscription($this_user->id, $forum_id);
    		}
    	}
    add_action('bbp_forum_attributes_metabox_save', 'ovni_subscribe_users_to_new_forum');
    siparker
    Participant

    @casiepa
    Do you think i should just gather any info i can and assign to the trac ticket?

    The solution posted a bit further up the thread by @_az_ does the basics of removing the forum slug but as he mentioend there are a few places where the permalinks are claled like breadcrumbs etc

    From what i can find out (i am not a programmer but am trying) for a quick fix we would need to get the forum parent id from the post itself then get the slug for that forumid and any parents it has. then the post permalink is built from the parent slug and the post slug.

    This needs to hook into the permalink function to override this and there is a good example (for a different purpose) here https://github.com/korobochkin/bbpress-permalinks-with-id which i think covers off all of the different places that the changes need to be made and could possibly be used as a basis for the new plugin / code.

    I am happy to do all the testing and research if anyone is able to provide some coding experience to the mix. please just get in contact with me and i will show you everything i have found so far. then we can publish the code into the trac ticket and hopefully the main devs can put this into core.

    If anyone has any ideas on blocking issues for this also please tell me.

    I know one of the potential issues and the reason for this structure in the first place was duplicated urls. Could anyone please explain the thinking behind this. and how it might present an issue.

    I know the current topics post type wont alow duplicates so the only issue i can see would be if the forum name was the same as a topic name. Is that the only time this might happen?

    If so we would need to create a check when saving the url/permalink that a forum post type does not have the same permalink and if it does then add 1 to the end?

    The way most other forums do this is by appending the thread id into the permalink so it would appear to be /my-friendly-title-11234 for example where the post id is 11234

    not saying bbpress should do this but its an option as the id for the post is available.

    #172442
    Robin W
    Moderator

    @casiepa

    setting top to zero fixes that !

    #bbpress-forums div.bbp-topic-author img.avatar,
     #bbpress-forums div.bbp-reply-author img.avatar {
     position: relative ;
     top : 0px ;
     }
    #172440
    Robin W
    Moderator

    Whilst it needs sorting in the core product, the ticket says that putting this in the css file will fix, and did on my test site

    #bbpress-forums div.bbp-topic-author img.avatar,
    #bbpress-forums div.bbp-reply-author img.avatar {
    position: relative
    }

    https://codex.bbpress.org/functions-files-and-child-themes-explained/

    stewmills
    Participant

    I have:
    WP 4.4.2
    bbPress 2.5.8
    BuddyPress 2.4.3
    Karma theme 3.0.3

    I set-up the forum using method 2, which is a page called “userforum” containing the shortcode [bbp-forum-index] and the forum displays just fine and as well shows my left sidebar which houses my login and other widgets. I want this sidebar on ALL forum pages and by creating a bbpress.php page I think I resolved a previous issue where I couldn’t see my sidebar on all pages.

    However, I realized today that when a user creates a new Topic, the sidebar is not displayed. The only way I can make it display is to go into the topic as an WP Admin and select the desired sidebar on the Topic page settings and save changes.

    I need for new topics created by anyone to always include the sidebar. Did I miss a step somewhere or is this another aggravating quirk with bbPress or my theme not agreeing with one another

    #172431
    Robin W
    Moderator

    the code you need is

    function change_root( $args = array() ) {
    
    		// Turn off breadcrumbs
    		if ( apply_filters( 'bbp_no_breadcrumb', is_front_page() ) )
    			return;
    
    		// Define variables
    		$front_id         = $root_id                                 = 0;
    		$ancestors        = $crumbs           = $tag_data            = array();
    		$pre_root_text    = $pre_front_text   = $pre_current_text    = '';
    		$pre_include_root = $pre_include_home = $pre_include_current = true;
    
    		/** Home Text *********************************************************/
    
    		// No custom home text
    		if ( empty( $args['home_text'] ) ) {
    
    			$front_id = get_option( 'page_on_front' );
    
    			// Set home text to page title
    			if ( !empty( $front_id ) ) {
    				$pre_front_text = get_the_title( $front_id );
    
    			// Default to 'Home'
    			} else {
    				$pre_front_text = __( 'Home', 'bbpress' );
    			}
    		}
    
    		/** Root Text *********************************************************/
    
    		// No custom root text
    		if ( empty( $args['root_text'] ) ) {
    			$page = bbp_get_page_by_path( bbp_get_root_slug() );
    			if ( !empty( $page ) ) {
    				$root_id = $page->ID;
    			}
    			$pre_root_text = bbp_get_forum_archive_title();
    		}
    
    		/** Includes **********************************************************/
    
    		// Root slug is also the front page
    		if ( !empty( $front_id ) && ( $front_id === $root_id ) ) {
    			$pre_include_root = false;
    		}
    
    		// Don't show root if viewing forum archive
    		if ( bbp_is_forum_archive() ) {
    			$pre_include_root = false;
    		}
    
    		// Don't show root if viewing page in place of forum archive
    		if ( !empty( $root_id ) && ( ( is_single() || is_page() ) && ( $root_id === get_the_ID() ) ) ) {
    			$pre_include_root = false;
    		}
    
    		/** Current Text ******************************************************/
    
    		// Search page
    		if ( bbp_is_search() ) {
    			$pre_current_text = bbp_get_search_title();
    
    		// Forum archive
    		} elseif ( bbp_is_forum_archive() ) {
    			$pre_current_text = bbp_get_forum_archive_title();
    
    		// Topic archive
    		} elseif ( bbp_is_topic_archive() ) {
    			$pre_current_text = bbp_get_topic_archive_title();
    
    		// View
    		} elseif ( bbp_is_single_view() ) {
    			$pre_current_text = bbp_get_view_title();
    
    		// Single Forum
    		} elseif ( bbp_is_single_forum() ) {
    			$pre_current_text = bbp_get_forum_title();
    
    		// Single Topic
    		} elseif ( bbp_is_single_topic() ) {
    			$pre_current_text = bbp_get_topic_title();
    
    		// Single Topic
    		} elseif ( bbp_is_single_reply() ) {
    			$pre_current_text = bbp_get_reply_title();
    
    		// Topic Tag (or theme compat topic tag)
    		} elseif ( bbp_is_topic_tag() || ( get_query_var( 'bbp_topic_tag' ) && !bbp_is_topic_tag_edit() ) ) {
    
    			// Always include the tag name
    			$tag_data[] = bbp_get_topic_tag_name();
    
    			// If capable, include a link to edit the tag
    			if ( current_user_can( 'manage_topic_tags' ) ) {
    				$tag_data[] = '<a href="' . esc_url( bbp_get_topic_tag_edit_link() ) . '" class="bbp-edit-topic-tag-link">' . esc_html__( '(Edit)', 'bbpress' ) . '</a>';
    			}
    
    			// Implode the results of the tag data
    			$pre_current_text = sprintf( __( 'Topic Tag: %s', 'bbpress' ), implode( ' ', $tag_data ) );
    
    		// Edit Topic Tag
    		} elseif ( bbp_is_topic_tag_edit() ) {
    			$pre_current_text = __( 'Edit', 'bbpress' );
    
    		// Single
    		} else {
    			$pre_current_text = get_the_title();
    		}
    
    		/** Parse Args ********************************************************/
    
    		// Parse args
    		$r = bbp_parse_args( $args, array(
    
    			// HTML
    			'before'          => '<div class="bbp-breadcrumb"><p>',
    			'after'           => '</p></div>',
    
    			// Separator
    			'sep'             => is_rtl() ? __( '&lsaquo;', 'bbpress' ) : __( '&rsaquo;', 'bbpress' ),
    			'pad_sep'         => 1,
    			'sep_before'      => '<span class="bbp-breadcrumb-sep">',
    			'sep_after'       => '</span>',
    
    			// Crumbs
    			'crumb_before'    => '',
    			'crumb_after'     => '',
    
    			// Home
    			'include_home'    => $pre_include_home,
    			'home_text'       => $pre_front_text,
    
    			// Forum root
    			'include_root'    => $pre_include_root,
    			'root_text'       => $pre_root_text,
    
    			// Current
    			'include_current' => $pre_include_current,
    			'current_text'    => $pre_current_text,
    			'current_before'  => '<span class="bbp-breadcrumb-current">',
    			'current_after'   => '</span>',
    		), 'get_breadcrumb' );
    
    		/** Ancestors *********************************************************/
    
    		// Get post ancestors
    		if ( is_singular() || bbp_is_forum_edit() || bbp_is_topic_edit() || bbp_is_reply_edit() ) {
    			$ancestors = array_reverse( (array) get_post_ancestors( get_the_ID() ) );
    		}
    
    		// Do we want to include a link to home?
    		if ( !empty( $r['include_home'] ) || empty( $r['home_text'] ) ) {
    			$crumbs[] = '<a href="' . trailingslashit( home_url() ) . '" class="bbp-breadcrumb-home">' . $r['home_text'] . '</a>';
    		}
    
    		// Do we want to include a link to the forum root?
    		if ( !empty( $r['include_root'] ) || empty( $r['root_text'] ) ) {
    
    			// Page exists at root slug path, so use its permalink
    			$page = bbp_get_page_by_path( bbp_get_root_slug() );
    			if ( !empty( $page ) ) {
    				$root_url = get_permalink( $page->ID );
    
    			// Use the root slug
    			} else {
    				$root_url = get_post_type_archive_link( bbp_get_forum_post_type() );
    			}
    
    			// Add the breadcrumb
    			//$crumbs[] = '<a href="' . esc_url( $root_url ) . '" class="bbp-breadcrumb-root">' . $r['root_text'] . '</a>';
    		$crumbs[] = '<a href="/forums/">Forums</a>';
    
    		}
    
    		// Ancestors exist
    		if ( !empty( $ancestors ) ) {
    
    			// Loop through parents
    			foreach ( (array) $ancestors as $parent_id ) {
    
    				// Parents
    				$parent = get_post( $parent_id );
    
    				// Skip parent if empty or error
    				if ( empty( $parent ) || is_wp_error( $parent ) )
    					continue;
    
    				// Switch through post_type to ensure correct filters are applied
    				switch ( $parent->post_type ) {
    
    					// Forum
    					case bbp_get_forum_post_type() :
    						$crumbs[] = '<a href="' . esc_url( bbp_get_forum_permalink( $parent->ID ) ) . '" class="bbp-breadcrumb-forum">' . bbp_get_forum_title( $parent->ID ) . '</a>';
    						break;
    
    					// Topic
    					case bbp_get_topic_post_type() :
    						$crumbs[] = '<a href="' . esc_url( bbp_get_topic_permalink( $parent->ID ) ) . '" class="bbp-breadcrumb-topic">' . bbp_get_topic_title( $parent->ID ) . '</a>';
    						break;
    
    					// Reply (Note: not in most themes)
    					case bbp_get_reply_post_type() :
    						$crumbs[] = '<a href="' . esc_url( bbp_get_reply_permalink( $parent->ID ) ) . '" class="bbp-breadcrumb-reply">' . bbp_get_reply_title( $parent->ID ) . '</a>';
    						break;
    
    					// WordPress Post/Page/Other
    					default :
    						$crumbs[] = '<a href="' . esc_url( get_permalink( $parent->ID ) ) . '" class="bbp-breadcrumb-item">' . get_the_title( $parent->ID ) . '</a>';
    						break;
    				}
    			}
    
    		// Edit topic tag
    		} elseif ( bbp_is_topic_tag_edit() ) {
    			$crumbs[] = '<a href="' . esc_url( get_term_link( bbp_get_topic_tag_id(), bbp_get_topic_tag_tax_id() ) ) . '" class="bbp-breadcrumb-topic-tag">' . sprintf( __( 'Topic Tag: %s', 'bbpress' ), bbp_get_topic_tag_name() ) . '</a>';
    
    		// Search
    		} elseif ( bbp_is_search() && bbp_get_search_terms() ) {
    			$crumbs[] = '<a href="' . esc_url( bbp_get_search_url() ) . '" class="bbp-breadcrumb-search">' . esc_html__( 'Search', 'bbpress' ) . '</a>';
    		}
    
    		/** Current ***********************************************************/
    
    		// Add current page to breadcrumb
    		if ( !empty( $r['include_current'] ) || empty( $r['current_text'] ) ) {
    			$crumbs[] = $r['current_before'] . $r['current_text'] . $r['current_after'];
    		}
    
    		/** Separator *********************************************************/
    
    		// Wrap the separator in before/after before padding and filter
    		if ( ! empty( $r['sep'] ) ) {
    			$sep = $r['sep_before'] . $r['sep'] . $r['sep_after'];
    		}
    
    		// Pad the separator
    		if ( !empty( $r['pad_sep'] ) ) {
    			if ( function_exists( 'mb_strlen' ) ) {
    				$sep = str_pad( $sep, mb_strlen( $sep ) + ( (int) $r['pad_sep'] * 2 ), ' ', STR_PAD_BOTH );
    			} else {
    				$sep = str_pad( $sep, strlen( $sep ) + ( (int) $r['pad_sep'] * 2 ), ' ', STR_PAD_BOTH );
    			}
    		}
    
    		/** Finish Up *********************************************************/
    
    		// Filter the separator and breadcrumb
    		$sep    = apply_filters( 'bbp_breadcrumb_separator', $sep    );
    		$crumbs = apply_filters( 'bbp_breadcrumbs',          $crumbs );
    
    		// Build the trail
    		$trail  = !empty( $crumbs ) ? ( $r['before'] . $r['crumb_before'] . implode( $sep . $r['crumb_after'] . $r['crumb_before'] , $crumbs ) . $r['crumb_after'] . $r['after'] ) : '';
    
    		return apply_filters( 'change_root', $trail, $crumbs, $r );
    	}
    
    add_filter ('bbp_get_breadcrumb', 'change_root') ;

    pulled from a thread I did long ago

    I don’t know how code aware you are to change this to what you want, so come back and let me know – it would take me a while to work out what to change, and I really don’t want to do this if you are capable !

    #172429
    stewmills
    Participant

    Ok…I have scoured the bbPress forum and have tried several things and seem to be getting nowhere…and losing my mind at the same time.

    I have:
    WP 4.4.2
    bbPress 2.5.8
    BuddyPress 2.4.3
    Karma theme 3.0.3

    I set-up the forum using method 2, which is a page called “userforum” containing the shortcode [bbp-forum-index] and the forum displays just fine and as well shows my left sidebar which houses my login and other widgets. I want this sidebar on ALL forum pages and by creating a bbpress.php page I think I resolved the previous issue where I couldn’t see my sidebar on all pages. I should also note that my forum root slug is set to “forums”.

    So, the issue I have is that when I am on the main forum page (mysite.com/userforum) and drill down into a topic, the breadcrumb it creates is this: Forums > Forum Section > Topic. I can click on any of the breadcrumbs and get the full page with sidebar, but when I click on “Forums” in the breadcrumb it takes me to mysite.com/forums instead of mysite.com/userforum.

    Now you may tell me to change my forum root slug to “userforum” but when I do that and go back to my main forum page at mysite.com/userforum, my sidebar does not display on this page BUT the breadcrumb does not take me back to the main forum page mysite.com/userforum like I wanted.

    So, with that, what the heck am I missing? If someone can help I can get you into my actual forum page to peek under the hood. If there is simple code to add to my child functions.php file that will let me customize the URL or a simple setting I am missing somewhere?

    I have spent way too many hours trying to figure this out and I really need some help here.

    Thanks!

    #172424
    Robin W
    Moderator

    just seen this !

    https://wordpress.org/plugins/woo-login-redirect/

    if you download and unwrap it you’ll see two functions, one the filter above !

    Depending on your site it might take a

    if (is_bbpress()) $redirect = xxtype statement on line 71

    #172414
    joshcarey
    Participant

    @robin-w: The site is currently in local development. And yes, as @casiepa said, I’m not using any particular form, so I’m assuming it defaults to the standard WP login. I am using the woocommerce page and shortcode (woocommerce_my_account) for the “my account” page.


    @casiepa
    : I’ll look through those 2 resources to see if anything there helps.

    #172398
    Pascal Casier
    Moderator

    Hi,
    bbPress should be one of the easiest plugins to install, so it’s a pity to see you leave. Please remember to clean before deactivating (then of course this will not solve your issue that the site goes down, but it’s better to have a clean database): https://codex.bbpress.org/getting-started/installing-bbpress/deleting-bbpress/

    Come back anytime if you want to consider bbPress again.

    Pascal.

    oelen000
    Participant

    Hi, I am using bbpress on a website together with the plugin from LCweb called private content. The problem i have is that registered users cannot see the actual post. They only have the possibility to comment on the post. The text of the post itself is not shown. When i disable private content plugin it’s working great. I had support from LCweb and they told me that they double checked their code and from their side everything was ok and I should look for support at the BBpress forum. Anybody any idea?

    #172380

    In reply to: add a specific class

    Robin W
    Moderator

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-single-forum.php
    bbPress will now use this template instead of the original
    and you can amend this

    amend line 12 to

    <ul id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class('', $classes[] = 'hello' ); ?>>

    #172372

    In reply to: vbulletin 3.x import

    Stephen Edgar
    Keymaster

    The ———————- is typically due to WordPress losing its database connection 🙁

    If you open up a second tab to your /wp-admin page and occasionally refresh that page (30-60mins) that should prevent that from happening again.

    #172361
    junglejim620
    Participant

    Hi bbPress,

    I added a new page with this shortcode [bbp-forum-index] for the forums but freaky the default site “footer level 1 and level 2 widget” disappeared; however when I click the Topic link go to the Topic page is fine showing both footers?

    Can anyone help me how to fix the forum index page to populate the footer?

    Please help, Thanks

    #172357

    In reply to: bbp_new_forum hook

    fterra
    Participant

    Besides that I just noticed that both "save_post_{$post->post_type}" and wp_insert_post are fired automaticaly during editing, to keep the forum saved as a draft.
    So maybe you will benefit more from bbp_forum_attributes_metabox_save really.
    Otherwise you will need some checks to see if it’s not a draft auto-save like in bbPress following code – also note the aforementioned hook being fired at the end:
    (/includes/admin/forums.php)

      /** 
       * Pass the forum attributes for processing 
       * 
       * @since bbPress (r2746) 
       * 
       * @param int $forum_id Forum id 
       * @uses current_user_can() To check if the current user is capable of 
       *                           editing the forum 
       * @uses bbp_get_forum() To get the forum 
       * @uses bbp_is_forum_closed() To check if the forum is closed 
       * @uses bbp_is_forum_category() To check if the forum is a category 
       * @uses bbp_is_forum_private() To check if the forum is private 
       * @uses bbp_close_forum() To close the forum 
       * @uses bbp_open_forum() To open the forum 
       * @uses bbp_categorize_forum() To make the forum a category 
       * @uses bbp_normalize_forum() To make the forum normal (not category) 
       * @uses bbp_privatize_forum() To mark the forum as private 
       * @uses bbp_publicize_forum() To mark the forum as public 
       * @uses do_action() Calls 'bbp_forum_attributes_metabox_save' with the 
       *                    forum id 
       * @return int Forum id 
       */ 
      public function attributes_metabox_save( $forum_id ) { 
     
          if ( $this->bail() ) return $forum_id; 
     
          // Bail if doing an autosave 
          if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) 
              return $forum_id; 
     
          // Bail if not a post request 
          if ( ! bbp_is_post_request() ) 
              return $forum_id; 
     
          // Nonce check 
          if ( empty( $_POST['bbp_forum_metabox'] ) || !wp_verify_nonce( $_POST['bbp_forum_metabox'], 'bbp_forum_metabox_save' ) ) 
              return $forum_id; 
     
          // Only save for forum post-types 
          if ( ! bbp_is_forum( $forum_id ) ) 
              return $forum_id; 
     
          // Bail if current user cannot edit this forum 
          if ( !current_user_can( 'edit_forum', $forum_id ) ) 
              return $forum_id; 
     
          // Parent ID 
          $parent_id = ( !empty( $_POST['parent_id'] ) && is_numeric( $_POST['parent_id'] ) ) ? (int) $_POST['parent_id'] : 0; 
     
          // Update the forum meta bidness 
          bbp_update_forum( array( 
              'forum_id' => $forum_id,  
              'post_parent' => (int) $parent_id 
     ) ); 
     
          do_action( 'bbp_forum_attributes_metabox_save', $forum_id ); 
     
          return $forum_id; 
      } 
    #172355

    In reply to: bbp_new_forum hook

    fterra
    Participant

    If you use wp_insert_post, remember to check if the post being saved is a forum.
    Default forum type value is 'forum'.
    But you should use bbp_get_forum_post_type() to use its current value in case it has been altered by some filter.
    You may also take advantage of the following wordpress dynamic hook:
    "save_post_{$post->post_type}"
    which you would hook to with something like:
    add_action("save_post_" . bbp_get_forum_post_type(), "my_hook");

    #172350
    Pascal Casier
    Moderator
    #172349

    In reply to: bbp_new_forum hook

    fterra
    Participant

    Yes, @antipole,
    after I wrote to you I tried the bbp_forum_attributes_metabox_save hook and it has worked for me.
    But I guess it’s also possible to use wp_insert_post hook as suggested by John James Jacoby.
    bbp_forum_attributes_metabox_save will most likely fire only in admin page.
    On the other hand wp_insert_post will most likely fire both in admin page and front-end. Seems like front-end forum creation requires the use of [bbp-forum-form] shortcode, which I have never tried.

    Robin W
    Moderator

    the issue is not in creating the functionality, but in styling

    for instance you get the posts column using bbp_get_forum_topic_count($forum_id)

    but need styling to add that to the list of forums, which depends on how your theme does it.

    #172338

    In reply to: Spectate capability

    Pascal Casier
    Moderator

    Hi,
    You could create a new role based on the spectate. Follow our codex on https://codex.bbpress.org/custom-capabilities/

    If you want to limit topic creation for a specific forum, you can also have a look if my ‘bbP Toolkit’ plugin can help. It has a ‘protected forum’ possibility to allow only specific roles to create topics on some forums.

    Pascal.

    siparker
    Participant

    Ok, so if i can find someone to do the work and get the urls fixed then submit the code into trac it might get integrated into the core by someone in the future?

    I understand about the money thing also. I am just trying to think of a way to kickstart the development on the platform again as its on its way to being a really good forum software. it has almost all of the basics covered and some great plugins too. its just those few bits that mean it cant be used by some people. I would love to see bbpress be the defacto choice over phpbb or vbulletin and thought if i could sponsor the development then perhaps it might encourage a valuable dev to get more involved?

    #172319
    Robin W
    Moderator

    ok, sorry been tied up elsewhere, and only just got back to looking at this.

    I think I can get it working and would suggest you do the following

    1. take a copy of page.php and save it into your theme as bbpress.php

    so you end up with

    wp-content/themes/%mytheme%/bbpress.php where %mytheme% is your currently active theme’s name.

    Now edit that file as follows

    The theme seems to be looking for a value of the sidebar for the post meta of the page ID. Since I suspect that bbpress is not having that at that point, it can’t look it up.

    Now the page.php (which is now bbpress.php!) tries to set this in line 4 using

    $sidebar = get_post_meta($id, "qode_show-sidebar", true);

    and then the page.php (which is now bbpress.php!) later on looks for what value between 1 and 4 that is set to, which would determine what if any sidebars are shown.

    therefore in bbpress.php try changing line 4 from

    $sidebar = 1

    save the file and see what happens

    then try
    $sidebar = 2
    $sidebar = 3
    $sidebar = 4

    each should change what sidebar appears and where, so you should be able to get one working !

    Do come back if anything isn’t clear, or if you need further help, or just to tell us that we’re wonderful (or rubbish!)

    #172316

    Topic: add a specific class

    in forum Themes
    neecride
    Participant

    Hello,

    I look for how to add a class css on loop-single-forum.php line 12

    <ul id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class(); ?>>

    on default bbp_forum_class();

    sorry I’m french ! I do not understand English too

    Pascal Casier
    Moderator

    Hi siparker,

    I won’t start about your first line about the ‘money’, but for adding new functionalities of finding code for existing tickets, https://bbpress.trac.wordpress.org is one of the places that can be used for that. If a ticket is there and there is code attached, it makes a fair chance to be added into future versions.

    Pascal.

Viewing 25 results - 6,801 through 6,825 (of 32,505 total)
Skip to toolbar