Search Results for 'code'
-
Search Results
-
Topic: Force Sticky Post Order
Hello, this is a request I have to force the order of two sticky posts so that they don’t change when a new comment is added.
Sticky 1
Sticky 2Sticky 2 will move above Sticky one with a new comment, and vice-versa.
Any way in the code to force that sticky order to stay the same all the time.
Thanks in advance.
Topic: Creating new custom role
It seems to be a real struggle to create a new custom role for bbpress 🙁
I’ve been trying out all the different solutions I’ve found online but nothing is working.
All I want to do is to be able to assign the role of Naturopath to some of my forum participants. They would have the same capabilities as the Participant role, just have Naturopath instead of Participant showing under their name in the Forum. The rest of the Participants can continue to show “Participant”.
Can anyone here maybe write the code for me as a paid job?
I have WP 5.8.1
bPress 2.6.6Using this code I am able to programmatically create a forum post, but it only shows to users who are logged in (when using the bbp-single-topic shortcode) How can I get that topics to show while logged out?
function createforumpost($text, $forums_id, $unique_id, $fighter_name = false){ if(is_null($forums_id) || !$forums_id){ if(!$fighter_name){ $fighter_name = explode("-", $unique_id); foreach($fighter_name as $index => $word){ $fighter_name[$index] = ucfirst($word); } } $forum_post = array( 'post_title' => $fighter_name, 'post_content' => $text, 'post_name' => $unique_id, 'post_status' => 'publish', 'comment_status' => 'closed', 'post_type' => 'topic', 'post_parent' => 75857, 'post_author' => 1, ); $forum_post["ID"] = wp_insert_post($forum_post); return $forum_post["ID"]; } return $forums_id; }Topic: editing registeration form
Hello
I found bbpress registration is used by “form-user-register.php”
I added extra field code (
<div class=”bbp-email”>
<label for=”user_email”><?php esc_html_e( ‘Email’, ‘bbpress’ ); ?>: </label>
<input type=”text” name=”이메일” value=”<?php bbp_sanitize_val( ‘user_password’ ); ?>” size=”20″ id=”user_password” maxlength=”100″ autocomplete=”off” />
</div>)
to edit the registeration form but it didnt work
what is the problem do you think?