Reputation
46,527
Next tag badge:
98/100 score
66/20 answers
Badges
2 29 54
Newest
 Good Answer
Impact
~1.6m people reached

14h
comment Passing jQuery value using Ajax to a page template
you can't load template files directly, WordPress is not loaded in that context.
14h
comment Where is Number of Posts Set?
it appears the query is generated somewhere before that template file is loaded.
1d
answered Adding extra pages to plugin that shouldn't appear in the sidebar
1d
answered How to use shortcode in js url
1d
comment Show custom post type inside a custom post type
A quick solution is the Posts 2 Posts plugin.
2d
comment Ignoring initial articles (like 'a', 'an' or 'the') when sorting queries?
you wouldn't use any of that code, you can query and sort on post meta with meta query parameters.
2d
comment Ignoring initial articles (like 'a', 'an' or 'the') when sorting queries?
an alternate solution could be to store the title you want to sort by as post meta data and order on that field instead of title.
2d
comment Custom post with more than one custom taxonomy
I'm not sure I understand your issue. Your code appears to get terms from a post in the main query, then query for other floorplans with terms that match that post? As far as the all floorplans term is concerned, don't add a tax query if you want all of the floorplans returned.
2d
comment Creating a custom post type upon registration
There's a user_register action and wp_insert_post. If you search around those two things you can probably cobble some code together to get you started.
2d
comment How to enqueue JavaScripts in a plugin
Possible duplicate of This doesnt work for Plugin get_template_directory_uri()
2d
comment Entire site breaks when error in a php file because of multiple get_template_part in functions.php
"good practices" would be to not develop on a live site where this would be an issue, create a mirror to test new code.
2d
comment wp_reset_postdata() and wp_reset_query() inside shortcode are not working to reset original page query
When you get the "not found" result, are you sure the main query is intact before the Shortcode renders? var_dump($wp_query) on those requests and look at what it contains.
2d
comment This doesnt work for Plugin get_template_directory_uri()
The function has nothing to do with which type of file you are adding, it returns a URL, that is all. Edit your question with the code you are using, code in comments is unreadable. admin_enqueue_scripts hook is for adding scripts to admin screens, which screen are you trying to use your script on?
Feb
6
comment Meta Query with date and time on the same Day before given time
you can add an answer with your working code and accept it!
Feb
5
comment wp_reset_postdata() and wp_reset_query() inside shortcode are not working to reset original page query
Shortcodes must return content, not echo. wp_reset_postdata restores the global $post, wp_reset_query restores the global $wp_query. get_posts alters neither of those vars on its own, your problem is elsewhere.
Feb
5
comment Meta Query with date and time on the same Day before given time
You can use DATETIME or TIME types instead.
Feb
5
comment Meta Query with date and time on the same Day before given time
if it's being cast as date, the time is being stripped and should be irrelevant.
Feb
5
comment Meta Query with date and time on the same Day before given time
Append the time to the current date manually, like date( 'Y-m-d' ) . ' 00:00:00'
Feb
5
comment This doesnt work for Plugin get_template_directory_uri()
you would use it any time you need the URI of your plugin's directory- for js files, css files, images, etc..
Feb
5
answered This doesnt work for Plugin get_template_directory_uri()