Support

Account

Home Forums General Issues use a ACF to replace post title in this code Reply To: use a ACF to replace post title in this code

  • @billy_mac – you should be able to replace the line:

    the_title(
    '<h3 class="wpgb-map-marker-title"><a href="' . esc_url( get_the_permalink() ) . '">',
    '</a></h3>'
    );

    with:

    echo '<h3 class="wpgb-map-marker-title"><a href="' . esc_url( get_the_permalink() ) . '">'. get_field( 'FIELDNAMEHERE' ) .'</a></h3>';

    just make sure FIELDNAMEHERE is changed to the field name you setup. Depending on your page template setup, this should work out of the box.

    Otherwise, you may need to configure the get_field() a bit differently (see reference link)

    — the_title() documentation shows a bit of how it formats in correlation with the Post/Page Title, so basically, removing that function and echo-ing it in without the assistance. See Reference