Remove Category Hyperlink?
-
Does anyone know how to remove the hyperlink from all categories?
-
given previous experience of one line questions – can you try and write a bit more about quite what you want to do with bbpress.
When you add Forums inside a category that category contains a hyperlink and when you click on it, it goes to a page that shows all of the Forums in the category.
I am trying to remove that link from all categories.For example:
You have a category called Web.
Inside Web you have the Forums: WordPress, SEO, ProgrammingWhen you go to the BBPress page (http://www.YourWebsite.com.au/forum) you will see…
Web
WordPress
SEO
ProgrammingCurrently Web links to http://www.YourWebsite.com.au/forums/forum/web which then displays
Breadcrumb: Forums › WebForum:
WordPress
SEO
ProgrammingI hope that made more sense
hey guys, anyone found about that topic pls? I have same issue. thank you a lot
Hi guys – I know this is an old thread – but how can we remove the hyperlinks from the forum categories. If someone clicks on the category it will display the same boxes as for a forum but no discussions or topic can be added as it is a category. I am looking for a way to disable that – is it possible?
Thank you in advance!
ok so
find
wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.phptransfer this to your pc and edit
find
<?php do_action( 'bbp_theme_before_forum_title' ); ?> <a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a> <?php do_action( 'bbp_theme_after_forum_title' ); ?>
and replace with
<?php do_action( 'bbp_theme_before_forum_title' ); ?> <?php if (!bbp_is_forum_category( bbp_get_forum_id())){ ?> <a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a> <?php } else { ?> <div class="bbp-forum-title"> <?php bbp_forum_title();?> </div> <?php } ?> <?php do_action( 'bbp_theme_after_forum_title' ); ?>
and save
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpresswhere %your-theme-name% is the name of your theme
Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/loop-single-forum.phpbbPress will now use this template instead of the original
you will probably need to add some styling to the class “bbp-forum-title”
I can’t thank you enough. I am so grateful – thank you very much for the in-depth explanation and the script provided. It worked like a charm!
You rock.
Thanks again!great – glad you are fixed !!
Is there an easier way, like with a plugin?
sorry, no
Can things that are done with PHP usually also be done with CSS? I’m assuming the instructions given above involved PHP. The reason why I’m asking is because it seems easy to use Dashboard: Appearance > Customize > Additional CSS, but I don’t know if that would work. While PHP might be just as easy as CSS for some, CSS seems a lot easier to me.
If that isn’t possible, is there a page that describes how to do it the PHP way for beginners? That would be helpful, because I don’t know things like where to find wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php, how to create a directory, how to transfer files, whether %your-theme-name% is Twenty Twenty or if I have to give it my own name, or if doing any of the above will interfere with the bbp Style Pack plugin.
Thanks!
I’m going to try the Code Snippets plugin. Please let me know if I am on the right track.
There was a critical error on my website, and now I can’t get to the log in screen. My site is at dancing4locations.org. I’m using version 5.5.5 of WordPress, and version 2.6.6 of bbPress.
I got back in, but I had to use what is called safe mode, which means that I am still trying to get that code to work.
Would someone know a simpler way for non-developers?
I got back in, but then I got messages that said “There has been a critical error on your website. Please check your site admin email inbox for instructions” whenever I clicked on Dashboard and a lot of the other things, even while using ?snippets-safe-mode=true (which I can tell you about if you’re interested). So, maybe I’m not in. I don’t know if the problem was only because of how I used the Code Snippets plugin, or if it was because of how I used it with bbPress.
I don’t know if it is bad to ask this question in two places, but if I can turn on error reporting using a plugin, would you please recommend a plugin?
Should I give updates here about how debugging is going, or does the error have nothing to do with bbPress?
I got back into my site using my host’s control panel, but I’m still trying to make the hyperlinks go away.
Thank you, Anterus, that is a good way to ask the question.
Sorry, even though I navigated around a lot, I didn’t realize how the hyperlinks worked, and now I think it is better with them.
🙂
Hi,
I know some PHP. I want to remove the hyperlink from forum topics. So it won’t go to the inner page of forum topics.
Please help me to do this. Or, just let me know the correct file to edit.
Thank you.
Joelsorry, not sure which exact part you want to replace.
so is this the links in the forum list of topics? or everywhere or what?
Yes, for example, on this page https://bbpress.org/forums/ I want to remove all topics links. So it will just have a dummy # link
@joel-mohanraj
find
wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.phptransfer this to your pc and edit
so you will want to take the link out of line 34
<a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"><?php bbp_forum_title(); ?></a>
and save
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpresswhere %your-theme-name% is the name of your theme
Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/loop-single-forum.phpbbPress will now use this template instead of the original
amending the freshness will require you to amend the
bbp_get_forum_freshness_link
function. if you are familiar with filters you can use the filter on line 585 of \includes\forums and a str_replace to take out the linkHi,
Thank you for your reply. I have done first 2 steps. For the third step, you mentioned about this code
` return apply_filters( ‘bbp_get_forum_freshness_link’, $anchor, $forum_id, $time_since, $link_url, $title, $active_id );
}Please let me know how to change this.
Thank you,
Joel.
- You must be logged in to reply to this topic.