Search Results for 'code'
-
Search Results
-
I am so very frustrated…I am getting very very close to completing my website and getting it out in cyberspace…but one problem I am having is that I cannot get the forum in bbpress to work correctly…I have buddypress set up as well and it is working fine…I created a forum page which is showing as a child page under my “community” tab in the main header menu…when going to the forum page there is nothing at all except what I wrote when creating the page…by tutorials I have seen there should be other things showing such as “topics” and “replies” and there is nothing showing up…please help I am so so frustrated…is it that my theme doesn’t support it or do I have to break into code…Also I am afraid to send my login info or any other private info as not sure who all is seeing it….I will be checking back later tonight…I will probably be stuck on this all night as I am determined to figure this out!! Thanks, Rhonda
Hello,
I have experienced an issue importing posts from a BuddyPress group forum. Originally I lost the link to all topics when I manually deleted some spam users directly in the tables wp_users and wp_bp_groups_members. In the group forum it simply stated “Sorry, there were no forum topics found.” So I thought I would upgrade to bbpress using the instructions here: https://codex.buddypress.org/getting-started/guides/migrating-from-old-forums-to-bbpress-2/
I followed all instructions up to the import process and then the import just got stuck – i.e. nothing was imported.
Then I noticed no forums are now listed under Forums.
So I created a new forum, which looks different to the previous forum (presumably because I am now using bbpress and not the old Buddypress group forum – how to tell?). I can link this forum to my one Buddypress group, but now none of the old topics show – they are all still in the WordPress database, but I need to know how to get them into the new forum that I have created, or import them some other way.
I would be grateful for any advice.
Thanks,
Nick
In loop-fourms.php file add your custom “Add Topic” button:
<a href="/new-topic/?ForumId=<?php echo bbp_get_forum_id()?>">New Topic</a>Add this code to a custom .php file or directly to your theme function.php file:
//BBpress New Topic Button // add_shortcode('wpmu_bbp_topic', 'wpmu_bbp_create_new_topic', 10); function wpmu_bbp_create_new_topic(){ if ( isset($_GET['ForumId']) ){ return do_shortcode("[bbp-topic-form forum_id=".$_GET['ForumId']."]"); }else{ return do_shortcode("[bbp-topic-form]"); } } //End BBpress New Topic Button //Make sure you’ve created a custom page titled “new topic” with a friendly url of “new-topic”
Place the new shortcode we registered into this page:
[wpmu_bbp_topic]
This will automatically display contact create form of the selected forum if ID exists in the URL otherwise fall back to default shortcode.
You can see it in action on my site:
http://artofwargaming.net/forums/Hope this helps anyone who was looking to create a “new topic” button.
I can’t take credit for this, this was all thanks to the help of the guys over at WPMUDEV – Sajid, Anang, and Tyler.
Hello. I want to disable the edit profile link on my forum using bbpress, which I have found the following code to add to functions.php. It works, except for next to the username and profile pictures there is a comma, and it looks messy… anyone with php knowledge know why this code is producing a comma next to the username and profile pic?
Thanks
<?php
add_filter( ‘bbp_get_author_link’, ‘remove_author_links’, 10, 2);
add_filter( ‘bbp_get_reply_author_link’, ‘remove_author_links’, 10, 2);
add_filter( ‘bbp_get_topic_author_link’, ‘remove_author_links’, 10, 2);
function remove_author_links($author_link, $args) {
$author_link = preg_replace(array(‘{<a[^>]*>}’,'{}’), array(“,”), $author_link);
return $author_link;
}
?>I use the following code on a webshop to display all tags being used on the website in the
custom post typeproduct<?php $terms = get_terms( 'product_tag' ); if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){ foreach ( $terms as $term ) { print '<option data-filter="tag-'.$term->slug.'"value="tag-'.$term->slug.'">'.$term->name.'</option>'; } } ?>How do I find the equivalent for bbPress to `product_tag
Topic: Links not showing correct
When I insert a link in bbpress it does not show correct on my page. All links will be stacked on the left site of the message. Here is a picture of the HTML code that is generated and how it is showed.

The problem is only in bbpress, not when inserting links in WordPress in general. It is the same no matter i I insert the link using bbcode or using the WordPress toolbar.
What can be the problem here? Is there some CSS that controls this in bbpress?
I’ve been working for weeks (on my off time) on a threaded view of bbpress posts and replies. Here’s the beta:
A different look more similar to an old school list forum style. Lots of work to do but here’s what it does so far:
- Different format, more list/threaded. Recent topics show with the topic replies below
- Works on a page outside of bbpress, but hooks some bbpress functions.
- Posts new messages and replies, with metadata.
- Allows user to expand/shrink content area of each post/reply
- Posts/replies show as modal popup window instead of at the bottom of the forum.
- WordPress visual editor enabled (some bugs)
- Pagination
Current bugs and pending additions:
- Edit post/reply
- Posts made from forum-threads do not show up in buddyPress “recent activities”
- Visual editor add link does not work.
- Twitter share button not setup yet
- Facebook share button not setup yet
It’s pretty hacky and I’m sure the code is not all that great, but it “seems” to work. I’ll be working on my bugs and new features soon.