How can we help?

If you are looking for support for our PokaTheme, this is the place!

Home Forums PokaTheme support Filter

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1457
    Christopher Witte
    Participant

    Hi,

    Do you have any suggestions on how to build a filter for the reviews?

    I want to be able to filter by bonus amount, Minimum Odd – i want to be able to filter on all the “numeric” information on the site.

    Is this possible? Is there a good plugin for this or can i edit the theme to achive this?

    Best
    Chris

    #1467
    admin
    Keymaster

    Hi Christopher,

    You want to change the display order in a shortcode by some custom fields? For example the ordering in the table shortcode?

    #1472
    Christopher Witte
    Participant

    Exactly!

    And maybe even more user-friendly by allowing the user to filter the bonuses from a menu.

    What i mean is something like this:

    Search Filter

    #1476
    admin
    Keymaster

    About the shortcode, tell me which shortcode you want to change the order and what custom ordering you want to achieve and I’ll help you through!

    We are also thinking creating a new table like shortcode with filters like the screenshot, It’s already in our list! 🙂

    #1477
    Christopher Witte
    Participant

    Thanks!

    I want to change the order in the table shortcode; [table_list num=”10″ sort=”rating” big_table=”true”]

    If i, for example, want to add the custom input “Minodds” – and filter the table based on that amount – how do i do this? 🙂

    #1500
    admin
    Keymaster

    First you have to override the entire function “tablelist” from the file sc-table-list.php to your child theme functions.php
    After that find the following:
    ` } elseif($sort == “date”) {
    $query_string[‘orderby’] = “date”;
    $query_string[‘order’] = “ASC”;
    }`

    and change it to:
    ` } elseif($sort == “date”) {
    $query_string[‘orderby’] = “date”;
    $query_string[‘order’] = “ASC”;
    } elseif($sort == “minodds”) {
    $query_string[‘meta_key’] = “your_custom_field_name”;
    $query_string[‘orderby’] = “meta_value_num”;
    $query_string[‘order’] = “DESC”;
    }`

    Don’t forget to change “your_custom_field_name” with your custom field name and after that you can use it as follow:
    `[table_list num=”10″ sort=”minodds” big_table=”true”]`

    #1534
    Christopher Witte
    Participant

    Thanks a lot!

    I just addded my custom fields into the acf-metaboxes.php and now i can use the shortcode to sort them.

    I also tried making a short php script so that i can press a button and display different lists. Do you have a suggestion on how i can do this?

    If i want two buttons that says “Sort Minodds” and “Sort Rating” – that displays these different shortcode objects:

    [table_list num=”10″ sort=”minodds” big_table=”true”]
    [table_list num=”10″ sort=”rating” big_table=”true”]

    Is this possible with a simple code?

    And thanks for the great support so far! 🙂

    #1542
    Christopher Witte
    Participant

    Nevermind the question above! I solved it 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.