Add Custom Post type menu to another menu in specific location

Fixed and here’s how, please excuse the unedited cut and paste, thanks to @mmm for the pointers on how: Add Custom Post Type via Action add_action(‘init’, array($this, ‘mactrak_custom_post_type_add’)); Above function as called (mactrak_custom_post_type_add) includes argument to set up meta box and menu position Following construct: add_action(‘admin_menu’, array(&$this,’mactrak_admin_menu’)); runs following script: add_menu_page( ‘MacTrak – the WP … Read more

Custom post type archive page blank

You have to tell WP that archive.php should apply to your custom post type as well as it’s other defaults. You can use pre_get_posts filter to do this, be sure to research this well before using it as there is a right and wrong way to use this filter. For example, try: function add_custom_post_type_to_archiving( $query … Read more

Customize WooCommerce my account dashboard through plugin

I ended up doing it in what I would consider a sloppy way. On the init hook I check the WooCommerce template against my custom template and if the WooCommerce template does not match my template then I replace the WooCommerce template with my template. add_action( ‘init’, ‘run_inital’ ); function run_inital(){ $wooThemePath = $woocommerce->plugin_path().”/templates/myaccount/dashboard.php”; $myThemeFile … Read more