• Resolved Kim Dolan

    (@splitbusgirl)


    After logging in I need to sort the page

    https://www.richer.ca/documents-standalone/

    the links go to to a table. I need to show only the category “standalone”
    Is there a way to do this?

    This is the shortcode I am using.

    [wpdataaccess table=”wp_csv_data” access=”public” columns=”title,Category,tags”]

    Thanks

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Kim,

    Welcome!

    You can filter on column category, but you’ll need to create a publication. There is a tutorial on the plugin website which demonstrates how:
    https://wpdataaccess.com/docs/documentation/data-publisher/how-to-setup-and-use-the-data-publisher/

    You’ll still need the shortcode, but it will look like this:
    [wpdataaccess pub_id="10"]
    where pub_id = id of your publication

    The Data Publisher gives you more control than using the shortcode directly. It offers much more features. There is a column WHERE Clause. This is where you can filter your rows. Just add:
    category = "standalone"
    where category = column name on which you want to filter

    Is this what you are looking for?

    Best regards,
    Peter

    Thread Starter Kim Dolan

    (@splitbusgirl)

    Hi Peter, Yes that is what I was looking for. Thanks for your help! ~Kim

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Great! πŸ™‚ Your welcome!

    Best regards,
    Peter

    Thread Starter Kim Dolan

    (@splitbusgirl)

    Hi Peter, I have one more question. category =”standalone” workes if category has only “standalone” but some items will fall into more than one category. The filter only seems to work if there is only one category. Can I show items that fall into more than one? thanks :0)

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Kim,

    How are multiple categories stored? What is the data type of your column? Can you give some examples of the column content for a column that multiple categories?

    Thanks,
    Peter

    Thread Starter Kim Dolan

    (@splitbusgirl)

    I got some help and solved it like this

    [wpdataaccess table=”wp_csv_data” access=”public” columns=”title,category,tags” sql_where=” category like ‘%enrichments%'”]

    BUT I also want to sort the by 2 columns and I don’t know what to do

    2 columns of “tags” and “categories”. They want to show data where the tag is “current” and the category column is “enrichments”

    Can I do this?

    Thanks
    Kim

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Kim.

    You can do this! Just add the second column to your where clause:
    category like '%enrichments%' and tags like '%current%'

    Hope that helps! πŸ™‚

    Best regards,
    Peter

    Thread Starter Kim Dolan

    (@splitbusgirl)

    it is working. thanks again.

    • This reply was modified 6 years ago by Kim Dolan.
    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Great! πŸ™‚

    You are using shortcode wpdataaccess with old parameters. The new way is to use the Data Publisher to generate arguments in the background. It might be worth having a look at the Data Publisher. It offers much more features and flexibility…

    Have a nice weekend! πŸ˜‰

    Best regards,
    Peter

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘search column’ is closed to new replies.