Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    I think the simplest approach is a find/replace. Something like this:

    add_filter( 'display_posts_shortcode_output', function( $output ) {
    $custom_title = get_post_meta( get_the_ID(), 'cwp_custom_title', true );
    if( ! empty( $custom_title ) ) {
    $output = str_replace( get_the_title() . '</a>', $custom_title . '</a>', $output );
    }
    return $output;
    } );
    Thread Starter jaehunkim

    (@jaehunkim)

    Thanks Bill. The approach looks right but my knowledge of php is fairly limited. I feel like you have already gone above and beyond with the script you wrote above but I still a little help to finish it. Can I ask you finish integrating it with me at whatever your consulting rate is?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Swap title with Advanced Custom Field content’ is closed to new replies.