Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 4,951 through 4,975 (of 32,481 total)
  • Author
    Search Results
  • #186360
    Robin W
    Moderator

    ok, you have two choices

    either use the default wordpress lost password and register

    http://mysite.com/wp-login.php?action=lostpassword
    http://mysite.com/wp-login.php?action=register

    obviously changing the ‘mysite.com’ to your sites name

    or create pages within your site and use the bbpress shortcodes
    and then reference the page url

    eg create a page called ‘password’ and have it’s permalink as say ‘password’ and put
    [bbp-login] as the page content (you can precede this with any text you like, or have text after) eg

    Lost you password?- enter your email and we'll send a new one straight to you
    [bbp-login]

    Then in the widget you would put

    http://mysite.com/password/
    

    you can do the same with [bbp-register] to display the register screen.

    themichaelglenn
    Participant

    I’m looking for a way to automatically assign a forum’s custom taxonomy to all of that forum’s topics.

    I recently registered a custom taxonomy that I want to share across all pages, posts, forums and topics, and since I create most of the content on my site, assigning the right taxonomy to pages, posts, and forums is easy. But I’d rather not have to manually assign taxonomy to topics, especially since any of my members can create a new topic at any time.

    Is there a way to tell WP to get the taxonomy for the parent forum, and automatically save all topics in that forum with the exact same taxonomy?

    (If it helps, this is the code I used to register a custom taxonomy to be used on all pages, posts, forums and topics):

    // Add custom taxonomy
    function postcats_init() {
    	// create a new taxonomy
    	register_taxonomy(
    		'game-categories',
    		array('post','page','forum','topic'),
    		array(
    			'label' => __( 'Games' ),
    			'rewrite' => array( 'slug' => 'game-posts' ),
        'hierarchical'      => true,
        'capabilities' => array(
    				'assign_terms' => 'edit_pages',
    				'edit_terms' => 'manage_categories',
        		'assign_terms' => 'edit_pages'
    			)
    		)
    	);
    }
    
    add_action( 'init', 'postcats_init' );
    #186337
    daltmc
    Participant

    I see that, at least it’s not an isolated issue. I did a similar work around with naming a page forum and using the index short code. We created so many test forums and such when we first had issues that it’s very cluttered. We’re working on limping along using only topics.

    Are you on the newest version of wordpress? My theory is it’s either our premium theme or the new WP.

    #186326
    sovvyg
    Participant

    Hi,

    I have no idea why but the forum/topic subscribe button is not appearing next to the breadcrumbs in bbpress forums as it should, i have enabled the functionality in the settings. This has never appeared but i’m probably missing something simple.

    Is there a way to add this next to the forum title rather than in breadcrumbs? I’m not sure how to call it:

    add_action( 'bbp_theme_after_forum_title', 'n8_after_forum_title' );
    function n8_after_forum_title() {
    
    WHAT DO I ADD HERE??
    
    	}

    WP version: 4.8
    BBpress version: 2.5.13

    Thanks!
    Lauren

    Robin W
    Moderator

    so 3 fixes
    1. downgrade to a lesser version of php
    2. upgrade to bbpress 2.6rc3
    3. in bbpress 2.5.13 in includes/forums/functions.php
    change line 1851 from
    $meta_query = $posts_query->get( ‘meta_query’ );

    to
    $meta_query = $posts_query->get( ‘meta_query’, array() );

    and change line 1796 from
    $post_stati = $posts_query->get( 'post_status' );

    to

    $post_stati = $posts_query->get( ‘post_status’ ); 
    if (!is_array($post_stati)){
                                                 $post_stati = array($post_stati);
    }
    Jakob Helmer
    Participant

    edit: when a put all the codes for the custom capabilities in a plugin (so I remove it from the functions.php), I am finally able to change the custom capabilties (by changing them in this plugin).
    Probably it’s because a plugin is loaded before the theme is loaded

    locutus1
    Participant

    I’ve got bbp style pack already. Some things don’t work and it might be the fault of my host because I had another issue that was caused by my host. When entering a forum, “Create new topic” appears automatically. I would like to remove the automatic “Create new topic” message and create a “create new topic” button. bbp style pack makes the button but won’t remove the automatic message. Can anyone suggest another plugin that will let me do this?

    Also, in some of my forums I would like to rename the button from “Create new topic” to something else but only in some of the forums. I’ve been told this can be done with CSS. Can anyone give me the code for this? Thanks.

    #186278
    locutus1
    Participant

    I had a lot of trouble getting registration to work on my site until someone told me my host doesn’t support “membership plugins” which I think means I can’t make login and register pages with short-code like [bbp-login]. So to log people in I just use the default WordPress login. I put “/wp-admin” at the end of my domain to load the page. Then I made a custom link to load it and did the same for register and reset password. Now people can log in and post.

    #186227

    In reply to: HTTP ERROR 500

    Andrew Leonard
    Participant

    OK
    Now I have removed the code above and reset PHP to version 7.0 and it is working
    Is there going to be a fix so BBPress works with PHP 7.1?

    #186226

    In reply to: HTTP ERROR 500

    Andrew Leonard
    Participant

    I just tried entering the code:
    if (!is_array($post_stati)){
    $post_stati = array($post_stati);
    }
    and now I get to: https://ebps.org.uk/forums/forum/biology/ and get a “Not found”

    #186225

    Topic: HTTP ERROR 500

    in forum Installation
    Andrew Leonard
    Participant

    I am getting a HTTP ERROR 500 when I click on a Forum e.g.: https://ebps.org.uk/forums/forum/biology/
    If I click on a post – it works, i.e: https://ebps.org.uk/forums/topic/sporangia-under-the-microscope/
    If I click on “All Forums” from the dashboard, I get the 500 error
    If I click on “NEW Forum” it works
    The error_log says:
    functions.php:1800
    Stack trace:
    #0 /var/sites/e/ebps.org.uk/public_html/wp-includes/class-wp-hook.php(298): bbp_pre_get_posts_normalize_forum_visibility(Object(WP_Query))
    #1 /var/sites/e/ebps.org.uk/public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array)
    #2 /var/sites/e/ebps.org.uk/public_html/wp-includes/plugin.php(515): WP_Hook->do_action(Array)
    #3 /var/sites/e/ebps.org.uk/public_html/wp-includes/class-wp-query.php(1683): do_action_ref_array(‘pre_get_posts’, Array)
    #4 /var/sites/e/ebps.org.uk/public_html/wp-includes/class-wp-query.php(3248): WP_Query->get_posts()
    #5 /var/sites/e/ebps.org.uk/public_html/wp-includes/class-wp.php(617): WP_Query->query(Array)
    #6 /var/sites/e/ebps.org.uk/public_html/wp-includes/class-wp.php(735): WP->query_posts()
    #7 /var/sites/e/ebps.org.uk/public_html/wp-includes/functions.php(955): WP->main(”)
    #8 /var/sites/e/ebp in /var/sites/e/ebps.org.uk/public_html/wp-content/plugins/bbpress/includes/forums/functions.php on line 1800

    This is the code
    1793 /** Default ***********************************************************/
    1794
    1795 // Get any existing post status
    1796 $post_stati = $posts_query->get( ‘post_status’ );
    1797
    1798 // Default to public status
    1799 if ( empty( $post_stati ) ) {
    1800 $post_stati[] = bbp_get_public_status_id();

    Any ideas?

    #186214

    In reply to: My bbpress login

    peet91
    Participant

    Hi, do you try bbpress shortcodes ?

    Here – https://codex.bbpress.org/features/shortcodes/

    locutus1
    Participant

    The site that hosts my wordpress site told me that they don’t allow membership plugins on wordpress sites. So I can’t make login and register pages and put shortcode in them which is what many people do. My host says users can register and login via a different window which they sent me a picture of. I don’t know how to do an attachment so I’ll describe it. There’s 2 text boxes. The first one is “Username or email address” and the second one is Password. Above the small window is a big white capital W in a blue circle. Below the window is “Register” and “Lost Password”. I assume this is a default login window. This is what my host wants me to use. How do I set this up? Thanks.

    #186155
    leonliang
    Participant

    Hello,

    I wonder if there is any shortcode that Display Topics that Contain Certain Words? Looks like the documentation doesn’t have any content about this.

    Thank you!
    Leon

    #186152
    ougurlog
    Participant
    case 'popular' :
    				$topics_query = array(
    					'post_type'           => bbp_get_topic_post_type(),
    					'post_parent'         => $settings['parent_forum'],
    					'posts_per_page'      => (int) $settings['max_shown'],
    					'post_status'         => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
    					'ignore_sticky_posts' => true,
    					'no_found_rows'       => true,
    					'meta_key'            => '_bbp_reply_count',
    					'orderby'             => 'meta_value',
    					'order'               => 'DESC'
    
    				);
    				break;
    

    I want to show just topics posted in a day

    #186140
    rajesh896
    Participant

    Make sure you’ve created a custom page titled “new topic” with a friendly url of “new-topic”

    Place the new shortcode we registered into this page:

    [wpmu_bbp_topic]

    This will automatically display contact create form of the selected forum if ID exists in the URL otherwise fall back to default shortcode.

    You can see it in action on my site:
    happy deepavali images 2017

    #186138
    rajesh896
    Participant

    Make sure you’ve created a custom page titled “new topic” with a friendly url of “new-topic”

    Place the new shortcode we registered into this page:

    [wpmu_bbp_topic]

    This will automatically display contact create form of the selected forum if ID exists in the URL otherwise fall back to default shortcode.

    You can see it in action on my site:
    happy deepavali images

    #186137
    willad
    Participant

    Hello, I have also been trying to get a new topic button working for some time. In case it is of help to anyone, this is what seems to work for me.

    I created a wordpress page template “forum.php” and added the following code – it adds a ‘New Question’ button to the forum page but not if it’s the parent forum:

    <?php
    get_header(); 
    
    while ( have_posts() ) : the_post();
    if((($post_type = get_post_type()) == 'forum') ) //make sure we are on a forum
    {
      if(bbp_get_forum_id() != 0) //don't add the button to the parent forum
      {
        ?>
        <a href="<?php echo esc_url( add_query_arg( 'c', bbp_get_forum_id( ), site_url( '/new-topic/' ) ) )?>">New Question</a>
        <?php
      }
    }
    the_content();
    endwhile; // End of the loop.    
    ?>
    <?php get_footer();

    Now when I click the New Question link it opens the page new-topic and the forum I was on when I pressed the button is the forum the new question will be placed in.

    new-topic is a page I created in wordpress, and I gave it a template page-new-topic.php

    It contains the following code:

    <?php
    get_header(); 
    $my_c = get_query_var( 'c' );
    $forum_add_topic='[bbp-topic-form forum_id='.$my_c.']';
    echo do_shortcode($forum_add_topic);
    ?>
    <?php get_footer();

    The line

    <a href="<?php echo esc_url( add_query_arg( 'c', bbp_get_forum_id( ), site_url( '/new-topic/' ) ) )?>">New Question</a>

    in forum.php adds a variable c (which contains the current forum id() -bbp_get_forum_id( ) ) to the url when New Question is clicked.

    In page-new-topic.php this variable c is added to the shortcode [bbp-topic-form forum_id=XXX]

    do_shortcode then runs the shortcode which creates the form.

    I also had to add the following to functions.php to tie the two pages together:

    function add_custom_query_var( $vars ){
      $vars[] = "c";
      return $vars;
    }
    add_filter( 'query_vars', 'add_custom_query_var' );

    You could add this as a plugin if you wish.

    The idea for the shortcode came from this post: post

    How to pass variables through wordpress urls came from this post:

    post-2

    I am new to WordPress and PHP so there may be better ways of doing this but, as I said, this seems to work.

    andrewkusuma
    Participant

    I want to remove/disable totally changing email input value from form-user-edit without using hidden input

    <input type="hidden" name="email" id="email" value="<?php bbp_displayed_user_field( 'user_email', 'edit' ); ?>" class="regular-text" tabindex="<?php bbp_tab_index(); ?>" />

    I want user only change display name, bio, and password only how to do it?

    #186131
    gihan1992
    Participant

    In my forum once i create a user and then going to edit his/her profile edit.php redirects to groups. I couldn’t find any code issue. Help me. Thanks in advance.

    #186128
    gihan1992
    Participant

    In my forum once i create a user and then going to edit his/her profile edit.php redirects to groups. I couldn’t find any code issue. Help me. Thanks in advance.

    jeroi
    Participant

    I have newest WordPress and used it to add bbPress. How ever I have added forum as shortcode to my siten page. How ever When is use top menu to add new topic the box where I chose relative parent category till example gaiming, sell, buy does not work. The box is full of those categoires where to put that topic but I cannot select any one of them only no parent stays selected.

    Is there somehow how I cand fix this?

    #186107
    jstuts5797
    Participant

    Hey there guys… there is a specific element on my bbpress forum that I need to customise and I’ve been through the style crib, the bbpress style sheet, and even the bbpress style pack plugin and can’t sem to find in the code anywhere that will help me customize this element. I have a screen shot but now I realize I can’t use screen shots here. The element is the Reply To: element. I know how to make it non transparent… but I can’t figure out where to set that text color at all. The actual text “Reply To” needs to be a different color so it can be seen. I also think there is a glitch in the boarder as well. Any help would be awesome. Here is a link to my screenshot: http://fjrmbfans.us/wp-content/uploads/2017/08/FORUMscreenshot.jpg you’ll see my issue in the bottom portion. Thanks again for all your help!

    #186105
    nobita
    Participant

    Hi I have same error

    PHP7.1
    bbpress2.5.13

    bbpress/includes/forum/functions.php line:1800

    PHP Fatal error: Uncaught Error: [] operator not supported for strings

    			//$post_stati[] = bbp_get_public_status_id();
    			$post_stati = (array) bbp_get_public_status_id();
    

    It worked for me

    #186088
    bullarni
    Participant

    Hey All

    Forgive me if this has already been discussed but I was wondering if a fix to the pagination links of threads with 100 or more pages of replies has been resolved as part of 2.6?

    The issue is discussed here along with code that resolves the problem:

    Links to last post are wrong (pagination issue?)

    Thanks!

Viewing 25 results - 4,951 through 4,975 (of 32,481 total)
Skip to toolbar