Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 7,276 through 7,300 (of 32,519 total)
  • Author
    Search Results
  • #169456
    Robkk
    Moderator

    I am not sure where to put the above or which ones to use.

    Place the php code snippet into your child themes functions.php file or place the snippet in a plugin like functionality.

    #169452
    whassell
    Participant

    Undefined variable: bbp_forums_noheader in /wp-content/themes/multinews/bbpress/loop-forums.php on line 19

    any suggestions what this might be?
    Thanks

    #169410

    In reply to: Login page

    Pascal Casier
    Moderator

    Hi,
    You could use the redirect feature of the login that results in a URL like this:
    http://www.example.com/login/?redirect_to=http%3A%2F%2Fwww.example.com%2Fmyfolder%2Fmypage%2F

    Pascal.

    #169387
    bschaich
    Participant

    All I want is a forum on the entry site of my wordpress and nothing else. I supposed that for this I need to make a page and use one of the bbpress shortcodes. BUT this does not work. No matter what I enter as a shortcode, I get back an empty page.

    I’ve seen some old entries that there is a “whitelist” plugin, but there is no mentioning anywhere on bbpress that this is needed -I don’t get it.

    Could anyone help here and enlighten me?

    Regards,
    Benny

    Vickymedia
    Participant

    Hello,

    Thanks for a quick reply but can I add the above code in Custom URL in Menu in wordpress ?

    or where exactly should I use it in which file. and any con ditional logic to be implemented ?

    Thanks,
    Vicky

    Pascal Casier
    Moderator

    Hi Vicky,
    Does this help ?
    <a href="'. wp_logout_url() .'">Log Out</a>
    Pascal.

    Pascal Casier
    Moderator

    Hi,

    What you want to obtain is not just a basic setting in bbPress that you can switch on. It requires changing one of basic php files. As the golden rule is to never change any bbPress files directly, there are different ways of coming to what you want, in this case it would be copying the file from the bbPress folder/directory and modifying it. Information on creating a child theme can be found on the codex: https://codex.bbpress.org/functions-files-and-child-themes-explained/

    Hope that helps,
    Pascal.

    #169363
    seyibest
    Participant

    Thanks @Robkk for the respond. but i have question about

    Put this loop-forums.php file in your child theme in a folder called bbpress.

    i only have child theme for the theme but bbprss is a plugin. are you saying i have to create a child theme for the plugin bbpress of how do i do that please?

    There is a plugin called bbp style pack that can give you a shortcode to display the latest number of topics on your site. bbPress has this shortcode for the forum archive, [bbp-forum-index]

    You said there is a plugin to display latest post, how do i get the plugin?

    Thank you so much.

    Pascal Casier
    Moderator

    Hi,
    To remove the messages above and below, you could use CSS like:

    		.bbp-template-notice {
    			display: none;
    		}

    or use a plugin like bbP Toolkit.

    To change the message so it includes the standard bbPress login, you would have to copy ‘bbpress/templates/default/bbpress/form-reply.php’ to your child theme and then adapt the file. On line 175 add:
    <p> <?php echo do_shortcode ('[bbp-login]') ; ?>
    so that it becomes:

    <p><?php is_user_logged_in() ? _e( 'You cannot reply to this topic.', 'bbpress' ) : _e( 'You must be logged in to reply to this topic.', 'bbpress' ); ?></p>
     <p><?php echo do_shortcode ('[bbp-login]') ; ?></p>

    If you want to do something different, this is anyway the place to start from.

    Pascal.

    #169333
    Robkk
    Moderator

    My function is just using a hook and some custom code to add an image. Put the code in your child themes functions.php file instead.

    #169329

    In reply to: smiley emoticons

    Robkk
    Moderator

    Please find enclosed a link for the test Website:

    Well I am not seeing an issue with my forums disappearing with WP Monalisa activated.

    Where do I activate TinyMCE and find the default toolbar editor in WordPress? Or are you talking about BBPress Dashboard?

    Well your not using TinyMCE so you would see the error I come across. Like said there is an issue, so you may not need to activate it. There is a plugin on wordpress repository and a code snippet in the codex to allow TinyMCE.

    As previously mentioned it didn’t work with a freshly installed bbPress Website. I had nothing else installed except the bbPress Forum. The enclosed totius.tk however is now a plugin.

    Yes, wordpress plugins do not work for the old standalone version, but with the plugin version. I cannot test to see if an install of bbPress v1 would cause an issue, as I cannot run this on wamp. Kind of do not know how to install bbPress v1 anyway.

    Sorry, I forgot to post the WordPress Dashboard that comes up for Settings/Writing:

    A new version of WordPress probably removed the smilies setting like the wp monalisa plugin says, there was a version with that setting before.

    #169328
    Robkk
    Moderator

    Just ignore that error, it might be caused by something other than bbPress.

    bbp_setup_current_user was called incorrectly

    If you did not try the plugin troubleshooting already, do so.

    #169325
    Robkk
    Moderator

    @seyibest Put this loop-forums.php file in your child theme in a folder called bbpress.

    https://github.com/robkk/bbPress-Hierarchical-Forum-and-Category-Layout

    so, how do i make it to be in a place like just only Login/Register on just a menu bar like

    They added custom menu item links in the menu section. You can create links leading to the WordPress login/register forms. There is also this php code snippet here to add links, you might need to add a conditional to it for a specific menu.

    add_filter( 'wp_nav_menu_items', 'rkk_add_auth_links', 10 , 2 );
    function rkk_add_auth_links( $items, $args ) {
        if (is_user_logged_in() {
            $items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>';
        }
        elseif (!is_user_logged_in() {
            $items .= '<li><a href="'. site_url('wp-login.php') .'">Log In</a></li>';
            $items .= '<li><a href="'. site_url('wp-login.php?action=register') .'">Register</a></li>';
            $items .= '<li><a href="'. site_url('wp-login.php?action=lostpassword') .'">Lost Password</a></li>';
        }
        return $items;
    }

    and moreso, i made the homepage to be the forum. how can i code it in such a way that 2-3 of my post will appear on the homepage follow by the forum beneath it?

    There is a plugin called bbp style pack that can give you a shortcode to display the latest number of topics on your site. bbPress has this shortcode for the forum archive, [bbp-forum-index]

    #169318
    Robkk
    Moderator

    There could be a plugin that affects TinyMCE that could be causing this issue. Try some plugin troubleshooting.

    Troubleshooting

    I could also check out your theme if you tell me what it is.

    #169314
    Robkk
    Moderator

    @danceee3

    Oh I forgot, put the customized loop-single-topic.php you have to a folder called bbpress in your child theme. bbPress should then use that file, and you should see the changes immediately.

    #169311
    Robkk
    Moderator

    You can just use the code I posted here. It is more customizable then the other one in the codex article and the other topic you linked to. I might change it in the codex article later on to this one too.

    Login, Register, Lost Password links

    You can put a custom page like this '/page-slug/'. Here I made it so where when a user logs out they go to a page called “Logout” that has the permalink slug “logout”.

    add_filter( 'wp_nav_menu_items', 'rkk_add_auth_links', 10 , 2 );
    function rkk_add_auth_links( $items, $args ) {
        if (is_user_logged_in() && $args->theme_location == 'sub-header-menu') {
            $items .= '<li><a href="'. wp_logout_url('/logout/') .'">Log Out</a></li>';
        }
        elseif (!is_user_logged_in() && $args->theme_location == 'sub-header-menu') {
            $items .= '<li><a href="'. site_url('wp-login.php') .'">Log In</a></li>';
            $items .= '<li><a href="'. site_url('wp-login.php?action=register') .'">Register</a></li>';
            $items .= '<li><a href="'. site_url('wp-login.php?action=lostpassword') .'">Lost Password</a></li>';
        }
        return $items;
    }
    #169310
    Robkk
    Moderator

    Since I see you have Avada, you may need to go through some plugin troubleshooting.

    Troubleshooting

    Also your notification bar says for users to not register, you can disallow that by going into Settings > General and disable Anyone can register. Enable it again whenever you want.

    #169309
    Robkk
    Moderator

    Try this custom css, I think I got ahold of most of the styles you would need to fix this issue. Make sure to place these CSS styles into your child themes stylesheet or anywhere else you can place custom CSS styles into, like in a separate plugin

    #bbpress-forums ul>li {
        overflow-x: visible !important;
        overflow-y: visible !important;
        padding-left: 0 !important;
    }
    
    #bbpress-forums ul>li:before {
        margin-left: 0 !important;
        content: ‘‘ !important;
        margin-right: 0 !important;
        bottom: 0 !important;
        position: relative !important;
        display: block !important;
    }
    
    #bbpress-forums li {
        color: inherit !important;
        margin: 0 !important;
    }
    #169308
    lissyhunnybee
    Participant

    I’m not a theme author or a coder, I just muddle through with what I find on Google for a lot of php stuff lol but I am learning every time someone shows me a better way to achieve something 🙂

    Thank you!

    #169307
    Robkk
    Moderator

    You could have done what most theme authors do with the post tag list when they are customizing it and replace <?php bbp_topic_tag_list(); ?> with something like this.

    <?php bbp_topic_tag_list( 0, array(
    	'sep'    => ''
    ) ); ?>
    #169301
    Robkk
    Moderator

    On my menu on wordpress I am getting link.com/forum-4/ and I cant remove the “-4”?

    Well you created a page called forum 3 other times that is why it adds the -4 to the end.

    If you are creating a “forum page”, know that you really do not have to do this. Just go to /forums or whatever the forum root slug is set in your forum settings in Settings > Forums.

    I’m getting the same error on bbpress with some forums.

    Are you naming a forum, “forum”??

    Also, where is the function for users to register and their profiles?

    Since your using the bbPress plugin, you register through WordPress login and register forms. bbPress has some shortcodes you can place in a page, and they will redirect you to the default WordPress forms since they aren’t really dedicated forms.

    Profiles should be present if users click their name on the bbPress login widget, the author link in their posts, or you can add a custom menu item using a function in this guide.

    Layout and functionality – Examples you can use

    #169290
    Pascal Casier
    Moderator

    Hi kallard,
    The best place to start from would probably be the bbpress codex: https://codex.bbpress.org/themes/
    If you are not really sold on this theme, try to look for bbpress compatible themes to get started faster.
    Pascal.

    DealL
    Participant

    How to remove Title prefixes ‘Topic:’ and ‘Forum:’?

    I can see these tickets :

    https://bbpress.trac.wordpress.org/ticket/1764
    &
    https://bbpress.trac.wordpress.org/changeset/5018

    are discussing the issue but I don’t know how to use them.

    Do I upload the files attached in the topics as plugins? Or do I paste the code from the files in functions.php of my child theme?

    Kindly help

    Thank you

    #169282
    mica123
    Participant

    Hello again,

    many apologies for causing a misunderstanding here. All the login/logout links work. I was only asking about the profile link after logout – this is also fine. My question can be ignored.

    Many apologies to @robkk. The profile link code is his – taken from How to add user profile link to specific menu

    Thanks.

    #169279

    In reply to: bbp_new_forum hook

    Antipole
    Participant

    Hi… I am trying this. I want to auto-subscribe all users to new forums and I have tried the following:

    function ovni_subscribe_all_users_to_new_forum($forum_id){  // subscribe all users to a new forum
    	echo 'ovni_subscribe_all_users_to_new_forum fired';
    	// this function will fire on all wp-insert_posts - only act if is for a new forum
    	if ((get_post($forum_id)->post_type == bbp_get_forum_post_type()) && !wp_is_post_revision( $forum_id )){
    		// have just posted a new forum
    		$all_user_ids = get_users();
    		foreach ($all_user_ids as $user){
    			bbp_add_user_forum_subscription($user_id, $forum_id);
    			}
    		}
    	}
     add_action(save_post, ovni_subscribe_all_users_to_new_forum, 90,1);
    

    When I load the New Forum admin page, the echo trace statement appears at the top of the New Forum page, before it has been submitted.

    Can SKS help here please?

Viewing 25 results - 7,276 through 7,300 (of 32,519 total)
Skip to toolbar