Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1143552

    zencracker
    Participant

    Hello – I’m using the Icon stack, and yes, the post meta is enabled int he customizer. On every page the only meta that shows is the date of the entry. How can I have the author, date, tags, and categories display?

    Many thanks!

    #1143557

    zencracker
    Participant

    I did read the other thread on a similar problem, however it was dated 2014!

    #1143667

    Prasant Rai
    Moderator

    Hello There,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    Thanks.

    #1143810

    zencracker
    Participant
    #1143887

    zencracker
    Participant

    This is incredibly frustrating. Why is it that neither categories, tags or metadata referencing the author show on any pages as a core element? Please, could someone help? I’ve looked at other code/php/functions solutions in these threads and they do not work (or I haven’t found one that does). Forgive my anxiousness, and I don’t wont to come off as terse, but this, and another problem of the sidebar cutting off content, are not only bothersome, but these issues are causing true concerns on this website.

    Any help is appreciated

    website: http://liqescencemedia.com

    example of post data not appearing: http://liquescencemedia.com/sexy-love-letters-james-joyce/

    example of sidebar cutting content at bottom: Happens when a post or page has previously viewed items in shopping cart and when there is more than two widgets in sidebar.

    #1144314

    Christopher
    Moderator

    Hi there,

    In regards with meta date, because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Please add following code in child theme’s functions.php file :

    // Entry Meta
    // =============================================================================
    
    if ( ! function_exists( 'x_icon_entry_meta' ) ) :
      function x_icon_entry_meta() {
    
    //
        // Author.
        //
    
        $author = sprintf( '<span><i class="x-icon-pencil" data-x-icon=""></i> %s</span>',
          get_the_author()
        );
    
        //
        // 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 ) )
                                  . '"><i class="x-icon-bookmark" data-x-icon=""></i> '
                                  . $category->name
                                  . '</a>'
                                  . $separator;
            }
    
            $categories_list = sprintf( '<span>%s</span>',
              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 ) )
                                . '"><i class="x-icon-bookmark" data-x-icon=""></i> '
                                . $category->name
                                . '</a>'
                                . $separator;
          }
    
          $categories_list = sprintf( '<span>%s</span>',
            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' : sprintf( _n( '%s Comment', '%s Comments', $number, '__x__' ), $number );
    
    $comments = sprintf( '<span><a href="%1$s" title="%2$s" class="meta-comments"><i class="x-icon-comments" data-x-icon=""></i> %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>',
            $author,
            $date,
            $categories_list,
            $comments
          );
        }
    
      }
    endif;
    
    

    Sorry I’m not able to replicate the issue with sidebar. Could you give us step by step to replicate the issue?

    Thanks.

    #1145019

    zencracker
    Participant

    Thank you! Just a note to let you know I appreciate your response. I’ll try the above and report back!

    #1145154

    Prasant Rai
    Moderator

    You are most welcome. 🙂

    #1145877

    zencracker
    Participant

    Hello. I entered the code as advises, but unfortunately, there isn’t any change and the metadata is still not appearing. You can check any post link, but here’s one:

    http://liquescencemedia.com/pulp-paperback-art-hirschfelds-diana/

    As you can see, only the date is rendered.

    I put the code in exactly, all of it, in the functions.php. What could be causing this and how do you think we can fix it? Many thanks for everyone’s help.

    #1146120

    Rue Nel
    Moderator

    Hello There,

    Thanks for the updates! The code should make the post meta to display. Upon checking it turns out that you you may have added the code, the child theme is still inactive. You must activate the child theme to make sure that all your custom functions will override the parent theme’s function. I would highly recommend that you do this steps before activating the child theme.

    1] Please go to X Addons > Customizer Manager
    2] Download the XCS file or the X customizer settings to your local computer. This will serve as a backup.
    3] Go to Appearance > Themes and activate the X Child theme.
    4] Now that the child theme is active, please go to X Addons > Customizer Manager and import again the XCS file or the X customizer settings to make sure that you will have the same settings as the previous setup with the parent theme.

    Hope this helps. Please let us know how it goes.

    #1146144

    zencracker
    Participant

    Oh, okay. Thank you. I’ll give that a go!

    #1146163

    zencracker
    Participant

    Success!!! Thank you so very much! Now, one more thing (sorry). Is there any way to have tags show up as meta under the post. 🙂

    #1146205

    Rupok
    Member

    Hi there,

    It would be a bit unusual since it’s within post header but you can try adding this CSS under Custom > CSS in the Customizer.

    .single-post .entry-content.content {
      padding-bottom: 30px;
    }
    
    .single-post .p-meta {
      bottom: 0;
      left: 0;
      padding-bottom: 30px;
      position: absolute;
      right: 0;
    }

    Hope this helps.

    #1146844

    zencracker
    Participant

    I see. No worries. Actually, I do have one more question. :)))

    I’d like to have the category descriptions show on the category pages. I have images and video plus text on each category page and these showed in my previous template. I use the category pages as a landing page. Is this possible with some simple code? Thank you!!

    #1147273

    Jade
    Moderator

    Hi there,

    Please follow the suggestion on this thread: https://community.theme.co/forums/topic/show-category-descriptions-in-icon-stack/#post-1072059

    Hope this helps.