From what I can tell it looks like this is the file I need to edit:
content-single-topic.php
But when I put the following code, nothing show ups on the frontend.
echo ‘Anglers: ‘ .get_field( ‘anglers’ );
echo ‘<br>Catch Date: ‘ .get_field( ‘date’ );
echo ‘<br>Time of Day: ‘ .get_field( ‘time’ );
Is this for sure the file that needs to be edited to show custom fields on the frontend?
If so, anybody have any idea of what code I should use? Again ACH says they do support other plugins so they will not help me out.
I have added the following code into content-single-topic.php and the custom field does not show up in the topic contents on the front end.
<div class=”acf-view acf-view–id–151 acf-view–object-id–{object-id}”>
<!–$anglers$–>
<div class=”acf-view__row acf-view__anglers”>
<div class=”acf-view__label”>Anglers</div>
<div class=”acf-view__field”>$anglers$</div>
</div>
<!–$anglers$–>
</div>
[acf_views view-id=”151″ name=”Anglers”]
[acf_views view-id=”151″ object-id=”ANOTHER_POST_ID” name=”Anglers”]
A. I am getting to a fix to custom fields showing up in frontend on forum topics.
Here is a code that is working to an extent.
<h2>Anglers: <?php the_field(‘anglers’) ; ?></h2>
If I go to content-single-topic.php and I insert in either of these thre places it shows up in the frontend:
<?php else : ?>
<h2><?php the_field(‘anglers’) ; ?></h2>
<?php bbp_topic_tag_list(); ?>
<h2><?php the_field(‘anglers’) ; ?></h2>
<?php bbp_single_topic_description(); ?>
<h2><?php the_field(‘anglers’) ; ?></h2>
<?php if ( bbp_show_lead_topic() ) : ?>
<?php bbp_get_template_part( ‘content’, ‘single-topic-lead’ ); ?>
<?php endif; ?>
If I put the code after <?php bbp_get_template_part( ‘content’, ‘single-topic-lead’ ); ?> it does not show up.
B. After reviewing this code in content-single-topic.php, It appears I need to enter my custom field code in the single-topic-lead’ file. The reason I know this is if I delete
<?php bbp_get_template_part( ‘content’, ‘single-topic-lead’ ); ?>
in content-single-topic.php I ‘break’ the topic post page. However, to verify that I need to enter my custom field code into content-single-topic-lead.php I deleted the file from the server. Much to my surprise the topic content still shows up on the topic page. How can that be. I have cleared cache on my browser, tried different browsers, different computers and get same results. Any ideas?