Creating Job Tickets

Yes, it’s possible. WordPress uses a relational database and you’re free to add tables to it. As a warning – you will need to create new functions/classes to work with your new tables. WordPress’ built in functions will probably not work with new tables. As a side note, new content types such as reports and … Read more

add an image field to wordpress category

I had some trouble saving custom taxonomy fields, which I resolved in this WPSE post. I was using the options table to save my data, but the same solutions may apply for you too. Firing callbacks attached to create_{taxonomy} and edited_{taxonomy} were part of the solution.

Adding a filter to wp_edit_posts_query() to prevent hierarchical display of pages

I don’t think it can be done that way, in class-wp-posts-list-table.php I found this line $this->hierarchical_display = ( $post_type_object->hierarchical && ‘menu_order title’ == $wp_query->query[‘orderby’] ); It’s not filtered and it directly depends on the unfilterable attribute “is hierarchical” and the post order set in the admin interface (edit.php). What you can do is to try … Read more

How can i maintain permalink structure and avoid a 404 error when loading external content?

You could use a WordPress rewrite (as opposed to mod-rewrite) to solve the issue. function createRewriteRules( $rules ){ $newrules = null; $newrules = array(); $newrules[“catalog/?$”] = “index.php?page=xx”; $rules = $newrules + $rules; return $rules; } add_action(‘rewrite_rules_array’, ‘createRewriteRules’); You’ll need to flush the rules: http://codex.wordpress.org/Function_Reference/flush_rewrite_rules Your page-catalog.php file could then sniff the original url and do … Read more

How to create metabox that can be queried in the database?

As Kaiser suggested, the Metabox script available over at http://www.deluxeblogtips.com/2011/03/meta-box-script-update-v30.html propagates metadata to the database as individual entries instead of a serialized array. I suppose it is ultimately a matter of preference between how you want your data to be stored in the database. I have appreciated using Dimas’WP Alchemy plugin up until now, but … Read more

Trying to edit a WP site locally using MAMP

Try adding this to your wp-config.php file: define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’]); define(‘WP_HOME’, ‘http://’ . $_SERVER[‘HTTP_HOST’]); That will define your site URL as whatever happens to be in the browser location bar. Very useful for moving a site from server to server without actually changing the siteurl and home location in the database. Just don’t leave … Read more