i want to have a placeholder that reflects the user website. This is a standard field in user registration. It seems all user items have prebuilt placeholders…except website!
Is there an alternative to be able to use the user chosen website being used in filtering my table?
Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
-
You are correct. In our pre-built dynamic Placeholder selection,
for the "current user" , we have things such as User ID, User Email, first name, last name, etc,
but we don't have one for the "user's website" yet.
It is a good idea for a future addition in my opinion, though, so if you can be so kind, please add this as a suggestion and our developers will do their best to add it soon.
to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there, and as more people vote, the feature will move higher on the priority list.
You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;
and our newsletter, so you're informed about new features, bug fixes, freebies, etc.
-
At this time, i can offer a custom workaround using an SQL Query based table.
I made a test example.
Let's say if we have a table like this in the Database,
i made a new Manual Table and added a String column that will store all the website rows.
I manually add one row for my current user's chosen website, and i add more random sites in other rows.
This is how the default table data looks, without filtering :
I highlighted my user's website, and i can see it in his profile
Now, we make a new SQL Table which will pull data from this Manual table,
but we will add a JOIN function to merge data from this Manual table with the WP users table ( wp_users) and at the "ON" statement we will show only rows that match
this table's "website" column with the WP users table website column ( in wp_users table the column name is "user_url").
SELECT wp_wpdatatable_71.`wdt_ID`,
wp_wpdatatable_71.`website`,
wp_wpdatatable_71.`userid`,
wp_wpdatatable_71.`sampledata`
FROM wp_wpdatatable_71
JOIN wp_users
ON wp_users.`user_url` = wp_wpdatatable_71.`website`
As you see, it works on my Test table, so if you create the correct SQL Query it should work for you, as well.
And just an additional note, when we need to check for the Manual Table's MySQL name,
it is in the Editing Tab :
So, in my example, this table name is wp_wpdatatable_71 , but in your use-case, of course, you will check your SQL table name,
i want to have a placeholder that reflects the user website. This is a standard field in user registration. It seems all user items have prebuilt placeholders…except website!
Is there an alternative to be able to use the user chosen website being used in filtering my table?
Hi, Joop
Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
-
You are correct. In our pre-built dynamic Placeholder selection,
for the "current user" , we have things such as User ID, User Email, first name, last name, etc,
but we don't have one for the "user's website" yet.
It is a good idea for a future addition in my opinion, though, so if you can be so kind, please add this as a suggestion and our developers will do their best to add it soon.
Please feel free to search on our suggestions page,
to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there, and as more people vote, the feature will move higher on the priority list.
You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;
and our newsletter, so you're informed about new features, bug fixes, freebies, etc.
-
At this time, i can offer a custom workaround using an SQL Query based table.
I made a test example.
Let's say if we have a table like this in the Database,
i made a new Manual Table and added a String column that will store all the website rows.
I manually add one row for my current user's chosen website, and i add more random sites in other rows.
This is how the default table data looks, without filtering :
I highlighted my user's website, and i can see it in his profile
Now, we make a new SQL Table which will pull data from this Manual table,
but we will add a JOIN function to merge data from this Manual table with the WP users table ( wp_users) and at the "ON" statement we will show only rows that match
this table's "website" column with the WP users table website column ( in wp_users table the column name is "user_url").
As you see, it works on my Test table, so if you create the correct SQL Query it should work for you, as well.
And just an additional note, when we need to check for the Manual Table's MySQL name,
it is in the Editing Tab :
So, in my example, this table name is wp_wpdatatable_71 , but in your use-case, of course, you will check your SQL table name,
then you can create your version of this Query.
Let me know if that works for your use-case.
Thank you
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables