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
Hi Peter, Yes that is what I was looking for. Thanks for your help! ~Kim
Great! π Your welcome!
Best regards,
Peter
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)
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
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
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
it is working. thanks again.
-
This reply was modified 6 years ago by
Kim Dolan.
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