Results 1 to 6 of 6

Thread: custom item

  1. #1
    Junior Member
    Join Date
    Nov 2015
    Posts
    5

    Cool custom item

    What i would like to do is get code from widget and fill in the items to be sorted dynamically

    [likebtn_most_liked title="Most Liked Content" number="5" order="likes" time_range="all" show_likes="1" show_dislikes="0" show_thumbnail="1" thumbnail_size="thumbnail" show_excerpt="0" show_date="0" entity_name="custom_item"]

    for instance say I hard code the above shortcode into them and it appears on all pages... I want to make the option .... entity_name="custom_item" | entity_name="post" | entity_name="page" etc...
    display posts from certain category and or custom post type but allow the url to tell it which one...

    Basically I want on a page it to display pages and on post it needs to display posts and on custom post type " it display the custom post type....

    Is there a way to add categories and or dynamically add entity_name="???" based on page...

    Also how do i use the custom_item option - what is it?

    ccsc.jpg


  2. #2
    Admin LikeBtn's Avatar
    Join Date
    Sep 2011
    Posts
    320
    Hi,

    If one inserts Like button into the post using shortcode with Button Name (identifier), votes will be saved in a virtual post type - Custom item.

    You can insert [likebtn_most_liked] shortcode into template using https://developer.wordpress.org/reference/functions/do_shortcode/ function.
    Use https://codex.wordpress.org/Function.../get_post_type function to determine current post type (post/page/custom post type).


  3. #3
    Junior Member
    Join Date
    Nov 2015
    Posts
    5
    Can you explain this for me more clearly..

    If one inserts Like button into the post using shortcode with Button Name (identifier), votes will be saved in a virtual post type - Custom item.


  4. #4
    Admin LikeBtn's Avatar
    Join Date
    Sep 2011
    Posts
    320
    It means that on Statistics page you will see such items in Custom item category and you will not see post title or thumbnail, only identifier.


  5. #5
    Junior Member
    Join Date
    Nov 2015
    Posts
    5
    Quote Originally Posted by LikeBtn View Post
    It means that on Statistics page you will see such items in Custom item category and you will not see post title or thumbnail, only identifier.
    Do you have an example? I'm a little lost..


  6. #6
    Admin LikeBtn's Avatar
    Join Date
    Sep 2011
    Posts
    320
    Basically I want on a page it to display pages and on post it needs to display posts and on custom post type " it display the custom post type....
    For this task you don't need to use custom items.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •