Search Results for 'code'
-
AuthorSearch Results
-
November 28, 2015 at 8:41 pm #169456
In reply to: visual editor showing html in posts
Robkk
ModeratorI 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.
November 28, 2015 at 7:38 pm #169452Topic: Help figuring out this error code
in forum Pluginswhassell
ParticipantUndefined variable: bbp_forums_noheader in /wp-content/themes/multinews/bbpress/loop-forums.php on line 19
any suggestions what this might be?
ThanksNovember 26, 2015 at 3:53 am #169410In reply to: Login page
Pascal Casier
ModeratorHi,
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%2FPascal.
November 25, 2015 at 6:28 pm #169387Topic: bbpress shortcodes do not work
in forum Troubleshootingbschaich
ParticipantAll 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,
BennyNovember 25, 2015 at 6:43 am #169375Vickymedia
ParticipantHello,
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,
VickyNovember 25, 2015 at 6:24 am #169373Pascal Casier
ModeratorHi Vicky,
Does this help ?
<a href="'. wp_logout_url() .'">Log Out</a>
Pascal.November 25, 2015 at 3:31 am #169366Pascal Casier
ModeratorHi,
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.November 25, 2015 at 1:39 am #169363In reply to: Need help about my bbpress setup
seyibest
ParticipantThanks @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.
November 24, 2015 at 9:02 am #169347Pascal Casier
ModeratorHi,
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.
November 24, 2015 at 2:41 am #169333Robkk
ModeratorMy 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.
November 24, 2015 at 2:03 am #169329In reply to: smiley emoticons
Robkk
ModeratorPlease 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.
November 24, 2015 at 1:36 am #169328In reply to: Forum no load the entire “Post Area” – Broken Theme
Robkk
ModeratorJust ignore that error, it might be caused by something other than bbPress.
If you did not try the plugin troubleshooting already, do so.
November 24, 2015 at 1:30 am #169325In reply to: Need help about my bbpress setup
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]
November 24, 2015 at 12:40 am #169318In reply to: Forum no load the entire “Post Area” – Broken Theme
Robkk
ModeratorThere could be a plugin that affects TinyMCE that could be causing this issue. Try some plugin troubleshooting.
I could also check out your theme if you tell me what it is.
November 24, 2015 at 12:21 am #169314In reply to: how to add span class bbp-topic-started-in
Robkk
ModeratorOh I forgot, put the customized
loop-single-topic.phpyou have to a folder called bbpress in your child theme. bbPress should then use that file, and you should see the changes immediately.November 23, 2015 at 11:32 pm #169311In reply to: Login, Register, Lost Password links
Robkk
ModeratorYou 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.
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; }November 23, 2015 at 11:24 pm #169310In reply to: Search results take me back to my homepage
Robkk
ModeratorSince I see you have Avada, you may need to go through some plugin 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.
November 23, 2015 at 11:00 pm #169309In reply to: bullets in front of everything
Robkk
ModeratorTry 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; }November 23, 2015 at 10:45 pm #169308In reply to: Remove commas between tag display
lissyhunnybee
ParticipantI’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!
November 23, 2015 at 10:04 pm #169307In reply to: Remove commas between tag display
Robkk
ModeratorYou 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' => '' ) ); ?>November 23, 2015 at 8:59 pm #169301In reply to: bbpress permalink issues
Robkk
ModeratorOn 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.
November 23, 2015 at 12:35 pm #169290In reply to: bullets in front of everything
Pascal Casier
ModeratorHi 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.November 23, 2015 at 12:25 pm #169289Topic: How to remove title prefixes ‘Topic:’ & ‘Forum:’ ?
in forum TroubleshootingDealL
ParticipantHow 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/5018are 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
November 23, 2015 at 8:29 am #169282In reply to: Login, Register, Lost Password links
mica123
ParticipantHello 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.
November 23, 2015 at 7:03 am #169279In reply to: bbp_new_forum hook
Antipole
ParticipantHi… 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?
-
AuthorSearch Results