[Resolved] ACF & Elements Hook

Home Forums Support [Resolved] ACF & Elements Hook

Home Forums Support ACF & Elements Hook

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1494189
    jon

    Hi Tom + Crew

    Ive created ACF titled ‘Onlyfans’, displayed via a hook, I’d like to display the Post Title combined with the button title i.e Post Title + OnlyFans = Haydies OnlyFans, can you advise?

    <?php 
    $link = get_field('onlyfans');
    if( $link ): ?>
        <a class="button" href="<?php echo esc_url( $link ); ?>">Post-Title Here Onlyfans</a>
    <?php endif; ?>

    Thanks

    #1494202
    David
    Staff
    Customer Support

    Hi there,

    you can include the <?php the_title(); ?> in your button text.

    #1494213
    jon

    Perfect 👍

    #1494217
    David
    Staff
    Customer Support

    You’re welcome

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.