Forum Replies Created

  • Hey @jolora

    This thread is a bit old but I thought I’d jump in. I’m using the Easy Footnotes plugin and was having the same problem you were having with Civil Footnotes. Your solution works (thank you!), but there’s a wrinkle…I’ve got multiple ACF WYSIWYG fields on my pages, and the footnotes are being output at the bottom of each one of them. So I’m seeing lots of repeating and redundant footnotes throughout the page content. What I need is to output the footnotes just once at the very bottom of the page, below all the content. Any ideas? Thanks in advance.

  • ACF email support says:

    “The feature exists. If you write any HTML in the Text or TextArea field, it renders as HTML in the frontend.”

    Ah, yes…it does. It appears that this feature is now baked in rather than being a selectable option.

  • <?php 
    if ( !function_exists( 'get_inherited_field' ) ) {
        function get_inherited_field( $field ) {
            $value = get_field( $field );
            if ( !$value ) 
                $value = get_field( $field, wp_get_post_parent_id( get_the_ID() ) );
            return $value;
        function the_inherited_field( $field ) {
            echo get_inherited_field( $field );
        function has_inherited_sub_field( $field ) {
            return ( has_sub_field( $field ) or has_sub_field( $field, wp_get_post_parent_id( get_the_ID() ) ) );
        function the_inherited_sub_field( $field ) {
            $value = get_sub_field( $field );
            if ( !$value ) 
                $value = get_sub_field( $field, wp_get_post_parent_id( get_the_ID() ) );
            echo $value;
    <?php the_inherited_field('field-name'); ?>
    <?php while(has_inherited_sub_field('repeater-field-name')): ?>
        <?php the_inherited_sub_field('repeater-field-name'); ?>
    <?php endwhile; ?>
  • @edering

    Yes, it sounds to me like the Repeater Field add-on is just what you need. I’ve used it many times for jobs similar to what you describe.

    Have you watched the Repeater Field video?

    That should demonstrate the Repeater Field sufficiently for you to make an educated decision.

    Good luck!

  • Ah hah! That did it. Thanks so much Elliot.

  • Thanks Elliot. Maybe a feature for the future?

    Sure, a WYSIWYG field would work…though it’s a bit heavy-handed just to insert an image. You mention I might need to add another field to allow for custom size selection. Any chance you can steer me in the right direction for how to do that?

    Thanks as always for your amazing work and awesome support.

  • That did it!

    I guess I should have been clearer from the start, but I thought my initial approach was totally off base so I didn’t even mention it.

    Thanks so much Jonathan! I really really appreciate it.

  • Ok cool, I’m glad I’m making sense!

    I’m using an acf select field, configured like this:

    Field Name: q_and_a_category_select
    Field Type: Select

    design : Design
    engineering : Engineering
    project-management : Project Management

    To fill you in on the history, originally I had three separate page templates, each displaying posts from a specific term. For example, I used this for the Design page:

    <?php $args=array(
    	'post_type' => 'q-and-a',
    	'q_and_a_category' => 'design' //the slug for the custom taxonomy term
    	$my_query = null;
    	$my_query = new WP_Query($args);
    	if( $my_query->have_posts() ) {
    		while ($my_query->have_posts()) : $my_query->the_post(); ?>
    		<?php the_title(); ?>
    	<?php endwhile; }?>
    <?php wp_reset_query(); ?>

    This works great to show just the q-and-a custom posts assigned the term “design”, but I didn’t want to have separate templates for each one.

    So the first thing I tried was this:

    ‘q_and_a_category’ => ‘<?php the_field(“q_and_a_category_select”); ?>’

    I figured it would simply just plug in the proper term and I’d be good to go. But it didn’t work and I’m not skilled enough in php to know why not.

    So I did some searching and found this acf tutorial:

    Seems like example 3 should do it, but no luck.

    Thanks again!

  • @jonathan Thanks for the detailed response! I do know about WP’s built-in archive functionality, so I should have mentioned that I want my client to be able to edit content on these pages. That’s why I’m taking the page template approach.

    I also should have been clearer in my description above, and said that my custom field is also named “q_and_a_category”. Hence this:

    ‘key’ => ‘q_and_a_category’

    For clarity (and to avoid any potential conflicts) I have changed the custom field name to “q_and_a_category_select”.

    I tried following your advice of changing meta-query to tax-query, and applying what I read here:

    I couldn’t get that to display any posts either, and it seems like it would also remove the acf functionality that I’m looking for in the first place…specifically, the ability for my client to manually select which category of post is being displayed on the page.

    Sorry if I’m not understanding you and/or not being clear myself. Looking forward to any additional thoughts, thanks!

Viewing 10 posts - 1 through 10 (of 10 total)