Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 8,801 through 8,825 (of 32,519 total)
  • Author
    Search Results
  • #162049
    Robkk
    Moderator

    try this CSS

    .bbpress #content-area ul li, 
    .bbpress #content-area ol li {
      margin-left: auto;
    }
    #162047
    Robkk
    Moderator

    you would need to do something like this.

    Since it is hard to guess what your menu’s theme location is , i just put primary.

    This does work in some default themes like Twentyfourteen though.

    add_filter('wp_nav_menu_items','rk_bbp_menu_profile_link', 10, 2);
    function rk_bbp_menu_profile_link( $items, $args ) {
        if( is_user_logged_in() && $args->theme_location == 'primary')  {
    		
    	$current_user = wp_get_current_user();
            $user = $current_user->user_login ;
    	$profilelink = '<a href="/forums/users/' . $user . '/edit">Edit Profile</a>';
            $items .=  '<li>' . $profilelink .  '</li>';
    
    	}
        return $items;
    }
    #162042
    Robin W
    Moderator

    I can’t see that you implemented this code – is it still there?

    #162040
    Sebastian
    Participant

    Hi,

    Is used the code snippet from the codex and it worked fine.

    How could I modify the code to choose a specific menu?

    E.g. primary oder secondary. Actually “Edit Profil” is shown in all my menues and I just want to have it on my Primary Menu.

    // Filter wp_nav_menu() to add profile link
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' );
    function my_nav_menu_profile_link($menu) {
        if (!is_user_logged_in())
            return $menu;
        else
            $current_user = wp_get_current_user();
            $user=$current_user->user_login ;
            $profilelink = '<li><a href="/forums/users/' . $user . '/edit">Edit Profile</a></li>';
            $menu = $menu . $profilelink;
            return $menu;
     
    }

    Layout and functionality – Examples you can use

    Thanks!

    #162035
    vpontin
    Participant

    SOLVED
    I just put another add_action and seems to work fine:
    add_action( 'wp_print_footer_scripts', 'generico_quicktags' );

    #162033
    dc4x_admin
    Participant

    hii,

    I used this shortcode to see the table with most popular topics on my homepage:
    [bbp-single-view id="popular"]

    the problem is that when user add topics the table get’s longer.
    how can I limit the table rows?

    thank

    #162031
    vpontin
    Participant

    Hi all!
    Its a pretty noob question, but i didn’t find anything related to my issue…

    I added a quicktag to the wordpress default editor


    function generico_quicktags() {

    if ( wp_script_is( 'quicktags' ) ) {
    ?>
    <script type="text/javascript">
    QTags.addButton(
    'pov_generico',
    'POV (Genérico)',
    '[pov-generico]',
    '[/pov-generico]'
    );
    QTags.addButton( 'pov_generico', 'p', '<p class="fala generico">', '</p>', '', 'Fala (Personagem Genérico)', 10 );
    </script>
    <?php
    }

    }
    add_action( 'admin_print_footer_scripts', 'generico_quicktags' );

    But this don’t show in bbpress reply editor. How can i add this there too?

    #162026
    tarnvogL
    Participant

    @robkk for me it doesn’t :/
    any suggestions why?

    I have found the solution. I pasted the code from NickMackz into the area of the IP adress, which was only visible for admins.

    Robin W
    Moderator

    it could be done with code, suggest http://jobs.wordpress.net/ if you dontl have the skills, come back if you have good php, and I’ll point you at a file.

    #162015
    Robin W
    Moderator

    try adding

    # bbpress-forums content-area ul li {
    margin-left: 0px !important;
    }

    to your child theme style.css

    Functions files and child themes – explained !

    #162006
    Robin W
    Moderator

    yes use the shortcode

    [bsp-display-topic-index]

    available in

    https://wordpress.org/plugins/bbp-style-pack/

    once activated see settings>bbp style pack> shortcodes for a full explanation of how to use this

    VeeLow
    Participant

    I added some css in the custom css plugin, in order to get my bbpress forums full-width (drawing the code from an example in these forums). Success! or so I thought.

    But not quite. Now, the “members” pages associated with the pulldown menus at the upper right are “too long”–text entry/text display boxes run over into the space of my right content sidebar. When I deactivate the css plugin, my problem goes away.

    (WP 4.2.2, bbpress 2.5.7, Buddypress 2.2.3.1; theme is TwentyFourteen; I was able to see the same problem previewing 2013.)

    Here’s the css in question:

    .site,
    .site-header {
    	max-width: 100%;
    }
    
    .bbpress-forums .col-2cl .main {
    	background: none repeat-y right 0;
    	padding-right: 0;
    }
    
    .site-content .entry-header,
    .site-content .entry-content,
    .site-content .entry-summary,
    .site-content .entry-meta, 
    .page-content {
    	max-width: 100%;
    }
    
    .form-allowed-tags {
    	display: none;
    }
    
    div.bbp-breadcrumb, 
    div.bbp-topic-tags {
    	font-size: inherit !important;
    }
    
    #bbpress-forums ul.bbp-lead-topic, 
    #bbpress-forums ul.bbp-topics, 
    #bbpress-forums ul.bbp-forums, 
    #bbpress-forums ul.bbp-replies, 
    #bbpress-forums ul.bbp-search-results {
    	font-size: inherit !important;
    }
    
    #bbpress-forums {
    	font-size: inherit !important;
    }
    
    .bbpress .hentry {
    	margin: 0 auto 48px;
    	max-width: 100%;
    }
    
    @media screen and (min-width: 1008px) {
    	.bbpress .site-content {
    		margin-right: 0;
    		margin-left: 182px;
    	}
    }
    
    @media screen and (min-width: 1080px) {
    	.bbpress .site-content {
    		margin-left: 222px;
    	}
    }
    
    @media screen and (min-width: 1218px) {
    	.bbpress .site-content .entry-content {
    		margin-right: 0;
    	}
    }
    
    @media screen and (min-width: 673px) {
    	.bbpress .site-content {
    		margin-right: 0;
    	}
    }

    Can anyone help? I’d love to keep the full-width forum pages, but if it messes up the member pages, it’s a deal breaker…

    crzyhrse
    Participant

    And a year later I must add my thanks- I also have been able to use all this so that it works nicely, including the additional location field and with both website and/or location showing in the profile only if it is filled in…

    Getting the location to show in the profile properly took a little more than the changes Steven mentions making to Robin’s code… For anyone else who might come this way here is all of it put together…

    /* Add Location field to bbPress user profile page.
     */
    function ntwb_user_contact_methods_location( $user_contact ){
    
    	/* Add user contact methods */
    	$user_contact['location'] = __('Location');
    
    	return $user_contact;
    }
    add_filter('user_contactmethods', 'ntwb_user_contact_methods_location');
    
    /* Show Location in bbPress user profile.
     */
    function user_profile_bbp_location_information()	{
    //this function adds the location to the profile display menu
    	$location=bbp_get_displayed_user_field( 'location' ) ;
    	if ( ! empty($location) ) {
    		$label1 =  $rpi_options['item1_label'] ;
    		echo "<p>" ;
    		printf ( __( 'Location : ', 'bbpress' ));
    		echo $location;
    		echo"</p>" ;
    	}
    }
    add_action ('bbp_template_after_user_profile', 'user_profile_bbp_location_information') ;
    
    /* Show website in bbPress user profile.
     */
    function user_profile_bbp_website_information()	{
    //this function adds the website to the profile display menu
    	$url=bbp_get_displayed_user_field( 'user_url' ) ;
    	if ( ! empty($url) ) {
    		$label1 =  $rpi_options['item1_label'] ;
    		echo "<p>" ;
    		printf ( __( 'Website : ', 'bbpress' ));
    		$url='<a href="'.$url.'">'.$url.'</a>';
    		echo $url;
    		echo"</p>" ;
    	}
    }
    add_action ('bbp_template_after_user_profile', 'user_profile_bbp_website_information') ;
    
    #161990
    Master
    Participant

    Did posible use some diferent like this

    <?php if (bbp_get_topic_forum_id() == bbp_get_forum_id('3263')) : ?>

    this show category name for topick from number did posible use letter and from etc category general?

    This work fine http://prntscr.com/73ah8d but u wont use letter not number

    #161981
    davelr1
    Participant

    Is there any way instead of allowing the tag, just strip the code out?

    #161974
    DevynCJohnson
    Participant

    @robkk , thanks. Actually, I had written some code like that for my website late last night. The result can be seen in action at http://dcjtech.info/forum/articles/operating-systems/linux/ . I even figured out how to migrate the bbpress-simple-view-counts data to my implementation. The migration was easy (a few SQL queries via phpMyAdmin) and not at all complex as other developers thought (https://wordpress.org/support/topic/sync-with-simple-view-counts).

    brinkingyellows
    Participant

    Hello!

    First, I want to say how much I appreciate the BBpress platform. I’ve been using it for over a year now and it has served the site well.

    I have ran into an issue where every single comment ever made on posts now appear below the forums. I’m completely baffled as to how to handle this. It does seem to be a theme issue as this does not happen with the TwentyFifteen theme. Is there a way to remove showing the comments altogether on any forum page (which is preferred actually).

    Has anyone had this same issue? Is there a way to simply have the comments not show up at all in the forums? Is there code that I can place in my functions.php that will make them not appear in the forums?

    Any and all help would be greatly appreciated. As of now, this issue is causing some confusion and making my pages extremely long.

    My site is FREEDOMcgc.com
    Link to where the issue is happening: CLICK HERE

    WordPress Version WordPress 4.2.2
    bbpress Version 2.5.7
    Buddypress Version 2.2.3.1

    #161968
    Benjamin Zekavica
    Participant

    I am use Sahifa from Themeforest. I put all the codes in the Theme.

    #161967
    Hope
    Participant

    Actually I already added ‘style’ to ‘span’, I added the paragraph ‘p’ as you mentioned but still the same issue!

    Here’s the part of the HTML page that is treated in the function but still HTML tags appear in the post:

    <p>
    <span style="text-decoration: underline; color:
    <a class="hashtag" rel="nofollow" href="http://localhost/wordpress/forums/search/?bbp_search=%23000080">#000080</a>
    ;”>
    <em>
    <strong>
    <span style="font-size: 12pt;font-family: arial,helvetica,sans-serif">test</span>
    </strong>
    </em>
    </p>

    Again, have I missed something?

    Thanks for your help
    Hope

    #161963

    In reply to: shortcodes meeaning

    Robkk
    Moderator

    its all self explatory really.

    you can test them out by creating a test page and putting each shortcode into it to see what it does.

    if you need help finding ids of bbPress post types install this plugin, then look in the certain post types section.

    like say forums , you go to the WordPress back-end and go to forums> all forums and you will see all the forums post id to use for these shortcodes. It would be close to the same procedure for topics and replies.

    https://wordpress.org/plugins/reveal-ids-for-wp-admin-25/

    #161962
    Robkk
    Moderator

    i tried to make this and failed at it.

    you can look for tutorials on the web for creating this type of thing like this.

    bbPress Recent Replies Shortcode

    or you can hire a developer to create this type of functionality for you.

    if you need to post a job at http://jobs.wordpress.net/

    #161958
    Robkk
    Moderator

    you of course pass the ids of the specific forums and categories in each ()

    this for category

    if( bbp_is_forum_category() ) {

    and i think this for forum

    if( bbp_is_forum() ) {

    #161948
    Robkk
    Moderator

    explain to me where you put the code and how you did everything so i could see if you did anything wrong or not.

    and also what theme are you using.

    #161945
    Robkk
    Moderator

    I’d set these to show short excerpts only

    is this an option in your themes settings??

    but im going to assume your theme thinks bbPress is a blog post , adn that you should create a bbpress.php file and remove any unwanted code.

    https://codex.bbpress.org/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    this plugin will help you find the right file to copy to create a bbpress.php file.

    https://wordpress.org/plugins/what-the-file/

    #161943
    Robkk
    Moderator

    bbPress shouldnt have comments??

    if you havent already create a bbpress.php file and remove any code for WordPress comments.

    https://codex.bbpress.org/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    this plugin will help find the file you have to make a copy of to create a bbpress.php file

    https://wordpress.org/plugins/what-the-file/

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