Forum Replies Created
-
Author
-
Radu
ModeratorHi,
Altering the extra sidebar structure can be made using the next PHP snippet.
COPY CODE//get the extra sidebar if ( ! function_exists( 'kleo_extra_sidebar' ) ) : function kleo_extra_sidebar() { $classes = apply_filters( 'kleo_extra_sidebar_classes', '' ); echo '<div class="sidebar sidebar-extra ' . $classes . '" data-spy="affix" data-offset-top="205">' . '<div class="inner-content">'; generated_dynamic_sidebar( 'extra' ); echo '</div>' . '</div> <!--end sidebar columns-->'; } endif;
That will be added to wp-content/themes/kleo-child/functions.php
NOTE: Child theme needs to be installed and activated.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
Sure,
That’s the CSS that makes more space between circles using Groups GRid
COPY CODE.kleo-gallery .kleo-thumbs-images a img.photo { padding: 40px; }
The css will be added to wp-admin -> theme options -> General settings -> Quick CSS
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
Replace the css provided by the Laura with this one
COPY CODE@media(min-width:768px) { .responsive-cols.per-row-6>* { width:15.5%; } .kleo-masonry article { padding: 0; margin-right: 10px !important; } .kleo-masonry article:last-of-type { margin-right:0 !important; } }
Let me know if it’s ok
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
Just use the next snippet
COPY CODEfunction sq7_rdu_restrict_but_exception_cpt() { /*check if is blog page choosen on wp-admin -> settings-> reading -> posts page.*/ if( is_singular( 'post' ) || is_singular('you-custom-cpt-name') ) { remove_action('template_redirect', 'kleo_restrict_site'); } } add_action('wp','sq7_rdu_restrict_but_exception_cpt');
Just replace the: you-custom-cpt-name with your CPT slug
That’s all
Let me know
The function needs to be pasted in wp-content/themes/buddyapp-child/functions.php
NOTE : Child theme needs to be installed and activated.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
I see you can have more space beetween circles using this css
COPY CODE.kleo-carousel-items.kleo-groups-carousel ul li { padding: 0 20px; }
The css will be added to wp-admin -> theme options -> General settings -> Quick CSS
Simply add the background to entire row.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
Check with the next CSS
COPY CODE@media (min-width: 1600px){ .container { max-width: 1400px; } } @media (min-width: 1800px){ .container { max-width: 1600px; } } @media (min-width: 2000px){ .container { max-width: 1800px; } } @media (min-width: 2200px){ .container { max-width: 2000px; } } @media (min-width: 2400px){ .container { max-width: 2200px; } } @media (min-width: 2600px){ .container { max-width: 2400px; } } @media (min-width: 2800px){ .container { max-width: 2600px; } }
The css will be added to wp-admin -> theme options -> General settings -> Quick CSS
Let me know
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
Just add those functions : https://pastebin.com/raw/TCJPGBxU to wp-content/themes/sweetdate-child/functions.php then use the next function to display directly the user age
If the name of date selector it’s Birthday by default use the next function
COPY CODE<?php echo display_user_age(); ?>
If the name of date selector has another name replace the BirthdayFieldName with the name of that field.
COPY CODE<?php echo display_user_age('BirthdayFieldName'); ?>
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
Done, all good now,
I’ve wrapped the about text into this div class if you need to adjust style : .myshortbio
If you need to style only the .myshortbio div class just add the directory before it.
Example for styling the about text only on directory
COPY CODE.directory .myshortbio { color:red; }
Example for styling the about text only on members profile
COPY CODE.profile .myshortbio { color:red; }
The final php code looks like this
COPY CODE// Add Quote to profile head and also to the members directory ( edited on 26 JUL 2017 @ SQ['Radu'] ) add_action( 'bp_profile_header_meta', 'display_user_short_bio' ); add_action( 'bp_directory_members_item', 'display_user_short_bio' ); function display_user_short_bio() { $short_bio = xprofile_get_field_data( 'About', bp_get_member_user_id(), $multi_format = 'comma' ); if ($short_bio) { echo '<div class="myshortbio">' . $short_bio . '</div>'; } }
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi, Done, I will close this ticket and I will mark it as resolved. The updated code that pulls all fields it'sfunction overwrite_mebers_dir_meta() { $marital_status = bp_get_member_profile_data('field=Statut'); //$i_am_a = bp_get_member_profile_data('field=Je suis', bp_displayed_user_id()); $i_am_a = xprofile_get_field_data( 'Je suis', bp_loggedin_user_id(), $multi_format = 'comma' ); $output['age'] = apply_filters('kleo_bp_meta_after_age', get_member_age(bp_get_member_user_id())) . ' ANS'; $output['Statut'] = $marital_status; $output['Je suis'] = $i_am_a; $city = bp_get_member_profile_data('field=Ville'); $department = bp_get_member_profile_data('field=Département'); $country = bp_get_member_profile_data('field=Pays'); $output['Ville'] = $city; $output['Département'] = $department; $output['Pays'] = $country; $output['À propos de moi'] = $about_me; $kleo_config['bp_members_details_field'] = 'À propos de moi'; return $output; } add_filter('kleo_bp_meta_fields', 'overwrite_mebers_dir_meta');
Also a css prevent displaying all fields cuz it's limited to 26px height use also the css to have all displayed..search-item .date, .search-item .date a { height: initial !important; }
Cheers R.Radu
ModeratorHi,
I see in this case
Use the next function instead
COPY CODEfunction remove_buddypress_tabs_by_membership_css() { echo' <style> .bbp-user-page #item-body .messages { display: none; } </style> '; } add_action( 'wp_head', 'remove_buddypress_tabs_by_membership_css', 999 );
This will hide via CSS the messages container if you need to hide that via PHP and displaying a message there it requires more time and it’s something custom since our support team cannot cover custom development but guidance yes.
You can ask our development team about a price quote for this
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
Just write your text in both versions in this way
Example :COPY CODE[:en]English Text[:ro]RO Other language Text[:]
In theme options you should have the text like this:
In wp globus theme options addon add those -> Options to translate:
IT will render like this
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Ticket solutionRadu
Moderatorhi
Use the next function to remove completely messages tab if the user doesn’t have any membership package.
COPY CODEfunction remove_buddypress_tabs_by_membership() { if( ! pmpro_has_membership_access()) { bp_core_remove_nav_item('messages'); } add_action( 'bp_init', 'remove_buddypress_tabs_by_membership', 999 );
Or the next one to remove that only for a certain memebrship level in my example it’s with package id 1
COPY CODEfunction remove_buddypress_tabs_by_membership() { if(pmpro_hasMembershipLevel('1')) { bp_core_remove_nav_item('messages'); } } add_action( 'bp_init', 'remove_buddypress_tabs_by_membership', 999 );
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
Try to use the
bp_init hook instead the bp_setup_nav
COPY CODEfunction my_change_profile_tab_order() { global $bp; $bp->bp_nav['profile']['position'] = 10; $bp->bp_nav['media']['position'] = 20; $bp->bp_nav['messages']['position'] = 30; $bp->bp_nav['forums']['position'] = 40; $bp->bp_nav['articles']['position'] = 50; $bp->bp_nav['friends']['position'] = 60; $bp->bp_nav['settings']['position'] = 70; } add_action( 'bp_init', 'my_change_profile_tab_order', 999 );
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
Just paste this code into VC using Raw HTML element
COPY CODE<div class="custom-button-location kleo-fb-wrapper text-center"> <a href="#" class="kleo-facebook-connect btn btn-default "><i class="icon-facebook"></i> Log in with Facebook</a> </div>
Then you can customize only this with the next CSS that will be added to wp-admin -> theme options -> general options -> quick CSS
COPY CODE.custom-button-location.kleo-fb-wrapper.text-center a { font-size: 15px; padding: 20px; }
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
Please add those codes to function.php child theme but get rid off all codes related to this modification.
COPY CODEfunction filter_message_button_link( $link ) { $link = wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r='. bp_core_get_username( bp_get_member_user_id() ) ); return $link; } function display_private_message_button() { if( bp_get_member_user_id() != bp_loggedin_user_id() ) { //bp_send_message_button(); ?> <div id="send-private-message" class="generic-button"> <div class="private-message-button generic-button" ><a href="<?php echo filter_message_button_link(); ?>" class="button small secondary radius" rel="add"><i class="icon-envelope"></i></a></div> </div> <?php add_filter('bp_get_send_private_message_link', 'filter_message_button_link', 1, 1 ); } } add_action( 'bp_directory_members_item_last', 'display_private_message_button',9999 );
Then replace this file content: /wp-content/plugins/buddypress/bp-themes/bp-default/_inc/ajax.php with this one: https://pastebin.com/raw/XjsaY26E
This will overwrite a BuddyPress core file, since the ajax, it returns the "Add friend" text dynamically this it's the single option, you can ask the BuddyPress forums about how to overwrite the ajax.php file in child theme
So those will be displayed like this :
That's all
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Ticket solutionRadu
ModeratorHi,
Use this to hide that text completely
COPY CODE#buddypress div#item-header div#latest-update {display:none !important;}
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJuly 19, 2017 at 20:03 in reply to: Homepage Link Changes Wanted to Form Submit Button & JOIN Top Button. Need link to Custom Page Instead! #167970Radu
ModeratorHi,
1. You will need to have child theme installed and active to can overwrite the original theme files even if you update !
The sign-up button will be link to a membership levels page using the next file.
Go to wp-content/themes/sweetdate-child/ and create a new file named header.php in that you will paste the next content https://pastebin.com/raw/xTmwU19A2. You can desesign a new slider using revlolution slider from wp-admin -> revolution slider -> new slider.
the divi builder maybe will work, but there it’s slider area.
3. The theme settings from parent and child are separated, example : if you have child theme activated and you have made your theme adjustments using the child theme, when you activate the parent theme the theme options remains in child theme to can have that in both variants you should import from child theme to parent theme the theme settings that can be imported/exported from wp-admin -> theme options -> import/export.
For the pmpro issue that not shows the credit card information, you will have to copy the checkout.php file from paid memberships pro folder ( /wp-content/plugins/paid-memberships-pro/pages/checkout.php )
to : /wp-content/themes/sweetdate-child/paid-memberships-pro/pages/
In this way the default pmpro checkout form wiill be displayed.
The membership levels page it’s a normal page that can be found under wp-admin -> pages -> memebrship levels and it contains [membership_levels] shortcode to generate those.
For the redirection after paypal payment this isn’t modified by the kleo theme, you can ask the pmpro support about a snippet that controls that.
For the users that already signed up free, you can use this snippet to detect logged in users but not paying and to be redirected and locked to memebrship levels page until they pay.
COPY CODEadd_action( 'template_redirect', 'my_membersip_restrict' ); function my_membersip_restrict() { global $pmpro_pages, $post; if ( is_user_logged_in() && !pmpro_hasMembershipLevel() ) { if (isset($post->ID) && !in_array($post->ID, $pmpro_pages)) { wp_redirect( pmpro_url() ); } } }
The snippet will be pasted in wp-content/themes/sweetdate-child/functions.php
NOTE : The Kleo Child Theme needs to be installed and activated.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
Fixed, please check and let me know
I’ve added this function to the child theme to fix that
COPY CODEadd_filter( 'pre_get_posts', 'tgm_io_cpt_search' ); function tgm_io_cpt_search( $query ) { if ( $query->is_search && $_GET['post_type'] ) { //print_r($_GET['post_type']); if(is_array($_GET['post_type'])) { $post_type = explode(',', $_GET['post_type'][0]); } else { $post_type = $_GET['post_type']; } $query->set( 'post_type', $post_type ); } return $query; }
This will be included in next theme update, so you can delete this after the next updates.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
Add this code to functions.php
COPY CODEfunction check_is_register_page() { if(is_page('register') && !is_user_logged_in()) { echo 'This is my custom message for the register page for guest users'; } } add_action('bp_before_signup_profile_fields', 'check_is_register_page');
It will display a message for guest users. Message by referring location isn’t possible at this moment.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
The snippet provided by that develooper cannot work on directory cuz adding a member type name to the body class it’s useless since the class should be added to the each memory box.
Just create a file named members-loop.php in /wp-content/themes/kleo/buddypress/members/ and paste the next content in it https://pastebin.com/raw/LvnMy818
CSS.
COPY CODE.directory.members .member-type-player .item-avatar { border-color: #00b9f7 !important; } .directory.members .member-type-manager .item-avatar { border-color: red !important; }
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
Just add this code to JavaScript code from wp-admin -> theme options -> general options
COPY CODE<script> jQuery(document).ready(function() { document.addEventListener( 'wpcf7submit', function( event ) { if ( '10032' == event.detail.contactFormId ) { window.location.href="http://google.com"; // do something productive } }, false ); }); </script>
Replace 10032 with the form id, it redirects after submit it works I’ve tested
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorI see you don’t need any snippet to adds that, it seems Kleo adds that already, I’ve tested with this plugin https://wordpress.org/plugins/bp-member-type-generator/ I’ve created a type named player
And then I’ve added this CSS
COPY CODE.member-type-player #item-header-avatar { background: red !important; }
And the border was colored
For additional member types colors just add a new rule like :
.member-type-student #item-header-avatar { background: yellow !important; }
The css will be added to wp-admin -> theme options -> General settings -> Quick CSS Cheers R.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
For the Forums problem i’ve added this CSS to quick css area of your site
COPY CODE@media only screen and (max-width: 480px) { #bbpress-forums input#bbp_topic_tags, #bbpress-forums input#bbp_topic_title { width: 100%; } }
Now it should be ok
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorAdd this function
COPY CODEif ( ! function_exists( 'kleo_search_menu_item' ) ) { /** * Add search to menu * * @param string $items * @param object $args * * @return string */ function kleo_search_menu_item( $items, $args ) { if ( sq_option( 'ajax_search', 1 ) == 'logged_in' && ! is_user_logged_in() ) { return $items; } //$location = sq_option( 'menu_search_location', 'primary' ); if ( $args->theme_location == 'top' ) { $form = kleo_get_search_menu_item(); $items .= '<li id="nav-menu-item-search" class="menu-item kleo-search-nav">' . $form . '</li>'; } return $items; } }
The function needs to be pasted in wp-content/themes/kleo-child/functions.php
NOTE : Child theme needs to be installed and activated.
Tested on my local install the seatch item will go to topbar.
Please leave us a review on themeforest about your experience and give us 5* if you think the support it’s high quality.
Have a nice day
Regards
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
In future update we will implement this in theme option where you will have a separate option for logo on mobile until then, just add the next code to the wp-content/themes/kleo-child/functions.php
COPY CODEfunction custom_logo_on_mobile() { if ( wp_is_mobile() ) { if(sq_option('logo_mobile_devices', 1)) { //$mobile_logo_url = sq_option('logo_mobile_devices', 1)['url']; $mobile_logo_url = 'http://myurl.com/image.png'; return $mobile_logo_url; } } } add_filter('kleo_logo', 'custom_logo_on_mobile');
And replace myurl.com/image.png with your logo path from $mobile_logo_url = ‘http://myurl.com/image.png’; line
NOTE : Child theme needs to be installed and activated.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
See after many refreshes the CSS from dynamic.css was loaded in the provided link in the first instance the CSS was missing.
Please add this code to your child theme functions.php
COPY CODEfunction sq_print_inline_css() { add_action( 'wp_head', 'kleo_custom_head_css' ); remove_action( 'wp_enqueue_scripts', 'kleo_load_dynamic_css', 22 ); } add_action('init', 'sq_print_inline_css');
Let me know if you still encounter the issue.
The theme it generates the file but somehow the server prevents file to be displayed sometimes, can you ask on the hosting support a error log maybe in that are some hints.
Personally, i think it’s a permission problem but it;s odd.
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
Fixed! Check the search icon from the menu
I’ve replaced code with this one in child theme functions.php file
COPY CODEif ( ! function_exists( 'kleo_get_search_menu_item' ) ) { function kleo_get_search_menu_item() { $context = sq_option( 'search_context', '' ); if ( is_array( $context ) ) { $context = implode( ',', $context ); } //Defaults $action = home_url( '/' ); $hidden = ''; $input_name = 's'; if ( function_exists( 'bp_is_active' ) && $context == 'members' ) { //Buddypress members form link $action = bp_get_members_directory_permalink(); } elseif ( function_exists( 'bp_is_active' ) && bp_is_active( 'groups' ) && $context == 'groups' ) { //Buddypress group directory link $action = bp_get_groups_directory_permalink(); } elseif ( class_exists( 'bbPress' ) && $context == 'forum' ) { $action = bbp_get_search_url(); $input_name = 'bbp_search'; } elseif ( $context == 'product' ) { $hidden .= '<input type="hidden" name="post_type" value="product">'; $action = home_url( '/' ) . '?post_type=product'; } ob_start(); ?> <a class="search-trigger" href="#"><i class="icon icon-search"></i></a> <div class="kleo-search-wrap searchHidden" id="ajax_search_container"> <?php echo do_shortcode('[wpdreams_ajaxsearchpro id=1]'); ?> <div class="kleo_ajax_results"></div> </div> <?php $form = ob_get_clean(); return $form; } }
Also, I've added this CSS in quick css area to make a little space between input search form and the container edges.
COPY CODE#header div#ajax_search_container { padding: 10px 10px; }
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Ticket solutionRadu
ModeratorHi,
In quick CSS of the theme, it’s this CSS rule that prevents excerpts to be shown.
COPY CODE.post-item .post-info { display: none; }
So you can delete it can have the excerpt in the category.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionRadu
ModeratorHi,
All seems good excepting the CSS Rule
COPY CODEbody,a,b,h1,h2,h3,h4,h5,h5 { font-family : XMYekan !important; }
The font family has a space between XM and Yekan so try like this
COPY CODEbody,a,b,h1,h2,h3,h4,h5,h5 { font-family : XM Yekan !important; }
OR
COPY CODEbody,a,b,h1,h2,h3,h4,h5,h5 { font-family : XMYekanRegular !important; }
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts