Tag Info

New answers tagged


At the end of your code after the last } add : add_action('init,'products_post_type'); Make sure you're adding this to the file in the /wp-content/your_custom_theme/includes/theme-init.php file, and then of course update the permalink. With the CherryFramework, make sure you don't modify any of the files in the CherryFramework folder, or you'll lose out ...


Try adding: add_action( 'init', 'products_post_type' ); As you can see in the Codex example for register_post_type() you must add your function to the init hook, so that it is actually run. Otherwise, what you have, is a function that is defined, but never executed. If you did this with a default theme, then you were adding the function to an action ...

Top 50 recent answers are included