Search Results for 'code'
-
Search Results
-
I hope to customize bbpress reply form area with dropdown selection list. I could not find any previous post reporting similar case in bbpress. Referring to post “Save meta box data from selected dropdown list” with link I prepared similar code for the bbpress reply post condition, but failed to achieve the goal.
Please kindly provide suggestions!` add_action( ‘bbp_theme_before_reply_form_content’, ‘so_custom_meta_box’ );
//add_action( ‘add_meta_boxes’, ‘so_custom_meta_box’ );function so_custom_meta_box($post){
add_meta_box(‘so_meta_box’, ‘Custom Box’, ‘custom_element_grid_class_meta_box’, $post->post_type, ‘normal’ , ‘high’);
}add_action(‘bbp_theme_before_reply_content’, ‘so_save_metabox’);
function so_save_metabox(){
global $post;
if(isset($_POST[“custom_element_grid_class”])){
//UPDATE:
$meta_element_class = $_POST[‘custom_element_grid_class’];
//END OF UPDATEupdate_post_meta($reply_id, ‘custom_element_grid_class_meta_box’, $meta_element_class);
//print_r($_POST);
}
}
function custom_element_grid_class_meta_box($post){
$reply_id = bbp_get_reply_id();
$meta_element_class = get_post_meta($reply_id, ‘custom_element_grid_class_meta_box’, true); //true ensures you get just one value instead of an array
?>
<label>Choose the size of the element : </label><select name=”custom_element_grid_class” id=”custom_element_grid_class”>
<option value=”normal” <?php selected( $meta_element_class, ‘normal’ ); ?>>normal</option>
<option value=”square” <?php selected( $meta_element_class, ‘square’ ); ?>>square</option>
<option value=”wide” <?php selected( $meta_element_class, ‘wide’ ); ?>>wide</option>
<option value=”tall” <?php selected( $meta_element_class, ‘tall’ ); ?>>tall</option>
</select>
<?php
}Topic: login plugin
Hello there,
I am stucked with this issue since some days : i am using the default bbpress connection widget (bpress version : 2.6.4) , but i am not satisfied by it behaviors such as redirect to wordpress admin login, the fact that the link on registration mail, bring the user again to wordpress back end, and also that email sender adress is the wordpress email (not mine !!) .. i had tried to change this last issue with this code in my functions.php :
add_filter( 'wp_mail_from', 'your_email' ); function your_email( $original_email_address ) { return 'myemail@domain.com'; } add_filter( 'wp_mail_from_name', 'custom_wp_mail_from_name' ); function custom_wp_mail_from_name( $original_email_from ) { return 'My Forum Name'; }But instead i just received a “mail delivery failed”
I have tried other plugins such as “weaver” or “bbPress login register link..” but still not found the “good one” (or surely didn’t know how to optimize it)
Did someone know how to solve this problem ??
Hi,
I’ve added a blog element (pulling in topics) to my community homepage but need to display some additional stats in the feed.
I need to display the following:
1. # of views (Ive selected this in the settings, but stats are not displaying)
2. # of likes
3. # of repliesAdditionally, there is an ‘0’ after the excerpt. I’ve set the excerpt length to 160 characters to pull in a large portion of the title. The ‘0’ appears where the title is less than 160 characters. Is there a CSS code I can use to hid the ‘0’?
See the page here. https://community.catalysttech.co/
Would appreciate any advice.
Thanks.I mean, if I use write text “<H2>test</h2>”, then it opened “<H2>test</h2>” like this “https://prnt.sc/si6o1q”
Anyone can give me idea^^ advice^^
Hi, I already use the forum configuration to display only 10 replies, the I add the shortcode for topic id to a page and is showin me all of the replies at the same time, how can I reorganice that