Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 2,076 through 2,100 (of 32,481 total)
  • Author
    Search Results
  • #217075
    Robin W
    Moderator

    sorry I am confused …I can give you code to go to any url, but unless you create some content for that url, it will 404.

    what are you expecting it to do when you click that link ?

    #217073
    Robin W
    Moderator
    add_action( 'bbp_template_after_user_details_menu_items', 'rew_add_item' ); 
    
    function rew_add_item () {
    	?>
    	<ul>
    		<li class="pictures">
    			<span class="pictures-link">
    				<?php
    				$username =  bbp_get_user_nicename(bbp_get_displayed_user_id());
    				echo '<a href="http://localhost/projects/wpdev2/forums/users/'.$username.'/my-stories/">Click to show picture</a>' ;
    				?>	
    			</span>
    			</li>
    	</ul>
    <?php	
    }
    #217069
    Robin W
    Moderator

    sorry, I don’t fully understand – the code will take you to any url you want.

    do you mean user specific?

    or if you got it working in buddypress what code did you use there?

    or maybe describe what you want to achieve?

    #217067
    Robin W
    Moderator
    add_action( 'bbp_template_after_user_details_menu_items', 'rew_add_item' ); 
    
    function rew_add_item () {
    	?>
    	<ul>
    		<li class="pictures">
    			<span class="pictures-link">
    					<a href="https://prnt.sc/wcemvm">Click to show picture</a>
    				</span>
    			</li>
    	</ul>
    <?php	
    }
    #217064
    Robin W
    Moderator

    ok, so you could use the hook in the standard template to add the item in a plugin

    <?php do_action( 'bbp_template_after_user_details_menu_items' ); ?>

    #217056
    sbask
    Participant

    Wordpress code, no jetpack

    multi65
    Participant

    Hello Robin

    Thank you for the code.
    I added it to my child theme’s function file and the link is now displayed in my forums page.

    However, whenever I click the link it doesn’t seem to work. Meaning, it doesn’t lead to anywhere. Is there something else I need to do other than that to get the link to work?

    -M

    Robin W
    Moderator

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

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

    or use

    Code Snippets

    add_action ( 'bbp_template_before_single_forum', 'rew_create_new_topic' ) ;
    
    function rew_create_new_topic () {
    	$text='Create New Topic' ;
    	if ( bbp_current_user_can_access_create_topic_form() && !bbp_is_forum_category() ) {
    	$href = '#new-post'  ;
    	echo '<div class="rew-new-topic">  <a href ="'.$href.'">'.$text.'</a></div>' ;
    	}
    }

    but you’ll have to work out how to style it yourself I’m afraid !!

    multi65
    Participant

    Hello,

    Using the [bbp-topic-form] shortcode, users will have to choose from a dropdown list in order to post a topic. Of course, this can cause some issues as users can often post in the wrong forums without knowing it.

    How can bbpresss forum functionality be configured so that users can press a ‘create a new topic’ button, press enter, and that topic is automatically posted in the forum where the ‘create a new topic’ button was situated?

    Thank you

    #217035
    Robin W
    Moderator

    You are right to be wary of ‘old’ plugins, and not just install without thinking about it, but this one just hooks to stable bbpress code elements.

    #217011

    In reply to: bbpress log in process

    Robin W
    Moderator

    you should note that under the code above, if in

    dashboard>users>edit user

    you set the forum role to ‘no role for these forums’ it will simply add them back as participant when they next log in

    #217007

    In reply to: bbpress log in process

    Robin W
    Moderator

    you are right ! Looks like it change on 2.6.

    It now does it on register

    so to change back to how it used to work

    in

    dashboard>settings>forums untick Automatically give registered visitors…etc

    Then put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

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

    or use

    Code Snippets

    add_action('wp_login', 'rew_add_role');
    
    function 'rew_add_role' () {
    	$user_id = $user->ID ; 
    	$role = bbp_get_user_role( $user_id );
    	if (empty($role)) {
    		bbp_set_user_role( $user_id, 'bbp_participant' );
    	}
    }

    This code is untested, but should work, if not come back

    #217001
    sbask
    Participant

    https://domain/forums/view/my-subscribed-topics/
    and https://domain/forums/users/user/subscriptions/

    should show them same information correct? Or should there be a difference? I’m looking at the codec and can’t figure out why “my-subscribed-topics” should have a difference with the topics section under subscriptions

    #216982
    Robin W
    Moderator

    put this in your themes custom css

    a.bbpressloginurl, 
    a.bbpressregisterurl,
    a.bbpresslostpasswordurl
    {
    font-size : 16px ;
    font-weight: bold;
    
    }
    #216934
    khubaib927
    Participant

    yes, i do have that shortcode on my page

    #216927
    Robin W
    Moderator

    Probably a theme issue, so do you have the shortcode [bbp-forum-index] in your forums page ?

    #216920
    erich199
    Participant

    @robin-w , I must have misread what you posted then. I’ll go back and take a look. I was using the shortcode [bsp-display-topic-index show=’1′ forum =’10’ template = ‘short’ show_stickies=’true’ noreply=’true’]

    #216918
    Robin W
    Moderator

    there is a short code in my style pack above that does this as stated above 🙂

    #216917
    erich199
    Participant

    Sorry I might not have explained what I’m trying to accomplish properly.

    The shortcode I’m currently using on my live site is this:
    [bbp-single-topic id=4657]

    Just the normal bbpress shortcode to show the content of the actual topic. I used some CSS code to remove the post form and any replies. So it shows only the first post in a topic which is what I want to display as news on my front page from different forums. The shortcode you listed does show the stickies but just the actual forum topic and not the content of the first post of that forum topic.

    I wasn’t sure if there was a shortcode that displays the content of the first post from “x” amount of topics from a specific forum.

    So on my page I have three codes that are pulling a single topic from 3 different forums.

    #216916
    Robin W
    Moderator

    bit confused – the shortcode I gave you without the noreply should do what you require

    what is the exact shortcode you are using?

    #216910
    Henry Chinaski
    Participant

    I’m interested in this too! Did you find the shortcode?

    #216908
    erich199
    Participant

    Hi @robin-w,

    That gets me close to the functionality. I managed to get it displayed properly. You can see at the top of the homepage at tidesofwar.net. I used the single topic shortcode and some css hacks to get it to display how I want it.

    The issue is I have to manually edit the page anytime I want the topic to change.

    #216906
    Robin W
    Moderator

    I think my style pack plugin might do what you want

    bbp style pack

    then use

    [bsp-display-topic-index show=’1′ forum =’10’ template = ‘short’ show_stickies=’true’ noreply=’true’]

    see

    dashboard>settings>bbp style pack>shortcodes for how to use

    #216904
    bolhachefe
    Participant

    @unterwegsinberlin

    First, put this shortcode on a page: [bbp-search-form].

    After, edit the css style of the search form template.

    #216903
    erich199
    Participant

    @bolhachefe,

    Thanks for the information. This does accomplish sort of what I want. I don’t want to feed it just a single topic. I would like it to post the two most recent topics in a specific forum. Perhaps I can hunt for this shortcode code and modify it.

Viewing 25 results - 2,076 through 2,100 (of 32,481 total)
Skip to toolbar