This topic has 3 replies, 2 voices, and was last updated 9 years by sharmstr.

  • Author
  • #59928
     solokco
    Participant

    I would like to extend the functionality of K-Elements member grid to show only PAID MEMBERS of the page.

    I have tried changing plugin/k_elements/shortcodes/templates/buddypress/kleo_bp_members_grid.php on my CHILD THEME and it works fine.

    I would like to create another VC Shortcode so I can keep the original functionality and the new I’m creating. Is there an easy way to do this or requires to go deep in the code?

    Thanks

    #60400
     solokco
    Participant

    Any ideas?!

    #60411
     sharmstr
    Moderator

    You’ll need to define a new shortcode in your childs functions.php file, put your custom template file in /kleo-child/vc_templates/buddypress/, then use VC’s shortcode mapper to add it to vc.

    Example assumes you’ve named your template custom_bp_members_grid.php

    COPY CODE
    
    add_shortcode( "custom_bp_members_grid", "custom_bp_members_grid_func");
    
    function custom_bp_members_grid_func($atts, $content = null) {
    	
    	global $kleo_config;
    	$shortcode = array(
            'name' => 'Custom Members Grid',
            'category' => 'buddypress',
            'example' => '[kleo_bp_members_grid type="newest" number="12" size="150" class=""]'
        );
    	$output = '';
    
    	if(!isset($shortcode)) {
    		return;
    	}
    
    		include get_stylesheet_directory() .'/vc_templates/buddypress/custom_bp_members_grid.php';
    	
    
    	return $output;
    }
    
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #60414
     sharmstr
    Moderator

    http://vc.wpbakery.com/video-academy/add-shortcodes-visual-composer-wordpress/

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

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?