This topic has 20 replies, 2 voices, and was last updated 9 years by sharmstr.

  • Author
  • #52972
     Milton Ayala
    Participant

    Theme Options/Blog/Display Meta Fields

    ERROR

    I have the Display post meta on archive listing On

    also the Display post meta in Single post page On

    Display Meta Fields are; author avatar / profile link / categories / tags

    On archive listing it displays, name / date / category

    On single post it displays, name / date / tags

    How can I get the meta fields to work?

    #52975
     sharmstr
    Moderator

    No. Clear your cache or something. See attached

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    Attachments:
    You must be logged in to view attached files.
    #52989
     Milton Ayala
    Participant

    Yes, I already cleared the cache. I was attempting to find the issue (should I say emulate you?) from your previous example to a different issue.

    Attachments:
    You must be logged in to view attached files.
    #53020
     sharmstr
    Moderator

    Could be plugin, custom css, custom code in functions.php…. Is kleo up to date?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #53096
     Milton Ayala
    Participant

    I’m all update, and the css and functions code that I’m using is from a reliable source, in fact the best person in this forum. 🙂 well aside from one that came from @abe.

    I think is a plug in, I just thought it would be faster to find it the way you did when I had the issue with the oval. (last reply image) What I my looking for when I inspect the element in development tools? I understand that this is out of the scope of what you do here, but you can’t blame a guy for trying. 🙂

    #53108
     Milton Ayala
    Participant

    OK, I turn off the plug ins and is still not showing the meta fields selected in theme options. Maybe I’m wrong but I think this function is the problem. I got this to remove the archive word from posts

    //Add me to child theme functions.php
    function kleo_title()
    {
    $output = “”;
    if ( is_category() )
    {
    $output = __(”,’kleo_framework’).” “.single_cat_title(”,false);
    }
    elseif (is_day())
    {
    $output = __(‘date:’,’kleo_framework’).” “.get_the_time(‘F jS, Y’);
    }
    elseif (is_month())
    {
    $output = __(‘month:’,’kleo_framework’).” “.get_the_time(‘F, Y’);
    }
    elseif (is_year())
    {
    $output = __(‘year:’,’kleo_framework’).” “.get_the_time(‘Y’);
    }
    elseif (is_search())
    {
    global $wp_query;
    if(!empty($wp_query->found_posts))
    {
    if($wp_query->found_posts > 1)
    {
    $output = $wp_query->found_posts .” “. __(‘search results for:’,’kleo_framework’).” “.esc_attr( get_search_query() );
    }
    else
    {
    $output = $wp_query->found_posts .” “. __(‘search result for:’,’kleo_framework’).” “.esc_attr( get_search_query() );
    }
    }
    else
    {
    if(!empty($_GET[‘s’]))
    {
    $output = __(‘Search results for:’,’kleo_framework’).” “.esc_attr( get_search_query() );
    }
    else
    {
    $output = __(‘To search the site please enter a valid term’,’kleo_framework’);
    }
    }
    }
    elseif (is_author())
    {
    $curauth = (get_query_var(‘author_name’)) ? get_user_by(‘slug’, get_query_var(‘author_name’)) : get_userdata(get_query_var(‘author’));
    $output = __(”,’kleo_framework’).” “;
    if(isset($curauth->nickname)) $output .= __(”,’kleo_framework’).” “.$curauth->nickname;
    }
    elseif (is_tag())
    {
    $output = __(‘Tag Archive for:’,’kleo_framework’).” “.single_tag_title(”,false);
    }
    elseif(is_tax())
    {
    $term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) );
    $output = __(‘Archive for:’,’kleo_framework’).” “.$term->name;
    } elseif ( is_front_page() && !is_home() ) {
    $output = get_the_title(get_option(‘page_on_front’));
    } elseif ( is_home() && !is_front_page() ) {
    $output = get_the_title(get_option(‘page_for_posts’));
    } elseif ( is_404() ) {
    $output = __(‘Error 404 – Page not found’,’kleo_framework’);
    }
    else {
    $output = get_the_title();
    }
    if (isset($_GET[‘paged’]) && !empty($_GET[‘paged’]))
    {
    $output .= ” (“.__(‘Page’,’kleo_framework’).” “.$_GET[‘paged’].”)”;
    }
    return $output;
    }

    #53133
     sharmstr
    Moderator

    Copy the info from Theme Options > System Info into a private reply.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #53181
     Milton Ayala
    Participant
    This reply has been set as private.
    #53182
     sharmstr
    Moderator

    Wow that’s a lot of crap 🙂

    Off the top of my head I’d say its one of the avatar/author plugins you have installed that’s causing the problem.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #53183
     Milton Ayala
    Participant

    🙂 yea a lot of crap. Thanks @sharmstr

    I removed all plug ins [crap?] from the test site, you advice me to do and still the same problem

    #53189
     sharmstr
    Moderator

    Give me access to the test site.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #53192
     Milton Ayala
    Participant

    OK

    When and How? What level access do you need?

    #53219
     sharmstr
    Moderator

    admin. now. respond privately.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #53241
     Milton Ayala
    Participant

    Thanks to your advice @sharmstr I found the culprit. Another dumb mistake by me. 🙂

    It was a functions code that you posted to show the avatar on post. I posted it, works perfect but the avatar is not clickable. What I failed to understand clearly is that option was included in the theme update. I’m no Sharmstr,:) but maybe this code conflicts with the theme options/Blog/Display Meta Fields.

    * Override Post Author Meta to include avatar
    **/
    if ( ! function_exists( ‘kleo_entry_meta’ ) ) :
    /**
    * Prints HTML with meta information for current post: categories, tags, permalink, author, and date.
    * Create your own kleo_entry_meta() to override in a child theme.
    * @since 1.0
    */

    function kleo_entry_meta($echo=true, $att=array()) {

    $meta_list = array();

    // Translators: used between list items, there is a space after the comma.
    $categories_list = get_the_category_list( __( ‘, ‘, ‘kleo_framework’ ) );

    // Translators: used between list items, there is a space after the comma.
    $tag_list = get_the_tag_list( ”, __( ‘, ‘, ‘kleo_framework’ ) );

    $date = sprintf( ‘<time class=”entry-date” datetime=”%3$s”>%4$s</time>‘,
    esc_url( get_permalink() ),
    esc_attr( get_the_time() ),
    esc_attr( get_the_date( ‘c’ ) ),
    esc_html( get_the_date() )
    );

    $author = sprintf( ‘%3$s‘,
    esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ),
    esc_attr( sprintf( __( ‘View all posts by %s’, ‘kleo_framework’ ), get_the_author() ) ),
    get_the_author()
    );

    if (is_single()):
    $avatar = get_avatar( get_the_author_meta( ‘ID’ ), 100 );
    $meta_list[] = ‘<small class=”post-author-avatar”>’.$avatar.'</small>’;
    endif;
    $meta_list[] = ‘<small class=”meta-author”>’.$author.'</small>’;
    $meta_list[] = ‘<small>’.$date.'</small>’;

    $cat_tag = array();

    if ( $categories_list ) {
    $cat_tag[] = $categories_list;
    }

    if ($tag_list) {
    $cat_tag[] = $tag_list;
    }
    if (!empty($cat_tag)) {
    $meta_list[] = ‘<small class=”meta-category”>’.implode(“, “,$cat_tag).'</small>’;
    }

    //comments
    if (!isset($att[‘comments’]) || (isset($att[‘comments’]) && $att[‘comments’] !== false)) {
    $meta_list[] = ‘<small class=”meta-comment-count”>‘.get_comments_number().’ <i class=”icon-chat-1 hover-tip”
    data-original-title=”‘.sprintf( _n( ‘This article has one comment’, ‘This article has %1$s comments’, get_comments_number(), ‘kleo_framework’ ),number_format_i18n( get_comments_number() ) ).'”
    data-toggle=”tooltip”
    data-placement=”top”></i>
    </small>’;
    }

    if ($echo) {
    echo implode(“, “, $meta_list);
    }
    else {
    return implode(“, “, $meta_list);
    }

    }
    endif;

    #53252
     sharmstr
    Moderator

    Yes. Get rid of it. It was posted before it was an option in the theme options. UGH.

    Now on your test site, clear everything out of custom css and your functions file. It should be a vanilla install with no customization.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #53258
     Milton Ayala
    Participant

    Yes I got rid of it. lol

    OK I cleared it. Now what?

    #53262
     sharmstr
    Moderator

    What do you mean now what?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #53271
     Milton Ayala
    Participant

    You said “Now on your test site, clear everything out of custom css and your functions file. It should be a vanilla install with no customization.”

    Do you mean to test code on a clean slate?

    #53272
     sharmstr
    Moderator

    Yes. So you can verify that its not a Kleo issue before I have to 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #53275
     Milton Ayala
    Participant

    Awesome, I see, that’s a win / win situation.

    On another note, Thank you for all your help. I know and read you get that often. So I guess I’m another person you can add to the list of people who really appreciate what you do, especially because of your status on this forum. You ROCK!!! xoxoxoxoxoxo

    #53279
     sharmstr
    Moderator

    Thank you!

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

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

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?