• Resolved willythewhale

    (@willythewhale)


    I have a huge list of entries within a pod (1,000+) and have a page listing them all. When I display the pod with a template, I limit it to 100 and have pagination on. However, I have buttons for each letter of the alphabet and am trying to have it so that when a letter is clicked, only entries that start with that letter are shown. I have trued using a hide function with JavaScript since I have a field for the first letter, but by hiding each letter individually, the page would take ~15 seconds to load.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    You could filter your query with a LIKE operator: https://www.w3schools.com/sql/sql_like.asp
    However, this gets more complicated very fast.

    Example:
    [pods name="posts" limit="100" where="post_title LIKE 'a%' OR post_title LIKE 'A%'"].
    This will fetch posts starting with a or A.

    Cheers, Jory

    Thread Starter willythewhale

    (@willythewhale)

    I wouldn’t be able to send new information into the pods tags once the content is loaded, correct? So I could have a variable, chosenLetter, each button would only show those posts

    [pods name="posts" limit="100" where="post_title LIKE 'chosenLetter%'"]

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @willythewhale

    Correct, otherwise you’ll have to use JavaScript (or even in combination with AJAX).

    Cheers, Jory

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hiding and showing Pods’ is closed to new replies.