How to add a button to custom post type’s posts-page

You can add button via add_meta_box function. function add_your_meta_box(){ add_meta_box(‘your-metabox-id’, ‘Title’, ‘function_of_metabox’, ‘custom_post_type’, ‘side’, ‘high’);} add_action(‘add_meta_boxes’, ‘add_your_meta_box’); function function_of_metabox() {?> <input type=”submit” class=”button button-primary button-large” value=”Add New” id=”add-new”/> <?php } if you add to multiple post type, you should use foreach loop. function add_your_meta_box(){ $types = array(“post”,”page”,”custom_post_type”); foreach($types as $type){ add_meta_box(‘your-metabox-id’, ‘Title’, ‘function_of_metabox’, $type, ‘side’, … Read more

Where do I start from

Glad your taking the jump into wordpress, wordpress is an amazing platform for developers and non-developers alike, if you have knowledge of PHP, HTML, CSS (and jQuery in some instances) you will enjoy working with wordpress. A great place to start understanding wordpress would of-course be the wordpress website itself. http://codex.wordpress.org/Main_Page I hope this helps, … Read more

Nav Menu meta failing to import

The problem was ultimately with the WordPress Importer plugin. I could hack at it (and have suggested an improvement to the developers) but I am going to got around this by writing a custom Importer of my own. It isn’t the most convenient (to re-upload the .XML file) but in cases where users have complex … Read more

How to make dynamically-generated content searchable in WordPress?

The wp_posts table has a post_content_filtered column that plugins can use to cache expensive post content filters. The idea is that when you display the page, you don’t read post_content but you read post_content_filtered. This is nice, but it won’t solve your search problem because WordPress by default only looks at post_content and post_title. You … Read more

custom XMLRPC method plus authentication of user & WooCommerce order

I sent it to you on Twitter, but here it is again. I made this little class to help me do XML-RPC faster. abstract class MZAXMLRPC { protected $calls = Array(); protected $namespace = “myxmlrpc”; function __construct($namespace){ $this->namespace = $namespace; $reflector = new ReflectionClass($this); foreach ( $reflector->getMethods(ReflectionMethod::IS_PUBLIC) as $method){ if ($method->isUserDefined() && $method->getDeclaringClass()->name != get_class()){ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)