OK. I figured out the problem.
The code should be:
function custom_logged_in_topics($have_posts){
if (!is_user_logged_in()){
$have_posts = null;
echo 'Login to see replies';
}
return $have_posts;
}
add_filter('bbp_has_topics', 'custom_logged_in_topics');
add_filter('bbp_has_forums', 'custom_logged_in_topics');
add_filter('bbp_has_replies', 'custom_logged_in_topics');
Got from earlier thread. (That code was not working because of backtick instead on ‘ or “)
Hello All,
I am trying to hide all the replies for anonymous or public. I added the following code:
function custom_bbp_show_lead_topic( $show_lead ) {
$show_lead[] = 'true';
return $show_lead;
}
add_filter('bbp_show_lead_topic', 'custom_bbp_show_lead_topic' );
function remove_forum_replies_guest() {
if ( !is_user_logged_in() ) {
remove_action('bbp_before_has_replies_parse_args', 'bbp_replies') ;
}
}
add_filter('bbp_has_replies_query', 'remove_forum_replies_guest');
It removes all the replies not only for public (non-logged in visitors) but also from logged in users.
Any help will be appreciated.
If any of the emails need to link to either wp-login.php or /wp-admin then based on these two lines from your .htaccess file ‘something’ will happen 😉 I am not familiar enough with .htaccess and mod_rewrite to know this stuff of the top of my head 😉
RewriteCond %{REQUEST_URI} ^/wp-login\.php(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/wp-admin$
WordPress should be able to automatically update your .htacess file which it looks like it is based on the last ~11 lines of your post above. Those first ~9 lines though could be the problem as it looks like they are from another WordPress plugin or added by your webhost.
https://codex.wordpress.org/Using_Permalinks#Automatically_updating_.htaccess
If you don’t know what plugin is adding the extra bits to your .htaccess file try disabling all of your plugins except bbPress, go back to your WordPress permalinks settings and update the settings again which forces WordPress to update your .htaccess file and see how that goes.
None of the forum importers are importing the ‘sticky status’ of any topics at this stage so after importing any topics you need to stick need to be done manually.
(I can’t see you site at the moment ‘Access Forbidden’ 😉
I am not sure exactly how WordPress embeds work as a whole…
Though this via https://codex.wordpress.org/Embeds
If WordPress fails to embed your URL you will get a hyperlink to the URL.
You would have to code this up yourself, a good starting point would be taking a look at this:
https://bbpress.org/forums/topic/customising-bbp_list_forums-last-poster-block/
Cool… After the import you must run the Repair Tools to get everything recounted…
Thanks for the info on the short codes. It has taken forever to find that info.
Alright, I took and created two pages, “Register Page” and “Lost Password Page”. I published them both and put the URL’s in the appropriate spot in the widget. Then I go to the site and test out the register page and enter my information. When I click register it says, “User registration is currently not allowed”. What do I do from here???
We have bbpress forums installed on our website http://www.hphe.net The forums look great, but when I want to click on a paritulcar user’s profile, the text of the information is overlapping–as if everything is being crammed into the left side of the page. It looks like the screen view needs to expand, but I don’t know how to do that for profile pages.
I am very much in the beginning stages of learning about code…using WordPress so I wouldn’t really have to deal with any code, but I’m seeing that it would be handy in a number of instances. Any help needs to be explained to me in the most basic of terms. :\
Thanks for any help.
Cool… Done… Just download again via the link up there ^^^.
If there are any others hanging about let me know or any other text, paragraph, images etc BBCodes I will add them all in for bbPress 2.5
there is a way to do it, someone posted few lines of code last year.. and it works. BUT I cannot find it now here on the forums, and I can’t remember how it was done :((
please search bbpress forums
The full docs for bbp_list_forums is here https://codex.bbpress.org/bbp_list_forums/
The quick and easy way is via this topic where you can add the code from that gist to your themes functions.php
how to display list of sub-forums on separate lines, instead of big blob?
https://codex.bbpress.org/getting-started-with-bbpress/#creating-your-first-forum
Adjust your Forum attributes. These are:
Types: choose whether you are creating a Forum or category.
Forum – can contain topics and be the parent of other forums.
Category – can only contain forums (no topics). Use for organizing your forums.
Hi there, my website is http://www.theyouthlink.com and currently I have a login widget that links to the WP profile page. Preferably, I would like to rewrite the code so that it links to the BBpress forums profile page in order to keep everything front end.
Any idea’s on how to do this? My current php code for the login widget is: `
case “profile_link”:
$return_text = str_replace(“{“.$match.”}”, ““. __(‘Profile’, ‘pwLogWi’) .”<//a>”, $return_text);
break;
Hmmm… It should work… http://regexr.com?3621e
Can you find a post with either a [QUOTE] or [MENTION] BBCode to see if these have been converted to <blockquote> which will help work out if any of the BBCodes are being converted to HTML.
The site is now up and will be (i hope).
Thanks in advance.
Check the urls:
http://www.wpavenue.com/support/ &
http://www.wpavenue.com/forums/
Both have the same shortcode. But the results are different!
It’s called “avatar-14” because the size is 14×14 pixels.
Add this to the bottom of your css file, and it should work.
.avatar-14 { display: none !important; }
Yes, I know. That’s really a bad luck. I will update the thread whence the site will become online.
However here is a screenshot of the forum index. http://img713.imageshack.us/img713/3991/fy0l.png
I also asked this question in StudioPress forums. (Earlier i thought the problem was with Genesis themes)
Both pages turn up a 404 from hostgator.
Ok I see this file is the bbpress code for the File importer for vBulletin. Forgive me I am new to this stuff but I am getting it a bit slowly 😉
I solved this issue by replacing the base to another page and put the code [bbp-forum-index] and the previous page I am not able to add the forums to the same base again
anyways. Thanks 🙂
Hello all,
I wonder how (& why) bbPress is rendering same shortcodes in different ways? Actually, I am unable to identify the problem.
Even after disabling all the plugins do not have any role in the broken forum.
You may take a look on
http://www.wpavenue.com/forums/ <–This one is broken and “forums” is forum’s base slug.
http://www.wpavenue.com/support/ <– This works fine
Both of the above urls are “page” having exactly the same code.
Other than the missing html structure (on the /forums, forums/topic-tag/docs/, /forums/users/example/) everything is fine.
The theme is working with twenty-ten. twenty-eleven and twenty-thirteen. But broken with Genesis 2.0 (with sample and custom child theme0) and hybrid themes.
Waiting for a reply!
Hey
My website’s forum page is http://www.techknowledgic.com/forums/forum and since few mins I created a page under the same name and then removed it and since that time the forums disappeared.
I can go to a sub forum like this http://www.techknowledgic.com/forums/forum/affiliates-programs/
but the lists of the forums disappeared from http://www.techknowledgic.com/forums and here is a screenshot of how it was before and now it’s empty http://img694.imageshack.us/img694/6215/rmox.png
is there any help or any code I have to add to display the forums?
Thanks!
Hi All,
I wanted to see if there was an easy way or plugin to change the font and color of the forum text. It does not match my current website and wanted to have uniformity. I am not a heavy coder so simple is better.
Thanks
Question:
Exactly what code am I to use and where do I paste it..IE
Do I paste in a VB file before import or in a WordPress/bbPress after import.
Also there is the child theme stuff to be concerned about. Just know I am in the R&D of all this now before I start converting my site. I do have Blogs/Articles too but not many.