Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Feb 2016
    Posts
    3

    Unhappy "Most Liked" from category & API call

    Hi there,
    I am having issues trying to achieve two functions of the plugin on a Wordpress install.

    I have set up the plugin and configured all of the settings etc... but I need to find a way to achieve two things:

    1. I need to display "Most liked" for each category (on a custom post type) on my site.

    What would be the best way to pull out the top 3 most liked businesses for EACH category? How can I acheive this?

    2. This one is even more trickier, this directory is going to be hosted on a subdomain at directory.website.com. The main website will link to this and vice-versa. However, on the main website, I need to add a sidebar that displays "Most liked businesses". This doesn't need to be category specific, however I need to display the most liked businesses on a completely seperate Wordpress install. I was looking into the API and see I can pull the data out via HTML, CSV or JSON. However, the identifier is using the page-url, when I pull this data out, it displays the page url as the title, I need it to display the title and possibly an image. Is this possible? How can I acheive this?

    If you can help me out, I would greatly appreciate it!

    Thanks,
    James


  2. #2
    LikeBtn Support support's Avatar
    Join Date
    Jan 2015
    Posts
    121
    Hi,

    Instructions sent in response to your email to support.


  3. #3
    Junior Member
    Join Date
    Feb 2016
    Posts
    3
    Yes, many thanks for that.

    Although i'm not sure you have understood me completely.

    1. Thank you for adding the 'Include items by category' option. However, I need to dynamically pull out the most liked based on the current category, not by specifying an ID.

    2. Will doing this pull out the 'title' for the post and not just the 'identifier'?

    Thanks,
    James


  4. #4
    Admin LikeBtn's Avatar
    Join Date
    Sep 2011
    Posts
    320
    1. Most liked widget is not supporting such feature for now.

    2. It will pull posts titles if you do the following: add your main domain to your account on https://likebtn.com/en/customer.php/websites then add a subdomain to this website. Enter account data on the Settings tab of the plugin. Configure the Most liked content widget on the subdomain to display all the posts.


  5. #5
    Junior Member
    Join Date
    Feb 2016
    Posts
    3
    Thank you.

    Regarding the 'most liked' for the category pages.

    Is there any possible way to pull in the category id into the new "include categories"? Through the use of PHP, is there any way to replicate the shortcode output? This way I can possibly pull out the ID into the include category option.


  6. #6
    Admin LikeBtn's Avatar
    Join Date
    Sep 2011
    Posts
    320
    You can get category using the following code:

    $categories = get_the_category();
    $category_id
    = $categories[0]->cat_ID;


Posting Permissions

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