Reputation
1,659
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
8 11
Impact
~49k people reached

Apr
21
comment Declare global var from Template File and use it in Functions.php
Kevin, could you show the full code for both files that you have tried?
Apr
19
answered Declare global var from Template File and use it in Functions.php
Apr
5
answered Change permalink for default archive - yearly
Apr
5
answered Validate Custom Post Type fields
Apr
5
answered When should I call add_settings_section and add_settings_field?
Apr
5
comment Fatal error: Call to undefined function wp_insert_post()
You don't have to trigger init with do_action, WordPress does that automatically during initialization.
Apr
5
comment Fatal error: Call to undefined function wp_insert_post()
Sorry, but you're going to need to do some reading on actions and filters, the difference between add_action and do_action, core actions vs. custom actions, etc. Also, if you're going to do AJAX with admin-ajax.php, here's the right way to do it: codex.wordpress.org/AJAX_in_Plugins
Apr
4
comment WP_Query posts with comments only
have_posts() and the_post() work on the global $wp_query object. Since you have a new local $query object you should use $query->have_posts() and $query->the_post() instead.
Apr
4
comment How can I make this iterative conditional within the Loop work via function?
Note that a static variable doesn't really extend the scope beyond the function where it's declared, it's still local to the function and you still can't access it outside of that function, but static causes it to not lose its value when execution leaves the scope.
Apr
4
answered How can I make this iterative conditional within the Loop work via function?
Apr
4
comment WP_Query posts with comments only
I think it will work if you remove query_posts. Also, don't put remove_filter into your while loop, put it right at the end of your WP_Query. Finally, if you're going to remove query_posts you should also remove wp_reset_query(), but still use wp_reset_postdata().
Apr
4
answered WP_Query posts with comments only
Apr
4
comment PHP Warning:fread(): SSL: Connection reset by peer in /var/www/html/wp-includes/class-wp-http-streams.php line 269
Did you look through the core dumps?
Apr
4
comment WP Cron being triggered but not working as expected
Yeah, what happens during a cron run is pretty much do_action( 'your_action' ); so if you have not added any callbacks to your action, then nothing's going to run.
Apr
4
answered WP Cron being triggered but not working as expected
Apr
4
comment Fatal error: Call to undefined function wp_insert_post()
I mean add_action( 'init', function() { // form handler });
Apr
4
comment WP Cron being triggered but not working as expected
Could you show a bit more context around your add_action as well as run_execution_script? Also, not a big deal but you should be using wp_remote_get() instead of cURL directly.
Apr
4
comment Using Jetpack to track an Ajax powered blog
If you're using Jetpack Stats then you are on WordPress.com, even if you don't actually have a WordPress.com-hosted site.
Apr
4
comment Using Jetpack to track an Ajax powered blog
j is Jetpack api_version:version, blog is your WordPress.com blog id, tz is the timezone offset. More info here: github.com/Automattic/jetpack/blob/…
Apr
4
answered Using Jetpack to track an Ajax powered blog