Forum Replies Created

Viewing 40 posts - 121 through 160 (of 480 total)
  • Author
  • in reply to: Where i can edit icon plus from Members site? #36773
     Abe
    Keymaster

    You need to add this custom CSS

    COPY CODE
    
    .bp-member-dir-buttons .friendship-button .icon-plus:before {
        content: "\f004";
    }
    

    inside content is: “\f004” which is fontawesome heart icon as: http://fontawesome.io/3.2.1/cheatsheet/

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Possible conflict with latest update #36641
     Abe
    Keymaster

    Hi, as a temporary solution please add this CSS and I will inspect further

    COPY CODE
    
    #main {
        transform: none !important;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Post Grid Settings #36623
     Abe
    Keymaster

    Hi, to change that behavior you must edit this file wp-content/themes/kleo/page-parts/post-content-masonry.php

    I recommend to copy it to your child theme in the same folder location and edit it there.

    1. to change that speed you have to:
    – replace assets/js/app.min.js with the one attached since right now theme didn’t supported that
    – in the file above around line 82 you should add the slider speed in milliseconds like this:

    COPY CODE
    
    div class="kleo-banner-items" data-speed="2000"
    

    2.
    – line 92, remove the attribute data-rel=”prettyPhoto[inner-gallery]” to disable the lightbox
    – to replace the lightbox with link to the post, replace on the same line $slide with get_permalink()

    3. line 166 you need to change kleo_excerpt() function to be like:
    kleo_excerpt(20, false)
    which means it will show 20 letters instead of 20 words

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    Attachments:
    You must be logged in to view attached files.
    in reply to: Registration page and membership level #36464
     Abe
    Keymaster

    Hi,

    COPY CODE
    
    // redirect to registration page or membership levels page
    add_action('template_redirect', 'my_custom_redirect');
    
    function my_custom_redirect() {
    
        $restricted = array( 334 ); // all your restricted pages id
        $levels_to_check = array(1, 2, 3);
    
        if ( in_array( get_queried_object_id(), $restricted )) {
    
            if (is_user_logged_in()) {
                if (!pmpro_hasMembershipLevel($levels_to_check)) {
                   wp_redirect(pmpro_url("levels"));
                    exit;
                }
            } else {
                wp_redirect(bp_get_signup_page());
                exit;
            }
        }
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Display posts in list #36302
     Abe
    Keymaster

    wow that is very cool you can do that 🙂

    The fix until next update, add this CSS

    COPY CODE
    
    .small-listing .featured-content .post-item {
        padding: 20px 10px;
    }
    

    the simple listing seemed too basic but now a new listing can be added really easy by adding a new entry in the array
    $kleo_config[‘blog_layouts’] = array(
    ‘masonry’ => ‘Grid Masonry’,
    ‘small’ => ‘Small Left Thumbnail’,
    ‘standard’ => ‘Standard’
    );

    and just add another template in page-parts/post-content-xxx.php

    they should be automatically populated in admin and any other place

    Thank you

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

     Abe
    Keymaster

    Hi, until next update please add this CSS to fix it:

    COPY CODE
    
    .field_type_multiselectbox p.field-visibility-settings-toggle {
        width: 100% !important;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: How to change product badges #35846
     Abe
    Keymaster

    Hi, badges are generated by woocommerce. For example Sale will appear if you have a product with discount.
    if you need it in any other way you need to do it by CSS. Here is a starting point so the buttons will show without hovering

    COPY CODE
    
    .woocommerce ul.products li.product figure figcaption { bottom: 0; }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: GeoNames autocomplete #35771
     Abe
    Keymaster

    Hi, try to replace line 49 from wp-content/themes/sweetdate/custom_buddypress/kleo-bp-city-auto.php with

    COPY CODE
    
    
    url: "http://api.geonames.org/searchJSON",
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: One footer column fullwidth #35426
     Abe
    Keymaster

    Hello, also this is a CSS only solution so you don’t change theme template:

    COPY CODE
    
    #footer .wrap-content > .row > .col-sm-3:first-child {
        width: 100%;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Buddypress/bbpress redirection #35111
     Abe
    Keymaster

    Hi,
    I came up with this code for you to redirect all users on bbpress and buddypress pages to registration page

    COPY CODE
    
    /**
     * Redirect buddypress and bbpress pages to registration page
     */
    function kleo_page_template_redirect()
    {
        //if not logged in and on a bp page except registration or activation
        if( ! is_user_logged_in() &&
            ( ( ! bp_is_blog_page() && ! bp_is_activation_page() && ! bp_is_register_page() ) || is_bbpress() )
        )
        {
            wp_redirect( home_url( '/register/' ) );
            exit();
        }
    }
    add_action( 'template_redirect', 'kleo_page_template_redirect' );
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Handling custom post types #34846
     Abe
    Keymaster

    Hi, I can add the do_action( ‘kleo_before_article_content’ ); just before the content so you can easily add that there.
    Another way you could do it is to hook at the the_content filter and prepend your content to the existing content like:

    COPY CODE
    
    function add_cpt_info($content) {
        if (get_post_type() == 'mystories') {
            $content = "content before here " . $content;
        } else if (get_post_type() == 'mychapter') {
            $content = "content before here " . $content;
        }    
        return $content;
    }
    add_filter('the_content', 'add_cpt_info');
    

    but the first one is more logic so I will update theme files and send them to you later today.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Mailchimp ''Subscribe'' Button Display #34459
     Abe
    Keymaster

    That should be achieved by CSS. here is what it should look like to fix it

    COPY CODE
    
    .mc4wp-form .btn-lg {
    padding: 10px 20px 11px 20px;
    font-size: 16px;
    line-height: 1.33;
    border-radius: 4px;
    margin: 0;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Prev & Next Posts #34430
     Abe
    Keymaster

    Please add this CSS to disable navigation.

    COPY CODE
    
    .pagination-sticky {
        display: none;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: rtMedia PRO – Changing image size on activity stream #34271
     Abe
    Keymaster

    Hi, please add this CSS to let it be automatically

    COPY CODE
    
    .rtmedia-activity-container .rtmedia-list .rtmedia-item-thumbnail img {
        max-width: none;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Need Styling Ability for Topbar #34248
     Abe
    Keymaster

    Hi, Sorry for the late reply.
    You can do it by CSS. Each page add a specific class to the body element so check the body class and add like this

    COPY CODE
    
    .page-id-1034 .social-header.header-color {
        background: red !important;
    }
    .page-id-1034 .social-header.header-color a {
        color: #fff !important;
    }
    

    And from this example add your own styling

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Adding support for Spotify in audo posts #34230
     Abe
    Keymaster

    Hi, I did some tests and come to something but it won’t display the playlist. See

    COPY CODE
    
        iframe[src*="spotify.com"] {height: auto!important;}
        .fluid-width-video-wrapper {padding-top: 0 !important;}
        .fluid-width-video-wrapper iframe[src*="spotify.com"] {position: relative;}
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Modal Box Issues #34001
     Abe
    Keymaster

    probably around:

    COPY CODE
    
    <?php do_action('kleo_before_login_form');?>
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Assign membership level ar registration #33597
     Abe
    Keymaster

    Hello, right now users need to register first and then apply for a membership. We will try to optimize the process in the future. You can assign a level at registration like this :

    This is the function you need to add in order to assign a specific membership level to a newly registered user. Add it into your sweetdate-child/functions.php

    COPY CODE
    
    
    add_action('user_register', 'kleo_pmpro_default_level');
    function kleo_pmpro_default_level($user_id) {
    	pmpro_changeMembershipLevel(1,$user_id);
    }
    

    This one assigns level with ID 1

    Also this code checks for a specific profile value and add only those users to the membership level. Does not apply with Facebook registration

    COPY CODE
    
    
    
    /**
    * When registering, add the member to a specific membership level
    * based on the field value he has selected
    *
    * @global object $wpdb
    * @global object $bp
    * @param integer $user_id
    */
    function kleo_pmpro_default_level($user_id) {
        global $wpdb, $bp;
     
        //Change this with your field name
        $field_name= "I am a";
     
        //Change the field value
        $value_to_match = "Woman";
     
        //Membership level id
        $membership_level = 1;
     
        //Done editing
        $field_id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_fields} WHERE name = %s", $field_name ) );
        if ($_POST['field_'.$field_id] == $value_to_match) {
                pmpro_changeMembershipLevel($membership_level, $user_id);
        }
    }
     
    function kleo_mu_pmpro_default_level($user_id, $password, $meta) {
        global $bp, $wpdb;
     
        //Change this with your field name
        $field_name= "I am a";
     
        //Change the field value
        $value_to_match = "Woman";
     
        //Membership level id
        $membership_level = 1;
     
        
        //Done editing
        $field_id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_fields} WHERE name = %s", $field_name ) );
        $field_value = $meta['field_'.$field_id];
        if ( $field_value == $value_to_match ) {
            pmpro_changeMembershipLevel($membership_level, $user_id);
        }
    }
     
    if (is_multisite()) {
        add_action( 'wpmu_activate_user', 'kleo_mu_pmpro_default_level', 10, 3);
    } else {
        add_action('user_register', 'kleo_pmpro_default_level');
    }
    
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Disable Carousel? #33576
     Abe
    Keymaster

    Hi, thank you very much

    Add this CSS to hide them

    COPY CODE
    
    .pagination-sticky {
        display: none;
    }
    
    li#members-all {
        display: none;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Buddypress No borders #33551
     Abe
    Keymaster

    Try adding this CSS:

    COPY CODE
    
    .main-color .article-content {background: none;}
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: styling option / picture upload / #33548
     Abe
    Keymaster

    Hi,

    1. no, maybe you have caching enabled.
    2. that should be done by CSS

    COPY CODE
    
    .rtmedia-container .rtmedia-item-title, .rtmedia-activity-container .rtmedia-item-title, #buddypress div.rtmedia-activity-container .rtmedia-item-title {
        text-align: left;
    }
    #buddypress div.rtmedia-activity-container ul.rtmedia-list li .rtmedia-item-thumbnail {
        margin: initial;
    }
    

    3. Yes that is how Buddypress works. Try looking on their forum for a hack

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Private message button #33535
     Abe
    Keymaster

    hmm, you are right 🙂 you initial approach was fine since the bp_get_member_user_id() returns false if it is not in the loop.
    So final code here 🙂

    COPY CODE
    
    function filter_message_button_link( $link = '' ) {
        $bp_user_id = (bp_get_member_user_id() ? bp_get_member_user_id() : bp_displayed_user_id() );
    	$link = wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . bp_core_get_username( $bp_user_id ) );
    	return $link;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Private message button #33521
     Abe
    Keymaster

    Did it like this:

    COPY CODE
    
    function filter_message_button_link( $link = '' ) {
        $bp_user_id = (bp_is_user() ? bp_displayed_user_id() : bp_get_member_user_id() );
    	$link = wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . bp_core_get_username( $bp_user_id ) );
    	return $link;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Change Buddypress "Change Profile Photo" URL #33323
     Abe
    Keymaster

    Hello there
    I came with a quick solution that implies only adding this code to your child theme functions.php. This will make the page go a bit lower when clicking Buddypress navigation links

    COPY CODE
    
    /* Buddypress profile - scroll page below when clicking navigation */
    add_action('wp_footer', 'kleo_bp_add_link_nav');
    function kleo_bp_add_link_nav() {
        echo '<script>jQuery(document).ready(function() { ' . "\n\t" .
            'jQuery("#item-nav .item-list-tabs a, #item-body #subnav a").each(function() {' . "\n\t\t" .
            'jQuery(this).attr("href",jQuery(this).attr("href")+"#item-nav");' . "\n\t" .
            '}); ' . "\n" .
            '});</script>' . "\n";
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Profile Avatar On Top of Username #33185
     Abe
    Keymaster

    Hi, You should try this CSS

    COPY CODE
    
    #buddypress #item-header-avatar {
        box-shadow: none;
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Change "Add Friend" Buttons #33180
     Abe
    Keymaster

    Hello, sorry for the late reply.
    Those are related to Buddypress and they should be translated from BuddyPress plugin.

    Here is the CSS to accomplish that

    COPY CODE
    
    #profile .two.columns.pull-two {
        clear: both;
        float: left;
        left: 0;
        right: auto;
        width: 100%;
    }
    #profile div.generic-button {
        float: left;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Featured Image Disappeared after update? #33078
     Abe
    Keymaster

    Hi @webprofast
    Indeed we disabled the featured image on page and left it only to show in searches. We disabled it because we have received requests for this. To enable it you can edit content-page.php and replace

    COPY CODE
    
    ! is_page()
    

    with

    COPY CODE
    
    1 == 1
    

    To disable the highlight add this Css to style.css from the child theme

    COPY CODE
    
    .kleo-main-header .nav > li.active > a, .kleo-main-header .nav > li > a:hover {
        box-shadow: none;
    }
    

    To have no hassle future updates you should enable the child theme and copy this template inside the child theme so your change is kept.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Borders #33071
     Abe
    Keymaster

    Hi, depending on what you need you can easily do it with a CSS rule.
    Example

    COPY CODE
    
    .element { border-width: 4px; }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: How to change matching system #32923
     Abe
    Keymaster

    @kasselnightt

    Support offered here should be limited to theme functionality problems or other issues as well as improvements recommendations. Any custom work you might need isn’t supported by the team from the support site.

    1. you should do your changes over FTP and if you crash it then just undo the changes to the file. for this you will probably need custom work to match your needs.

    2. Depending on how you want to change it you can accomplish it using CSS.

    3. Css solution here also.

    4. Disable Buddypress modules that you don’t want in WP admin – Settings – Buddypress

    5. Check out our demo. maybe you have done something wrong there with some changes

    6. Interesting idea. I don’t think I have seen similar one

    A little guidance and example: add this CSS for the pink colors

    COPY CODE
    
    .pink-text {
        color: #f00056;
    }
    .button.alert {
        background-color: #ed0058;
        border: 1px solid #ed0058;
    }
    

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Facebook login #32584
     Abe
    Keymaster

    You have a javscript error:

    COPY CODE
    
    SyntaxError: missing ) after argument list
    alert('Vous devez accepter les conditions générales d'utilisation.');
    

    I think it is related to that translated string and it should be like this:

    Vous devez accepter les conditions générales d\’utilisation.
    instead of
    Vous devez accepter les conditions générales d’utilisation.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Need to change priority of custom post type creation #32479
     Abe
    Keymaster

    Hi chazzzzy,
    This should work but you need to change a file that will be also included in next update. Add the code in your child theme.

    COPY CODE
    
    add_action( 'after_setup_theme', 'kleo_my_remove_actions' );
    function kleo_my_remove_actions()
    {
        global $kleo_post_types;
        remove_action('init', array( $kleo_post_types, 'setup_clients_post_type'), 100);
    }
    

    And change this file content from your theme: wp-content/themes/kleo/lib/theme-functions.php with the content from the one attached

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    Attachments:
    You must be logged in to view attached files.
    in reply to: Members directory page with sidebar – How to #32181
     Abe
    Keymaster

    For Left and Right sidebar try adding this code:

    COPY CODE
    
    //Members left sidebar
    add_filter('kleo_bp_directory_main_cols', 'kleo_custom_members_cols');
    function kleo_custom_members_cols() {
        return 'four';
    }
     
    add_action('bp_before_directory_members', 'kleo_add_buddy_sidebar', 99);
    function kleo_add_buddy_sidebar() {
        get_sidebar('buddypress');
    }
    add_action('bp_after_directory_members', 'kleo_sidebar', 99);
    
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: show blog, menu and breadcrumb #31748
     Abe
    Keymaster

    Thank you @sharmstr for the solutions.
    Here is another way on adding icons to the social icons section:

    COPY CODE
    
    add_action( 'kleo_get_social_profiles', 'kleo_my_extra_social_icons' );
    function kleo_my_extra_social_icons( $icons ) {
        $icons .= '<li><a href="http://google.com"><i class="icon icon-eye"></i> <div class="ts-text">Eye</div></a></li>';
    
        return $icons;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Cant see comments on PAGE #31701
     Abe
    Keymaster

    Hi, it is not enabled for pages. to add it, put this code in page.php just before the endwhile

    COPY CODE
    
        <comments_template( '', true );
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Live Search disable enter key #31642
     Abe
    Keymaster

    Well, here goes the updated files for the search form changes 🙂
    I have added the context attribute to filter the search only by content selected and it will apply to ajax too. Also I have added an option to disable ajax or form submit.

    wp-content/plugins/k-elements/shortcodes/shortcodes.php

    COPY CODE
    
    function kleo_search_form_func( $atts, $content = null ) {
    
        $form_style = $type = $placeholder = $context = $el_class = '';
        extract(shortcode_atts(array(
            'form_style' => 'default',
            'type' => 'both',
            'context' => '',
            'placeholder' => '',
            'el_class' => ''
        ), $atts));
    
        global $kleo_config;
    
        $class = '';
        if ($el_class != '') {
            $class = ' '. $el_class;
        }
    
        $class .= ' search-style-'. $form_style;
    
        //Defaults
        $action = home_url( '/' );
        $hidden = '';
        $input_name = 's';
        $ajax_results = 'yes';
        $search_page = 'yes';
    
        if ( $type == 'ajax' ) {
            $search_page = 'no';
        } elseif ( $type == 'form_submit' ) {
            $ajax_results = 'no';
        }
    
        if ( function_exists('bp_is_active') && $context == 'members' ) {
            //Buddypress members form link
            $action = bp_get_members_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">';
        }
    
        $output = '<div class="kleo-search-wrap kleo-search-form'. $class .'">';
    
        $output .= '<form role="search" method="get" id="searchform" ' . ($search_page == 'no' ? ' onsubmit="return false;"' : '') . ' action="' . $action . '" data-context="'. $context  .'">
    		<div class="input-group">
    			<input name="' . $input_name . '" id="' . $input_name . '" autocomplete="off" type="text" class="ajax_s form-control input-lg" value="" placeholder="' . $placeholder . '">
    			<span class="input-group-btn">
          			<input type="submit" value="Search" id="searchsubmit" class="button">
    			</span>
    		</div>
    		'.$hidden.'
    	</form>';
        if ($ajax_results == 'yes' ) {
            $output .= '<span class="kleo-ajax-search-loading"><span class="kleo-loading-icon"></span></span><div class="kleo_ajax_results"></div>';
        }
        $output .= '</div>';
    
    
        return $output;
    }
    

    wp-content/plugins/k-elements/compat/plugin-js-composer/config.php around 2302

    COPY CODE
    
        /* Search form */
        $kleo_post_types = array();
    
        if ( function_exists( 'bp_is_active' ) ) {
            $kleo_post_types['Members'] =  'members';
        }
        $kleo_post_types['Posts'] = 'post';
        $kleo_post_types['Pages'] = 'page';
    
        $args = array(
            'public'   => true,
            '_builtin' => false
        );
    
        $types_return = 'objects'; // names or objects, note names is the default
        $post_types = get_post_types( $args, $types_return );
    
        $except_post_types = array('kleo_clients', 'kleo-testimonials', 'topic', 'reply');
    
        foreach ( $post_types  as $post_type ) {
            if ( in_array( $post_type->name, $except_post_types ) ) {
                continue;
            }
            $kleo_post_types[$post_type->labels->name] = $post_type->name;
        }
        vc_map(
            array(
                'base'        => 'kleo_search_form',
                'name'        => 'Search Form',
                'weight'      => 6,
                'class'       => 'kleo-search',
                'icon'        => 'kleo-search',
                'category'    => __("Content",'js_composer'),
                'description' => __('Insert search form','kleo_framework'),
                'params'      => array(
                    array(
                        "param_name" => "form_style",
                        "type" => "dropdown",
                        "holder" => "div",
                        "class" => "hide hidden",
                        "heading" => __("Form Style"),
                        "value" => array(
                            'Default' => 'default',
                            'Transparent' => 'transparent'
                        ),
                        "description" => 'This affects the look of the form. Default has a border and works for white backgrounds.'
                    ),
                    array(
                        "param_name" => "type",
                        "type" => "dropdown",
                        "holder" => "div",
                        "class" => "hide hidden",
                        "heading" => __("Form Type"),
                        "value" => array(
                            'Form submit + AJAX results' => 'both',
                            'Just Form Submit' => 'form_submit',
                            'Just AJAX results' => 'ajax'
                        ),
                        "description" => 'Here you can disable Form Submit or AJAX results.'
                    ),
                    array(
                        "param_name" => "context",
                        "type" => "checkbox",
                        "holder" => "div",
                        "class" => "hide hidden",
                        "heading" => __("Search context"),
                        "value" => $kleo_post_types,
                        "description" => 'What content do you want to search for. If you select just Members then the form submit will go to members directory. Same applies for Forums and Products.'
                    ),
                    array(
                        "type" => "textfield",
                        "holder" => "div",
                        "class" => "",
                        "heading" => __("Placeholder"),
                        "param_name" => "placeholder",
                        "value" => '',
                        "description" => __("Placeholder to show when the input is empty")
                    ),
                    $el_class
    
    
                )
            )
        );
    

    wp-content/themes/kleo/lib/theme-functions.php

    COPY CODE
    
    	function kleo_ajax_search()
    	{
    		//if "s" input is missing exit
    		if( empty( $_REQUEST['s'] ) ) die();
    
    		$output = "";
            $context = "any";
    		$defaults = array(
                'numberposts' => 4,
                'post_type' => $context,
                'post_status' => 'publish',
                'post_password' => '',
                'suppress_filters' => false,
                's' => $_REQUEST['s']
            );
    
            if ( isset( $_REQUEST['context'] ) ) {
                $context = explode( ",", $_REQUEST['context'] );
                $defaults['post_type'] = $context;
            }
    
    		$defaults =  apply_filters( 'kleo_ajax_query_args', $defaults);
    
    		$query = http_build_query( $defaults );
    		$posts = get_posts( $query );
    
            $members = array();
            $members['total'] = 0;
            if ( function_exists( 'bp_is_active' ) && ( $context == "any" || in_array( "members", $context ) ) ) {
                $members = bp_core_get_users(array('search_terms' => $_REQUEST['s'], 'per_page' => $defaults['numberposts'], 'populate_extras' => false));
            }
    
            //if there are no posts nor members
            if( empty( $posts ) && $members['total'] == 0 ) {
    			$output  = "<div class='kleo_ajax_entry ajax_not_found'>";
    			$output .= "<div class='ajax_search_content'>";
    			$output .= "<i class='icon icon-exclamation-sign'></i> ";
    			$output .= __("Sorry, we haven't found anything based on your criteria.", 'kleo_framework');
    			$output .= "<br>";
    			$output .= __("Please try searching by different terms.", 'kleo_framework');
    			$output .= "</div>";
    			$output .= "</div>";
    			echo $output;
    			die();
    		}
    
            //if there are members
            if ( $members['total'] != 0 ) {
    
                $output .= '<div class="kleo-ajax-part kleo-ajax-type-members">';
                $output .= '<h4><span>' . __("Members", 'kleo_framework') . '</span></h4>';
                foreach ( (array) $members['users'] as $member ) {
                    $image = '<img src="' . bp_core_fetch_avatar(array('item_id' => $member-> ID, 'width' => 25, 'height' => 25, 'html' => false)) . '" class="kleo-rounded" alt="">';
                    if ( $update = bp_get_user_meta( $member-> ID, 'bp_latest_update', true ) ) {
                        $latest_activity = "<br>" . char_trim( trim( strip_tags( bp_create_excerpt( $update['content'], 50,"..." ) ) ) );
                    } else {
                        $latest_activity = '';
                    }
                    $output .= "<div class ='kleo_ajax_entry'>";
                    $output .= "<div class='ajax_search_image'>$image</div>";
                    $output .= "<div class='ajax_search_content'>";
                    $output .= "<a href='" . bp_core_get_user_domain( $member->ID ) . "' class='search_title'>";
                    $output .= $member->display_name;
                    $output .= "</a>";
                    $output .= "<span class='search_excerpt'>";
                    $output .= $latest_activity;
                    $output .= "</span>";
                    $output .= "</div>";
                    $output .= "</div>";
                }
                $output .= "<a class='ajax_view_all' href='" . bp_get_members_directory_permalink() . "?s=" . $_REQUEST['s'] . "'>" . __('View member results','kleo_framework') . "</a>";
                $output .= "</div>";
            }
    
    		//if there are posts
            if( ! empty( $posts ) ) {
                $post_types = array();
                $post_type_obj = array();
                foreach ( $posts as $post ) {
                    $post_types[$post->post_type][] = $post;
                    if (empty($post_type_obj[$post->post_type])) {
                        $post_type_obj[$post->post_type] = get_post_type_object($post->post_type);
                    }
                }
    
                foreach ($post_types as $ptype => $post_type) {
                    $output .= '<div class="kleo-ajax-part kleo-ajax-type-' . esc_attr( $post_type_obj[$ptype]->name ) . '">';
                    if (isset($post_type_obj[$ptype]->labels->name)) {
                        $output .= "<h4><span>" . $post_type_obj[$ptype]->labels->name . "</span></h4>";
                    } else {
                        $output .= "<hr>";
                    }
                    foreach ($post_type as $post) {
                        $format = get_post_format($post->ID);
                        if (get_the_post_thumbnail($post->ID, 'thumbnail')) {
                            $image = get_the_post_thumbnail($post->ID, 'thumbnail');
                        } else {
                            if ($format == 'video') {
                                $image = "<i class='icon icon-video'></i>";
                            } elseif ($format == 'image' || $format == 'gallery') {
                                $image = "<i class='icon icon-picture'></i>";
                            } else {
                                $image = "<i class='icon icon-link'></i>";
                            }
                        }
    
                        $excerpt = "";
    
                        if (!empty($post->post_content)) {
                            $excerpt = "<br>" . char_trim(trim(strip_tags(strip_shortcodes($post->post_content))), 40, "...");
                        }
                        $link = apply_filters('kleo_custom_url', get_permalink($post->ID));
                        $classes = "format-" . $format;
                        $output .= "<div class ='kleo_ajax_entry $classes'>";
                        $output .= "<div class='ajax_search_image'>$image</div>";
                        $output .= "<div class='ajax_search_content'>";
                        $output .= "<a href='$link' class='search_title'>";
                        $output .= get_the_title($post->ID);
                        $output .= "</a>";
                        $output .= "<span class='search_excerpt'>";
                        $output .= $excerpt;
                        $output .= "</span>";
                        $output .= "</div>";
                        $output .= "</div>";
                    }
                    $output .= '</div>';
                }
    
                $output .= "<a class='ajax_view_all' href='" . home_url( '/' ) . '?s=' . $_REQUEST['s'] . "'>" . __('View all results', 'kleo_framework') . "</a>";
            }
    		echo $output;
    		die();
    	}
    

    Add this in wp-content/themes/kleo/assets/js/app.js around line 1548, after

    COPY CODE
    
    values += "&action=kleo_ajax_search";
    
    COPY CODE
    
                if ( form.data('context') ) {
                    values += "&context="+form.data('context');
                }
    

    Hope I haven’t missed any 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Shortcodes not allowed in feature item? #31562
     Abe
    Keymaster

    I came with this code because I tested your suggestion and wasn’t matching if you didn’t had a shortcode inside

    COPY CODE
    
    $sh = preg_match_all('~\[kleo_feature_item([\s\S]*)]([^\[\]]*)\[/kleo_feature_item]~', $content, $childs);
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Unable to reduce the height of the header #31446
     Abe
    Keymaster

    Then try:

    COPY CODE
    
    .kleo-main-header .navbar-header, .kleo-main-header .navbar-collapse > ul > li > a {
        line-height: 44px !important;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Unable to reduce the height of the header #31392
     Abe
    Keymaster

    Hello, to reduce it try with:

    COPY CODE
    
    .kleo-main-header:not(.header-scrolled) .navbar-header, .kleo-main-header:not(.header-scrolled) .navbar-collapse > ul > li > a {
        line-height: 44px !important;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Members search filters lost via 'Back' button #31097
     Abe
    Keymaster

    in /wp-content/themes/sweetdate/custom_buddypress/_inc/global.js around line 714 add after:

    COPY CODE
    
    			jq('html, body').animate({
    				scrollTop: jq(".item-list-tabs").offset().top
    			}, 500);
    
    

    this:

    COPY CODE
    
                if (object == 'members') {
                    window.history.pushState(null, null, jq(target).attr('href'));
                }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    in reply to: Problem with header on pages #30453
     Abe
    Keymaster

    Hi @sunny

    For 1. try adding this CSS since that happens when you do not have that much content on that page

    COPY CODE
    
    #main-container .template-page {
        min-height: 500px;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 40 posts - 121 through 160 (of 480 total)

Log in with your credentials

Forgot your details?