Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Remove Archive Title and Replace WP Categories

Home / Forums / Virtue Theme / Remove Archive Title and Replace WP Categories

This topic is: Not Resolved
[Not Resolved]
Posted in: Virtue Theme
July 19, 2019 at 6:54 pm

Hi I want to make pages to reflect locations in the UK. Problem is that many places have same name in different area. So I decided to import the categories with the post code as name to ensure uniquness. Now I want to replace the value with an ACF so I can set it to something more readable… Im 80% there. its just printing the ACF, and not removing the original Archive single cat title?

remove_action( 'kadence_page_title_container', 'virtue_page_title', 20 );

remove_action( 'single_cat_title', 'archive_title', 21 );

add_filter( 'single_cat_title', 'generate_custom_archive_title' );
function generate_custom_archive_title( $text ) {
if ( is_archive() )
echo get_field('customnamecat') ;

}

  • The forum ‘Virtue Theme’ is closed to new topics and replies.