I am trying to add a an acf field called “name” while also adding a css-class to it
the_field('name')
to this code
if ($go_magazine_options['post_meta_author'] === 'enable' && in_the_loop()) {
echo '<span class="client">' . get_the_field('name') .
'<span class="entry-meta-author author vcard"><i class="fa fa-user"></i><a class="fn" href="' .
esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' .
esc_html(get_the_author()) . '</a></span>' . "n";
}
but something is not working?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Little Aprilia learns to code 😉
was a silly idea to mix two things, justed added the ACF-Field, using its own if-rule
if( get_field('apri') ): ?>
<span class= "promo"><?php the_field('apri'); ?></span>
<?php endif;
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0