0

add_filter( 'the_title', function( $title, $post_id ) {
    if ( is_product() && get_post_type( $post_id ) === 'product' ) {
  $seo_keyword = get_field( 'seo_keyword', $post_id );
  if ( $seo_keyword ) {
   $title .= ' <span class="seo-keyword">' . esc_html( $seo_keyword ) . '</span>';
  }
    }
    return $title;
}, 999, 2 );

Jagdish Sarma Asked question 1 minute ago
Add a Comment