Search Results for 'code'
-
Search Results
-
Topic: Similar discussions
Hello everyone! I’m working on a online store made with Magento, but it also have a forum created with bbPress and I have to make a modification but it’s the first time when I work with WordPress. After we enter in a discussion, we have the question, the answers and after Similar discussions, topics(topics that are in the same category with the question). Right now we are loading 10, but I need a button bellow and everytime when you press it to load another 10. In content-single-topic.php I have this custom code, that give us the number of similar topics, on the homepage of te category we have 50 discussion on page:
<?php $direct_parent = $post->post_parent; if (bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'post_parent' => $direct_parent, 'post__not_in' => array($post->ID), 'posts_per_page' => 10 ) )) bbp_get_template_part('bbpress/loop', 'topics');Can someone help me to add more topics on button click with ajax or something like this?
Hi,
I’d like to modify the reply topic from paragraph <p> to heading <h1> or <h2>. I tried to modify few php files but couldn’t get it working. Also checked few codex content but couldn’t find anything relevant. Wondering if somone done this before or knows how to do it. Thanks.
Topic: is_bbpress not working
I’m trying to detect requests for the bbpress forum index page.
Initially I tried ‘bbp_is_forum_archive()’.
This doesn’t return true from the forum archive page.I decided to test if any bbpress conditional tags were working, so I tested ‘is_bbpress’, because the function calls many (maybe all?) of the other conditionals.
However, ‘is_bbress’ doesn’t return true either.
However, on any page in my site, whether bbpress is on that page or not, this condition returns true:
‘if ( ! is_bbpress() )…’What could be happening here?
This is my function and the hook I’m using:
add_action('init', 'test_bbpress'); function test_bbpress() { if ( is_bbpress() ) { wp_die("got to the forums page") ; }}
Hi,
I want to change generally all x days (years, whatever) ago to german like “vor x Tagen”.
I Have found the code base in inludes/commeons/formatting.php.
But I’m not so goog in develeoping.
Can somebaody help me please?Kind regards,
OleAfter installing bbpress I have a set of forums.
Every forum is presented using a php template in my child theme.
The php template has the filename bbpress.php.I’d like to create a php template that applies *just* to the individual forum pages. Not the forum topics or singles. Or anything else.
I’ve been looking at this:
The heirarchy seems to suggest that you can use ‘single-[forum].php’, which suggests that ‘[forum]’ needs to be substituted with the name of the forum.
… which is great. But I want one template to be applied to all forum singles and nothing else.
Just to test, I copied my existing bbress.php to a file called ‘single-forum.php’.
bbpress did pick this up and use it for my forum singles.
But the page didn’t present the actual forum. Where the forum should have been, there was just empty space.So… how do I create a template that gets applied to all forums and nothing else?
I’ve set up a set of discussion forums on a site. Now I want to the purpose of each forum to be clear.
One forum is called ‘Introductions’.
I’d like to have a message on the page saying something like “Hi. This is where we get to know each other”.I guess I could hack up something with ACF and put some logic in the page template that shows the forums. But I’m wondering if there’s a faster option.
Is there an inbuilt way to make add non-hardcoded content to the forum pages?
Topic: The matter of backslashes
Hello,
Some mathematical objects written in mathjax/latex use backslash (\). For example, one use \sqrt{} for the square root function, \mathbb{} for the set of numbers. In bbpress forums, these objects work perfectly but when the forums are displayed in buddypress activities streams, the backslash disappears and therefore the mathematical symbols are not rendered and make the texts difficult to read. If the texts are typed directly in buddypress side, things are also alright. So, the problem seems to be in the transition from forum to the buddypress activities.
I tried some solutions but nothing work. For example, I tried this solution:
remove_filter( ‘bp_get_the_topic_post_content’, ‘stripslashes_deep’ );but it did not work.
So I am asking for help; how can I do to solve the problem?Thank you in advance
Wordpress 5.7.2
bbpress 2.6.6Regards
Nestor