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

Reply To: ACF shortcode in topic post frontend

$
0
0

I found a code that works when inserted into …/wp-content/plugins/bbpress/templates/default/bbpress

<h6>Date: <?php the_field( ‘date’ ) ; ?></h6>
<h6>Fish Caught: <?php the_field( ‘fish_caught’ ) ; ?></h6>
<h6>Speed: <?php the_field( ‘speed’ ) ; ?></h6>

But it only displays if put in certain areas. Here is the closet area it displays to the topic content.

<?php bbp_single_topic_description(); ?>
<h6>Date: <?php the_field( ‘date’ ) ; ?></h6>
<h6>Fish Caught: <?php the_field( ‘fish_caught’ ) ; ?></h6>
<h6>Speed: <?php the_field( ‘speed’ ) ; ?></h6>
<h6>Water Features: <?php the_field( ‘water_features’ ) ; ?></h6>
<h6>Lure & Color: <?php the_field( ‘lure_color’ ) ; ?></h6>

<?php if ( bbp_show_lead_topic() ) : ?>

<?php bbp_get_template_part( ‘content’, ‘single-topic-lead’ ); ?>

I have tried putting it below either of these items and it will not dislay in the frontend.

<?php if ( bbp_show_lead_topic() ) : ?>

<?php bbp_get_template_part( ‘content’, ‘single-topic-lead’ ); ?

From what I can tell the code actually needs to be inserted in the single-topic-lead. I have tired inserting it everywhere within the single-topic-lead.php page but no matter where I put it, it does not show up. Here is where I think it needs to go:

<?php bbp_topic_author_link( array( ‘show_role’ => true ) ); ?>

<?php if ( current_user_can( ‘moderate’, bbp_get_reply_id() ) ) : ?>

<?php do_action( ‘bbp_theme_before_topic_author_admin_details’ ); ?>

<div class=”bbp-topic-ip”><?php bbp_author_ip( bbp_get_topic_id() ); ?></div>

<?php do_action( ‘bbp_theme_after_topic_author_admin_details’ ); ?>

<?php endif; ?>

<?php do_action( ‘bbp_theme_after_topic_author_details’ ); ?>

</div><!– .bbp-topic-author –>

<div class=”bbp-topic-content”>

<?php do_action( ‘bbp_theme_before_topic_content’ ); ?>

<?php bbp_topic_content(); ?>
<h6>Date: <?php the_field( ‘date’ ) ; ?></h6>
<h6>Fish Caught: <?php the_field( ‘fish_caught’ ) ; ?></h6>
<h6>Speed: <?php the_field( ‘speed’ ) ; ?></h6>
<h6>Water Features: <?php the_field( ‘water_features’ ) ; ?></h6>
<h6>Lure & Color: <?php the_field( ‘lure_color’ ) ; ?></h6>
<?php do_action( ‘bbp_theme_after_topic_content’ ); ?>
</div><!– .bbp-topic-content –>
</div><!– #post-<?php bbp_topic_id(); ?> –>

NOTE: What is strange is that if I delete the content-single-topic-lead.php file to make sure the page is not cached, it does not break the topic post which makes no sense to me.

Here is the actual topics page:https://thedoverfamily.com/gfwc/forums/topic/last-try/


Viewing all articles
Browse latest Browse all 3646

Trending Articles