Thrive Themes Description: Create page landing pages for your Wordpress Categories */ //add extra fields to category edit form hook add_action( 'category_edit_form_fields', 'tcp_edit_category_fields' ); add_action( 'category_add_form_fields', 'tcp_add_category_fields' ); add_action( 'edited_category', 'tcp_save_category_landing_page' ); add_action( 'create_category', 'tcp_save_category_landing_page' ); add_filter( 'category_link', 'tcp_category_landing_page_link', 10, 3 ); if ( ! function_exists( "tcp_edit_category_fields" ) ) { /** * add fields to the edit category screen */ function tcp_edit_category_fields( $term ) { $term_id = $term->term_id; $pages = get_pages(); $term_meta = get_option( "taxonomy_$term_id" ); $landing_page_id = empty( $term_meta['landing_redirect'] ) ? 'none' : $term_meta['landing_redirect']; ?>
If set you can replace the Wordpress category page with your own highly optimised landing page
If set you can replace the Wordpress category page with your own highly optimised landing page