Ryan Sechrest
  • Insights
  • Solutions
  • Ghost
  • WordPress
  • Games
  • Parenting
Sign in Subscribe

WordPress

Accomplishments related to WordPress.
Little short stacks of coins.
Solutions

WordPress taxonomy terms don’t insert when cron job executes wp_insert_post()

I have a PHP script that connects to a third-party application, retrieves data, and then inserts it into WordPress using wp_insert_post(). The data also has a custom taxonomy associated with it, which is being passed into the wp_insert_post() function via the $args array. Lastly, the script
Jul 5, 2012 2 min read
Two identical cars, but one in terrible condition, and the other in great condition.
Solutions

WordPress get_post_type() doesn’t work when restoring a trashed post via undo

I have a custom post type that uses the following hook: add_action( 'untrash_post', array($this, 'custom_restore_function') ); And the custom function looks as follows: function custom_restore_function() { if(get_post_type() == 'custom_post_type') { $this->set_custom_post_type_display_status(1); } } I have a very
May 24, 2012 1 min read
Various types of fishing hooks.
Insights

WordPress hooks for saving, trashing, restoring, and deleting custom fields in a custom post type

This took me quite a while to figure out, but I finally determined what the proper hooks for managing custom fields in a custom post type in WordPress are. In my scenario, I have a custom post type that uses the add_meta_box() function to add a few custom
May 8, 2012 2 min read
← Newer Posts Page 2 of 2
Ryan Sechrest © 2023
  • About
  • Contact
  • Login
  • Sign Up
  • Hosted w/ DigitalOcean
Powered by Ghost