Search Results for 'code'
-
Search Results
-
Hey so I’m trying to enqueue custom CSS for bbPress v2.6.4 on the WP 5.4.1 clan website running a WP Twenty Twenty-child theme.
This is what my functions.php currently looks like
<?php /** * Child theme stylesheet einbinden in Abhängigkeit vom Original-Stylesheet */ add_action( 'wp_enqueue_scripts', 'child_theme_styles' ); function child_theme_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-theme-css', get_stylesheet_directory_uri() .'/style.css' , array('parent-style')); wp_enqueue_style( 'child-theme-css', get_stylesheet_directory_uri() .'/css/bbpress.css', array()); } ?>
And this is how my bbpress.css looks like.
#bbp-forum-info, #bbp-forum-topic-count, #bbp-forum-reply-count, #bbp-forum-freshness { color: #232323; } #bbpress-forums { background: transparent; clear: both; margin-bottom: 20px; overflow: hidden; font-size: 1.75rem; color: #232323; }
The changes I applied in the bbpress.css won’t update the bbpress CSS on the above mentioned site. So their must be something wrong with my functions.php but I can’t yet put my finger on it how to load it properly as I’m pretty new when it comes to WordPress. I wanna append these changes globally to all parts of bbPress forum.
Can someone tell me to if and what i need to specify inside the arrray() call for the bbpress.css to load properly? Or hint me towards what’s wrong here.
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 ??