Quantcast
Channel: bbPress.org » All Posts
Viewing all articles
Browse latest Browse all 3646

Reply To: ACF shortcode in topic post frontend

$
0
0

just got 10 minutes to look at this.

try this

add_action ('bbp_theme_after_reply_content' , 'rew_display_acf') ;

function rew_display_acf () {
	$id = bbp_get_reply_id() ;
	//if it is the topic...
	if (bbp_is_topic( $id ) {
		echo '<br>Lake Marker 2: ' .get_field( 'lake_marker_point_2' ) ;
	}
}

or

add_action ('bbp_theme_after_reply_content' , 'rew_display_acf') ;

function rew_display_acf () {
	$id = bbp_get_reply_id() ;
	//if it is the topic...
	if (bbp_is_topic( $id ) {
		echo '<br>Lake Marker 2: ' .get_field( 'lake_marker_point_2', $id ) ;
	}
}

Put this in your child theme’s function file –

ie wp-content/themes/%your-theme-name%/functions.php

where %your-theme-name% is the name of your theme

or use

Code Snippets


Viewing all articles
Browse latest Browse all 3646

Trending Articles