Advanced Custom Fields not showing on blog page / do show in Essential Grid

Hi,

Created a new custom field with ACF plugin for authors’ names as we have many and they don’t have user profiles.
Custom field shows in Essential Grid but not on blog page. Must be missing some function?
Help appreciated.

Hi Isabelle,

The Post Meta option was disabled in X > Theme Options > Blog > Content. I enabled that and now the blog meta content including the author shows:

Thank you.

Hi,

Thanks for the reply.
For clarification, I am the only one updating/editing/posting on the site but we would like articles real authors names to show. hence why I tried to create new meta/custom field for that purpose.

We do not want the default meta to show " In Featured Destinations, In This Issue, by adminMay 22, 2020".
Screenshot_2020-06-07 Whistler Traveller Dev
But rather the additional meta “article_author” as shown in Essential Grid.
Screenshot_2020-06-07 Whistler Traveller Dev(1)

I am definitely missing something here.
Did I only create the new meta in Essential Grid and not WordPress?
:confused:

Hello Isabelle,

Even without ACF, you can display the Author Name or even assign the post to real author names. Please go to Users > All Users or Users > Add New if you only have one username. You must create several usernames with limited roles. In each of the user Profile, you will have to insert real names as shown below:

And then edit the user profile and make sure that it displays the real name and not the username:
uUkfluaiRQqhRwZxeNhjKA

Go back to your Posts and edit the respective posts. You will have to assign them to the newly created author name:

or in Post Editing Screen:

And when you view the post, the real author name will display in the post meta:
0_de9oOqSLS_fORc4AWH8Q

This will also be the display in Essential Grid:

Note: The display format of the real name in the grid depends on how it is added in the grid skin.

We would love to know if this has worked for you. Thank you.

Thanks for the reply.
I had tried this method but it didn’t accept my email (already in use) and not sure if I can use bogus emails. Don’t really want any author to have access to the site as they just send us the articles and we post them.
On top of that, the byline sometimes has to include the photographer. The meta created for Essential Grid is great because I can edit it individually on each post, By So and So / Images by So and So.

Hello Isabelle,

To better assist you with your issue, kindly provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WordPress Admin username / password

To know how to create a secure note, please check this out: https://theme.co/docs/getting-support

Cheers.

See below.
Thank you.

Hi Isabelle,

Thank you for providing the login information. I checked the website and I see that you used the Featured Summer gird. When I checked the details I saw that you already selected the meta key in question in the Skin Editor:

So you manually chose the additional meta key that was added using ACF.

The matter of fact is that the blog archive of the theme does not have such a section to choose which meta to show. This is an additional met key that you need to explicitly add to the front end code to be able to show.

ACF plugin does not have a way to show the fields on the front end and you need to use the get_field function in the PHP files of your theme to show the key.

The Essential grid already gives an option to show the field so you do not need to add any code.

Please consider that this is a customization request and outside of our support scope. You need to hire a developer to add the field.

To add the field you will need to install the Child Theme and override the blog archive file in the Child Theme and add the proper ACF code.

You can learn more about overriding the theme files by checking the best practices article, and you can learn more about showing a field using ACF reading the_field article.

As an extra help you will need to add the function below to functions.php file of your Child Theme:

if ( ! function_exists( 'x_ethos_entry_meta' ) ) :
  function x_ethos_entry_meta() {

    //
    // Author.
    //

    $author = sprintf( __( 'by %s', '__x__' ), get_the_author() ) . '</span>';


    //
    // Date.
    //

    $date = sprintf( '<span><time class="entry-date" datetime="%1$s">%2$s</time></span>',
      esc_attr( get_the_date( 'c' ) ),
      esc_html( get_the_date() )
    );


    //
    // Categories.
    //

    if ( get_post_type() == 'x-portfolio' ) {
      if ( has_term( '', 'portfolio-category', NULL ) ) {
        $categories        = get_the_terms( get_the_ID(), 'portfolio-category' );
        $separator         = ', ';
        $categories_output = '';
        foreach ( $categories as $category ) {
          $categories_output .= '<a href="'
                              . get_term_link( $category->slug, 'portfolio-category' )
                              . '" title="'
                              . esc_attr( sprintf( __( "View all posts in: &ldquo;%s&rdquo;", '__x__' ), $category->name ) )
                              . '"> '
                              . $category->name
                              . '</a>'
                              . $separator;
        }

        $categories_list = sprintf( '<span>%1$s %2$s',
          __( 'In', '__x__' ),
          trim( $categories_output, $separator )
        );
      } else {
        $categories_list = '';
      }
    } else {
      $categories        = get_the_category();
      $separator         = ', ';
      $categories_output = '';
      foreach ( $categories as $category ) {
        $categories_output .= '<a href="'
                            . get_category_link( $category->term_id )
                            . '" title="'
                            . esc_attr( sprintf( __( "View all posts in: &ldquo;%s&rdquo;", '__x__' ), $category->name ) )
                            . '"> '
                            . $category->name
                            . '</a>'
                            . $separator;
      }

      $categories_list = sprintf( '<span>%1$s %2$s',
        __( 'In', '__x__' ),
        trim( $categories_output, $separator )
      );
    }


    //
    // Comments link.
    //

    if ( comments_open() ) {

      $title  = apply_filters( 'x_entry_meta_comments_title', get_the_title() );
      $link   = apply_filters( 'x_entry_meta_comments_link', get_comments_link() );
      $number = apply_filters( 'x_entry_meta_comments_number', get_comments_number() );

      $text = ( 0 == $number ) ? __( 'Leave a Comment', '__x__' ) : sprintf( _n( '%s Comment', '%s Comments', $number, '__x__' ), $number );

      $comments = sprintf( '<span><a href="%1$s" title="%2$s" class="meta-comments">%3$s</a></span>',
        esc_url( $link ),
        esc_attr( sprintf( __( 'Leave a comment on: &ldquo;%s&rdquo;', '__x__' ), $title ) ),
        $text
      );

    } else {

      $comments = '';

    }


    //
    // Output.
    //

    if ( x_does_not_need_entry_meta() ) {
      return;
    } else {
      printf( '<p class="p-meta">%1$s %2$s%3$s%4$s</p>',
        $categories_list,
        $author,
        $date,
        $comments
      );
    }

  }
endif;

You will need to replace get_the_author() with the field that you want to show from ACF. There might be bounce when it comes to retrieving data from ACF when the code is in the blog archive page.

Please kindly consider that we will not be able to give more support for the customization. If you are interested in continued support and ask questions about the customization you can consider using the One service.

Thank you for your understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.