This topic has 12 replies, 3 voices, and was last updated 10 years by Abe.

  • Author
  • #30539
     sharmstr
    Moderator

    I’m thinking that the stats on your pinterest demo are hardcoded and that you haven’t added shortcodes for those numbers. If I’m wrong, can you tell me how you got the daily searches and featured article numbers?

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

    Attachments:
    You must be logged in to view attached files.
    #30564
     Abe
    Keymaster

    Hi @sharmstr
    Unfortunately those are just for demo and they are hard-coded.
    If you want we can make a functionality with the daily searches for 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.

    #30581
     sharmstr
    Moderator

    That would be great, but I’m not sure that I’d use it… maybe others will. I’m working on one that will get posts counts by type. I’ll be posting it here when I’m done. I’m just modifying your forum stat shortcode so you guys can probably add it to k-elements if you want. We’ll see 🙂

    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

    #30811
     sharmstr
    Moderator

    Here’s the code for adding a new shortcode item (Post count) within the Kleo shortcode menu to get the amount of published posts by type. When you click on it in the menu, you need to edit the shortcode so that there is only one option

    So from this

    COPY CODE
    
    [colabs_post_count type=post|page|custom post type]
    

    to this

    COPY CODE
    
    [colabs_post_count type=post]
    

    You can use this within the animated numbers shortcode

    COPY CODE
    
    [kleo_animate_numbers animation="animate-when-almost-visible" timer="3000"][colabs_post_count type=post][/kleo_animate_numbers]
    

    Put this in functions.php

    COPY CODE
    
    /*add shortcode to get total number of published posts, pages or custom post types */
    
    function colabs_post_count( $atts, $content = null ) {
    	$a = shortcode_atts( array(
            'type' => '',
    	), $atts );
    	global $wp;
    	$post_count = wp_count_posts($a['type']);
    	$published_count = $post_count->publish;
        return $published_count;
    }
    add_shortcode( 'colabs_post_count', 'colabs_post_count' );
    add_filter( 'kleo_tinymce_shortcodes', create_function('$args','$args[""][] = array("name" => "Post count", "code" => "[colabs_post_count type=post|page|custom post type]"); return $args;' ) );
    
    
    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

    #30818
     sharmstr
    Moderator

    @abe Forgot to say that I hope its okay that I put the shortcode in the kleo menu. I thought it best not to create a separate menu to save space. I can change it so the menu item title says ‘colabs’ or something.

    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

    #31197
     Abe
    Keymaster

    No it is OK within the KLEO menu. We will use this and add it in KLEO for others to take advantage of it. Thanks again.

    So do you need the daily searches shortcode? I can make it for you if you’ll use it.

    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.

    #31199
     sharmstr
    Moderator

    No. I dont need it. Thanks though 🙂

    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

    #31202
     Abe
    Keymaster

    OK 😀

    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.

    #33105
     sharmstr
    Moderator

    Thank you for adding this in the latest update. Works great.

    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

    #34369
     robertsjr
    Participant

    Re: Pinterest style. Are these shortcodes in the latest update or are we hard-coding from sharmstr’s submission above? I don’t have much coding experience but I am getting to grips with what I can. I want to show ‘total posts’ for first column, ‘posts added today’ for the second and ‘total registered members’ for the third.

    I appreciate any help on this.

    #34371
     sharmstr
    Moderator

    The post count shortcode is in there under Kleo->Content. But there’s not flag for “today”. Total members has been in there for a long time.

    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

    #34373
     robertsjr
    Participant

    Ok. Any workaround suggestions for the “today” flag? Thanks for your help.

    #34912
     Abe
    Keymaster

    @robertsjr unfortunately that is not available right now

    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 13 posts - 1 through 13 (of 13 total)

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

Log in with your credentials

Forgot your details?