239 reputation
112
bio website SudarMuthu.com
location Bangalore, India
age 32
visits member for 2 years, 4 months
seen 3 hours ago

I am a developer from Bangalore, India, mostly interested in WordPress, Android and Arduino programming. I write about my projects at my blog. You can also checkout my code that I have released as open source in my github account. You can follow me on twitter.


Apr
2
comment query_post by title?
This should be accepted answer since this shows how to do it using WordPress built-in functions and not using custom SQL query.
Feb
20
comment Find terms in a custom taxonomy based on the hirearchy
I used your code as a base and replaced get_term_by with get_terms with parent parameter and little bit of tweak and was finally able to do it. Thanks.
Feb
17
comment Find terms in a custom taxonomy based on the hirearchy
Unfortunately I can't change to use slugs. I am trying to see if I can adapt your solution to use names instead of slugs. Meanwhile if you have any solution for it then that would be very useful. Thanks.
Feb
16
comment Find terms in a custom taxonomy based on the hirearchy
Thanks for the answer. The one problem I have with this code is that the path contains slugs, but in my case it contains names. Since names can have duplicates get_term_by will not work properly :(
Feb
16
comment Find terms in a custom taxonomy based on the hirearchy
@PieterGoosen get_term_children can only tell me if a particular term has children, but in my case I need to search for the complete path. I am not sure if I completely understand your suggestion.
Feb
16
comment my wp schedule event is not working
Personally I use error_log function to log diagnostic messages from my cron job.
Sep
2
comment How to retrieve the date on which a post was moved to trash?
Thanks. Didn't know about this meta field.
Sep
2
comment How to retrieve the date on which a post was moved to trash?
@TheDeadMedic I have not tried the code yet, but when I look in the admin UI the Last Modified date is not updated when a post is trashed.
Sep
2
comment How to retrieve the date on which a post was moved to trash?
That will allow me to retrieve posts based on created date or modified date. But how to use trashed date with date_query?
Aug
25
comment Is it possible to query all posts that don't have an attachment?
@birgire Thanks and I have marked this as the answer. I like the 2nd and 3rd approach.
Aug
25
comment Is it possible to query all posts that don't have an attachment?
I like the fact that you are using distinct in the sub query.
Aug
25
comment Is it possible to query all posts that don't have an attachment?
Thanks. I generally try to use WP_Query instead of writing my own SQL statements as it is the recommended way. But I guess this is a complex enough scenario to go the SQL statement route.
Apr
9
comment Is it possible to change the path of a css file that is registered through wp_enqueue_style()?
Thanks. That's exactly what I was looking for.
Apr
9
comment Send email daily from WordPress site
Updated my answer.
Mar
30
comment Is it possible to run plugin code when a multisite blog is deleted?
I guess this should be the accepted answer since this is the cleaner way to do it.
Mar
24
comment Use wpdb->prepare for `order by` column name
The white-list approach is a good solution and thanks for that. The query I have in the question is just a sample. The one I am using in my code is really complex and went through the documentation of WP_Query and figured out there is no way to do what I want without a custom query.
Sep
25
comment uninstall.php file in Plugin to clean DB
That clears it. Thanks.
Jun
12
comment uninstall.php file in Plugin to clean DB
Thanks for the link. But I am still not able to get a definite answer to my question. I guess WordPress invokes the Plugin file even when if it is de-activated, before executing the uninstall hook.
May
14
comment Add screen options to custom admin pages
Thanks for the code and the link. Modifying my Plugin to incorporate this now.
Mar
28
comment What is the difference between “create_users” and “add_users” capabilities?
This explains it. Thanks for digging it up.