Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

add a custom field next to the read more button

$
0
0

Replies: 0

is it possible to add a custom field next to the read more button inside the post grid?
I was able to place it below and above the button, but not on the same line.
To add the custom field I used the following code:

function single_post_cta_after( $post_id, $attributes ) {
   echo "<div class='my_class'>";
           $value1 = get_field( 'value', $post_id );
echo $value1;
    echo "</div>";
}
add_action( 'uagb_single_post_after_cta_grid', 'single_post_cta_after', 10, 2 );

left button —-> right aligned custom field


Viewing all articles
Browse latest Browse all 59525

Trending Articles