Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 7,726 through 7,750 (of 32,570 total)
  • Author
    Search Results
  • #167399
    Loc Pham
    Participant

    My post stripped the bracket in my endpoints, it should be the following instead:

    http://localhost:8888/wp-json/wp/v2/topic?filter[forum_type]=sports
    http://localhost:8888/wp-json/wp/v2/topic?filter[forum]=sports
    #167396
    Carp Talk
    Participant

    For anyone looking for a better and easier way to do this, i just added this to header.php after the

    							<?php if ( is_user_logged_in() ) { ?>
                
    <li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>" >My Account</a>
                    <ul class='sub-menu'>
    <li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>replies" >My replies</a></li>
    <li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>topics" >My topics</a></li>
    <li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>favorites" >My favorites</a></li>
    <li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>subscriptions" >My subscriptions</a></li>
    <li><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>edit" >Edit profile</a></li>
                    </ul>
                </li>

    It works a treat and i even guessed the edit lol

    #167395
    Carp Talk
    Participant

    Hi guys i have used the code above and it works perfect, one problem i have though is it appears in every menu (3 of them) as shown in the screen shot how do i get it to show only in the top right ?

    Here is the screenshot

    Here is the code i used

    // Filter wp_nav_menu() to 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() && $args->menu->slug == 'right-top-nav')
            return $menu;
        else
            $current_user = wp_get_current_user();
            $user = $current_user->user_login ;
            $class = 'sub-menu';
            $profilelink = '
                <li><a href="/forums/users/' . $user . '/">My Account</a>
                    <ul class=' . $class . '>
                        </li><li><a href="/forums/users/' . $user . '/replies">My Replies</a></li>
                        <li><a href="/forums/users/' . $user . '/topics">My Topics</a></li>
                        <li><a href="/forums/users/' . $user . '/subscriptions">My Subscriptions</a></li>
                        <li><a href="/forums/users/' . $user . '/edit">Edit My Profile</a></li>
                    
                
            ';
            $menu = $menu . $profilelink;
            return $menu;
     
    }<code></code>
    #167394
    Carp Talk
    Participant

    Hi guys i have used the above code but the profile link appears in every menu. How do i add it to just the top menu ?

    #167380
    mica123
    Participant

    @robkk
    Thank you so much. I finally got the wp-login forms working. I even managed to style them by enqueuing the login style sheet. Here I have a question – I used the following:

    function my_login_stylesheet() {
        wp_enqueue_style( 'custom-login', get_template_directory_uri() . '/style-login.css' );
        wp_enqueue_script( 'custom-login', get_template_directory_uri() . '/style-login.js' );
    }
    add_action( 'login_enqueue_scripts', 'my_login_stylesheet' );

    This is fine, but the style sheet is loaded in my theme directory (responsive). I tried to load it into my child theme (responsive-child-theme) but it doesn’t work. Is the maian theme directory the correct location? What happens if the theme is updated?

    All this is new to me as I never set up a forum before, just websites. I am concerned about security. I am going to install Akismet. Should I also do something about honeypot registration? If so, what would you recommend? Would you also recommend reCaptcha? If so, what would be the best way to implement it?
    Many thanks.

    #167363
    Robkk
    Moderator

    In the code I posted the menu links should lead to the default WordPress forms.

    Login, Register, Lost Password links

    Other plugins can add frontend forms like Theme My Login, woocommerce, some other membership plugins.

    I am basically saying the bbPress forms are incomplete in functionality, it might be better to use something else like the default WordPress forms.

    #167357
    mica123
    Participant

    Yes, I am using the bbpress forms. Where would I find the default WordPress forms? Also, by other frontend forms – I am not sure what you mean? It is just difficult for me to understand that by not using the bbpress forms, redirects will show error messages without any code?

    #167356
    Robkk
    Moderator

    Are you trying to use the bbPress shortcodes in pages for logging in and registering??

    These forms are really incomplete in functionality, they don’t redirect back to the login form and show error messages above that form, it just redirects to the default WordPress form to show the error messages. I think using the default WordPress forms or other frontend forms are better for now.

    #167347
    mica123
    Participant

    @robkk I have now tried your code and it works beautifully. The links show up in the sub-header-menu. The login and logout redirect works too. As I am trying this out on my local computer I don’t know if the reset and lost password redirect would work as well?

    There is another problem: if I click on login or reset or lost password button without giving a user name and password, it goes to the standard WordPress login page which is not good at all. Can this be remedied? We are almost there.
    Many, many thanks.

    #167328
    GreatOldiesDJ
    Participant

    Hi and thanks for that update. I saw that little icon but I didn’t realize what it was. Your code change took care of it.

    #167325
    Robkk
    Moderator

    I think you just copied form-user-register.php into your theme and added that text, not entirely sure though.

    #167318
    Robkk
    Moderator

    Use background: none; in the submit buttons CSS. The little icon image is showing.

    I edited the other reply I posted code, so you can just copy over the code over again.

    #167316
    tkse
    Participant

    Wow, I’m sorry. I didn’t realize I had forgotten this line.

    I noticed the second line I had in my code was to disable the HTML editor, not teeny. However, is it possible to display the HTML editor only for moderators and above?

    #167314
    GreatOldiesDJ
    Participant

    Hi again. This code worked perfectly. Thanks you very much for your help!

    #167313
    Robkk
    Moderator

    Here try some of this custom CSS, put it in your child theme or in a custom css plugin.

    This is for the submit button

    #bbpress-forums #bbp-search-form input[type=submit], 
    #bbpress-forums #bbp-search-form input[type=submit] {
        text-indent: 0;
        background: none;
        background-color: #3F51B5;
        color: #fff;
        width: auto;
        height: auto;
        border-radius: 0;
        margin-top: 0;
    }

    This is for the search input.

    #bbpress-forums #bbp-search-form input[type=text], 
    #bbpress-forums #bbp-search-form input[type=text] {
        border: 1px solid #3F51B5;
    }
    #167312
    Robkk
    Moderator

    You did add this argument right?? Having this at false shows the full editor. Some button may be not usuable for the forums though, so you need to move them around in the TinyMCE advanced plugin settings.

    $args['teeny'] = false;

    #167309
    BewitchingFiction
    Participant

    As a minor update, even the word cocktails appears to be blacklisted though I have no idea WHERE this blacklist is – is it possible to just remove that ‘check blacklist’ code from BBPress because it’s ridiculous – I don’t want it to check something that I have no control over just because, especially when I don’t even know where this list is.

    #167306
    project_subdomain
    Participant

    thanks @robkk. makes sense, think it’s not in the codex.
    I’ve got a navigation menu with links to specific topics (made with the backend’s customizer). Would like to add the correct count to each navigation menu link.

    Suppose that it would be easier to create a new custom navigation menu via functions as it’s not that easy to target the specific locations, right?

    But in case you have an idea how to target those customizer created links to add a count, this surely would help for many other things as well.

    #167290
    Robkk
    Moderator

    Here is the code for that exact error notice. bbp_check_for_blacklist is checking the comment blacklist in Settings > Discussion. Since you said that you do not have anything in the blacklist do you have another plugin with a blacklist that could be hooking into the default comment blacklist??

    /** Reply Blacklist *******************************************************/
    	if ( ! bbp_check_for_blacklist( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) {
    		bbp_add_error( 'bbp_reply_blacklist', __( '<strong>ERROR</strong>: Your reply cannot be created at this time.', 'bbpress' ) );
    	}
    nikhilnaik
    Participant

    Hello @8ball106,

    I was looking for this code! I want to know the forums that user is subscribed to! Can you tell me how do I use this code to view the user’s subscribed forums?

    #167278
    iron_cP
    Participant

    Hello to ALL!

    First, my English is not perfect. But i hope some people understand my problem.

    I use the Theme great! But the this theme make same troubble with bbpress. The Answers will displayed in the top of Page, behind the Black Admin Bar. If i change the Theme to Twenty Fifteen it Looks fine! In the Documentation i read, i have to move a page to bbpess.php .. but it will not work .. can anyone tell me what i have to do. i only want the twenty Fifteen Forum Theme code use in my Great! Theme !

    Thanks and greets!

    IRoN

    #167275
    Robkk
    Moderator

    You can use this CSS to remove it. Add the CSS where you can add custom css.

    .bbpress p.howto {
        display: none;
    }
    #167274

    In reply to: Remove author column

    Robkk
    Moderator

    Well you can easily customize bbPress by creating a child theme and placing the bbPress templates into that child theme and edit them with no worries.

    Theme Compatibility

    The author column should be in the loop templates, for example loop-single-reply.php for replies of course. It should be in a div with the class bbp-reply-author. It would be bbp-topic-author if you have are editing the loop-single-topic.php template and so on.

    #167273
    Robkk
    Moderator

    Wait the original code really still doesn’t work.

    It really did work for me, and I have the latest version of WP too.

    #167271
    Robkk
    Moderator

    Sorry I missed your reply.

    The bbPress error is displayed when there is another plugin causing it.

    It is detailed here.

    bbp_setup_current_user was called incorrectly

    You did to see if was a cache, theme, and plugin issue right, and received no resolutions?

    Can you tell me the url you are being directed to instead of the topic pages?? Can you check in your browsers dev tools to tell me the url in the link?

    You are experiencing this issue as a logged in registered user right??

    Did you try reinstalling bbPress as a last resort?? It is possible for an issue to happen during installation because of some server hiccup.

    Has bbPress worked fine before, then it just broke all of a sudden, or was it just broken during a fresh installation??

Viewing 25 results - 7,726 through 7,750 (of 32,570 total)
Skip to toolbar