-
Author
Tagged: CSS views number forums
-
December 1, 2015 at 21:18 #90387kheopsarohnParticipant
Hi all the KLEO’s team,
I would like make some customization:
1- Regarding the kleo-login-popup, i want to modify the color (and more generally the CSS)
a) ..of the two inputs (for instance the text color and the background color of the input area)
b) and the color of the button login inside the kleo-login-popup.
2- On the page http://www.agoraschool.fr/forums/forum/math-lycee/, i would like for each subject, to substitue the voices counter by the views counter (the number of times the subject has been opened ) …In order to do this, i’ve tried the code below :
////////////////////////////////////////////////////////////////////////////////
// get bbpress topic view counter
////////////////////////////////////////////////////////////////////////////////
function get_wpbbp_post_view($postID){
$count_key = ‘post_views_count’;
$count = get_post_meta($postID, $count_key, true);
if($count==”){
delete_post_meta($postID, $count_key);
add_post_meta($postID, $count_key, ‘0’);
return “0”;
}
return $count;
}
function set_wpbbp_post_view($postID) {
$count_key = ‘post_views_count’;
$count = get_post_meta($postID, $count_key, true);
if( $count == ” ){
add_post_meta($postID, $count_key, ‘1’);
} else {
$new_count = $count + 1;
update_post_meta($postID, $count_key, $new_count);
}
}
endif;if( !function_exists(‘add_wpbbp_topic_counter’) ) :
////////////////////////////////////////////////////////////////////////////////
// init the view counter in bbpress single topic
////////////////////////////////////////////////////////////////////////////////
function add_wpbbp_topic_counter() {
global $wp_query;
$bbp = bbpress();
$active_topic = $bbp->current_topic_id;
set_wpbbp_post_view( $active_topic );
}
add_action(‘bbp_template_after_single_topic’, ‘add_wpbbp_topic_counter’);
endif;
December 1, 2015 at 21:38 #90388kheopsarohnParticipanti forgot something :
3) When i create a new topic,inside the input TITLE area, the background color is orange and the text is blue, which is quite awful. Is there a solution to customize the CSS of the input TITLE area.
Thanks a lot for your reply.
PS: …and thank you again for your theme 😉December 3, 2015 at 03:16 #90837sharmstrModeratorThat is awful 🙂 You set those colors in Theme Options > Styling > Main. The orange color on focus is from the Alternate background color in there.
Assuming you got the code from here: http://www.magpress.com/blog/adding-topics-view-counter-in-bbpress did you do step 3?
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
December 3, 2015 at 19:15 #90955kheopsarohnParticipant1) and 3) Sorry for that, i meant the combination of colors i’ve choosen is awful for the kleo-login-popup and the input of the title area (new topic). But i would rather keep this combination for all the others pages of the site. In other words, i want to modify the combination only for those two sections (kleo-login popup and the input of title area (new topic))
2) Yes, that’s right ! I think : i would have missed something.
Actually, within the step 3, i didn’t understand well the followings: using a bbpress child template method, i created a bbpress folder name in my theme…
Where exactly i have to create a folder ?Thank you very much for your reply.
December 3, 2015 at 20:11 #90978sharmstrModerator1 – Try this
COPY CODE.kleo-form-signin input#username, .kleo-form-signin input#password, input#bbp_topic_title { background-color: #fff !important; color: #000 !important; }
2 – in your child theme. copy the file from /kleo/bbpress/
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
You must be logged in to reply to this topic.