Skip to content

Instantly share code, notes, and snippets.

@suneelkumar48
Created November 24, 2014 20:03
Show Gist options
  • Save suneelkumar48/19956a843b7157abe243 to your computer and use it in GitHub Desktop.
Save suneelkumar48/19956a843b7157abe243 to your computer and use it in GitHub Desktop.
Structured Data Errors In Webmaster Tool
Dear Sir,
I am unable to find "the_date();" and "the_author();" in single.php
and single.php code is:
<?php
if (in_category(ipin_blog_cats())) {
get_template_part('single', 'blog');
} else {
get_template_part('single', 'pin');
}
?>
Please check and let me know.
Thanks
@raymondware
Copy link

How about a file with "masonry" in it?

@suneelkumar48
Copy link
Author

@raymondware: here is single-masonry.php and the code is:

if (!empty($tags_related)) { $tag_in = array(); foreach ($tags_related as $tag_related) { array_push($tag_in, $tag_related->term_id); } $args = array( 'tag__in' => $tag_in, 'post__not_in' => array(get_the_ID()), 'meta_query' => array( array( 'key' => '_Original Post ID', 'compare' => 'NOT EXISTS' ) ), 'paged' => $pnum ); query_posts($args); $maxpage = $wp_query->max_num_pages; //if no posts with same tags, find posts with same category if ($wp_query->post_count == 0) { $category_in = array(); foreach (get_the_category() as $category) { array_push($category_in, $category->cat_ID); } $args = array( 'category__in' => $category_in, 'post__not_in' => array(get_the_ID()), 'meta_query' => array( array( 'key' => '_Original Post ID', 'compare' => 'NOT EXISTS' ) ), 'paged' => $pnum ); query_posts($args); $maxpage = $wp_query->max_num_pages; } } else { $category_in = array(); foreach (get_the_category() as $category) { array_push($category_in, $category->cat_ID); } $args = array( 'category__in' => $category_in, 'post__not_in' => array(get_the_ID()), 'meta_query' => array( array( 'key' => '_Original Post ID', 'compare' => 'NOT EXISTS' ) ), 'paged' => $pnum ); query_posts($args); $maxpage = $wp_query->max_num_pages; } ?> <?php if (have_posts()) { ?> <div id="ajax-loader-masonry" class="ajax-loader"></div> <h3 class="text-center"><?php _e('Related Pins', 'ipin'); ?></h3> <?php } ?> <div id="masonry"> <?php $count_ad = 1; if (have_posts()) : while (have_posts()) : the_post(); ?> <?php if (of_get_option('frontpage1_ad') == $count_ad && of_get_option('frontpage1_ad_code') != '' && ($pnum == 1 || of_get_option('infinitescroll') == 'disable')) { ?> <div class="thumb"> <div class="thumb-ad"> <?php eval('?>' . of_get_option('frontpage1_ad_code')); ?> </div> </div> <?php } ?> <?php if (of_get_option('frontpage2_ad') == $count_ad && of_get_option('frontpage2_ad_code') != '' && ($pnum == 1 || of_get_option('infinitescroll') == 'disable')) { ?> <div class="thumb"> <div class="thumb-ad"> <?php eval('?>' . of_get_option('frontpage2_ad_code')); ?> </div> </div> <?php } ?> <?php if (of_get_option('frontpage3_ad') == $count_ad && of_get_option('frontpage3_ad_code') != '' && ($pnum == 1 || of_get_option('infinitescroll') == 'disable')) { ?> <div class="thumb"> <div class="thumb-ad"> <?php eval('?>' . of_get_option('frontpage3_ad_code')); ?> </div> </div> <?php } ?> <?php if (of_get_option('frontpage4_ad') == $count_ad && of_get_option('frontpage4_ad_code') != '' && ($paged == 0 || $paged == 1 || of_get_option('infinitescroll') == 'disable')) { ?> <div class="thumb"> <div class="thumb-ad"> <?php eval('?>' . of_get_option('frontpage4_ad_code')); ?> </div> </div> <?php } ?> <?php if (of_get_option('frontpage5_ad') == $count_ad && of_get_option('frontpage5_ad_code') != '' && ($paged == 0 || $paged == 1 || of_get_option('infinitescroll') == 'disable')) { ?> <div class="thumb"> <div class="thumb-ad"> <?php eval('?>' . of_get_option('frontpage5_ad_code')); ?> </div> </div> <?php } ?> <div id="post-<?php the_ID(); ?>" <?php post_class('thumb'); ?>> <div class="thumb-holder"> <div class="masonry-actionbar"> <?php if (current_user_can('administrator') || current_user_can('editor') || current_user_can('author') || !is_user_logged_in()) { ?> <a class="ipin-repin btn btn-mini" data-post_id="<?php echo $post->ID ?>" href="#"><i class="fa fa-thumb-tack"></i> <?php _e('Repin', 'ipin'); ?></a> <?php } ?> <?php if ($post->post_author != $user_ID) { ?> <button class="ipin-like btn btn-mini<?php if(ipin_liked($post->ID)) { echo ' disabled'; } ?>" data-post_id="<?php echo $post->ID ?>" data-post_author="<?php echo $post->post_author; ?>" type="button"><i class="fa fa-heart"></i> <?php _e('Like', 'ipin'); ?></button> <?php } else { ?> <a class="btn btn-mini" href="<?php echo home_url('/pins-settings/'); ?>?i=<?php the_ID(); ?>"><?php _e('Edit', 'ipin'); ?></a> <?php } ?> <a class="ipin-comment btn btn-mini" href="<?php the_permalink(); ?>#respond" data-post_id="<?php echo $post->ID ?>"><i class="fa fa-comment"></i> <?php _e('Comment', 'ipin'); ?></a> </div> <a class="featured-thumb-link" href="<?php the_permalink(); ?>"> <?php if (of_get_option('price_currency') != '' && ipin_get_post_price() != '') { ?> <div class="pricewrapper"><div class="pricewrapper-inner"><?php echo ipin_get_post_price(); ?></div></div> <?php } ?> <?php //if is video $photo_source = get_post_meta($post->ID, "_Photo Source", true); $post_video = ipin_get_post_video($photo_source); if ($post_video) { ?> <div class="featured-thumb-video"></div> <?php } ?> <?php $imgsrc = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID),'medium'); if ($imgsrc[0] == '') { $imgsrc[0] = get_template_directory_uri() . '/img/blank.gif'; $imgsrc[1] = get_option('medium_size_w'); $imgsrc[2] = get_option('medium_size_w'); } //if is animated gif $animated_gif = false; if (substr($imgsrc[0], -4) == '.gif' && get_post_meta(get_post_thumbnail_id($post->ID), 'a_gif', true) == 'yes') { $animated_gif = true; $animated_gif_imgsrc_full = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full'); echo '<div class="featured-thumb-gif"></div>'; } //if need resize if ($post_video && strpos($post_video, 'data-resize') !== false) { $imgsrc[1] = get_option('medium_size_w'); $imgsrc[2] = round(get_option('medium_size_w')/1.77); } ?> <img class="featured-thumb<?php if ($animated_gif) echo ' featured-thumb-gif-class" data-animated-gif-src-medium="' . $imgsrc[0] . '" data-animated-gif-src-full="' . $animated_gif_imgsrc_full[0]; ?>" src="<?php echo $imgsrc[0]; ?>" alt="<?php echo mb_strimwidth(the_title_attribute('echo=0'), 0, 100, ' ...'); ?>" style="width:<?php echo $imgsrc[1] ?>px;height:<?php echo $imgsrc[2] ?>px" /> </a> <?php $tags = ''; if (of_get_option('posttags') == 'enable') { $the_tags = get_the_tags(); if ($the_tags) { foreach($the_tags as $the_tag) { $tags .= $the_tag->name . ', '; } } $tags = substr($tags, 0, -2); } ?> <div class="post-title" data-title="<?php echo esc_attr($post->post_title); ?>" data-tags="<?php echo esc_attr($tags); ?>" data-price="<?php echo esc_attr(ipin_get_post_price(false)); ?>" data-content="<?php echo esc_attr($post->post_content); ?>"> <?php echo mb_strimwidth(the_title_attribute('echo=0'), 0, 255, ' ...'); if ($the_tags) { echo '<div class="thetags">'; foreach($the_tags as $the_tag) { echo '<a href="' . get_tag_link($the_tag->term_id). '">' . $the_tag->name . '</a> '; } echo '</div>'; } ?> </div> </div> <?php $likes_number = get_post_meta($post->ID, '_Likes Count', true); $repins_number = get_post_meta($post->ID, '_Repin Count', true); $comments_number = get_comments_number(); ?> <div class="masonry-meta masonry-meta-comment-likes text-center"> <?php if ($likes_number == '' || $likes_number == '0') { echo '<span id="likes-count-' . $post->ID . '" class="likes-count hide"></span>'; } elseif ($likes_number == '1') { echo '<span id="likes-count-' . $post->ID . '" class="likes-count">1 ' . __('like', 'ipin') . '</span>'; } else { echo '<span id="likes-count-' . $post->ID . '" class="likes-count">' . $likes_number . ' ' . __('likes', 'ipin') . '</span>'; } if ($comments_number == '0') { echo '<span id="comments-count-' . $post->ID . '" class="comments-count hide"></span>'; } elseif ($comments_number == '1') { echo '<span id="comments-count-' . $post->ID . '" class="comments-count">1 ' . __('comment', 'ipin') . '</span>'; } else { echo '<span id="comments-count-' . $post->ID . '" class="comments-count">' . $comments_number . ' ' . __('comments', 'ipin') . '</span>'; } if ($repins_number == '' || $repins_number == '0') { echo '<span id="repins-count-' . $post->ID . '" class="repins-count hide"></span>'; } elseif ($repins_number == '1') { echo '<span id="repins-count-' . $post->ID . '" class="repins-count">1 ' . __('repin', 'ipin') . '</span>'; } else { echo '<span id="repins-count-' . $post->ID . '" class="repins-count">' . $repins_number . ' ' . __('repins', 'ipin') . '</span>'; } ?> </div> <div class="masonry-actionbar-mobile"> <?php if (current_user_can('administrator') || current_user_can('editor') || current_user_can('author') || !is_user_logged_in()) { ?> <a class="ipin-repin btn btn-small" data-post_id="<?php echo $post->ID ?>" href="#"><?php _e('Repin', 'ipin'); ?></a> <?php } ?> <?php if ($post->post_author != $user_ID) { ?> <button class="ipin-like btn btn-small<?php if(ipin_liked($post->ID)) { echo ' disabled'; } ?>" data-post_id="<?php echo $post->ID ?>" data-post_author="<?php echo $post->post_author; ?>" type="button"><?php _e('Like', 'ipin'); ?></button> <?php } else { ?> <a class="btn btn-small" href="<?php echo home_url('/pins-settings/'); ?>?i=<?php the_ID(); ?>"><?php _e('Edit', 'ipin'); ?></a> <?php } ?> <a class="ipin-comment btn btn-small" href="<?php the_permalink(); ?>#respond" data-post_id="<?php echo $post->ID ?>"><?php _e('Comment', 'ipin'); ?></a> </div> <div class="masonry-meta"> <div class="masonry-meta-avatar"><a href="<?php echo home_url('/' . $wp_rewrite->author_base . '/') . get_the_author_meta('user_nicename'); ?>/"><?php echo get_avatar(get_the_author_meta('ID'), '30'); ?></a></div> <div class="masonry-meta-comment"> <span class="masonry-meta-author"><?php the_author_posts_link(); ?></span> <?php $original_post_id = get_post_meta($post->ID, "_Original Post ID", true); if ($original_post_id != '' && $original_post_id != 'deleted') { $original_postdata = get_post($original_post_id, 'ARRAY_A'); $original_author = get_user_by('id', $original_postdata['post_author']); ?> <?php _e('via', 'ipin'); ?> <a href="<?php echo home_url('/' . $wp_rewrite->author_base . '/') . $original_author->user_nicename; ?>/"><strong><?php echo $original_author->display_name; ?></strong></a> <?php } if (ipin_get_post_board()) { ?> <?php _e('onto', 'ipin'); ?> <span class="masonry-meta-content"><strong><a href="<?php echo home_url('/board/'); ?><?php echo ipin_get_post_board()->term_id ?>/"><?php echo ipin_get_post_board()->name; ?></a></strong></span> <?php } ?> </div> </div> <?php if ('0' != $frontpage_comments_number = of_get_option('frontpage_comments_number')) { ?> <div id="masonry-meta-comment-wrapper-<?php echo $post->ID; ?>"> <?php if ($comments_number > $frontpage_comments_number) { $offset = $comments_number - $frontpage_comments_number; } else { $offset = 0; } $args = array( 'number' => $frontpage_comments_number, 'post_id' => $post->ID, 'order' => 'asc', 'offset' => $offset, 'status' => 'approve' ); $comments = get_comments($args); foreach($comments as $comment) { ?> <div class="masonry-meta"> <?php $comment_author = get_user_by('id', $comment->user_id); ?> <div class="masonry-meta-avatar"> <?php if ($comment_author) { ?> <a href="<?php echo home_url('/' . $wp_rewrite->author_base . '/') . $comment_author->user_nicename; ?>/"> <?php } ?> <?php echo get_avatar($comment->user_id, '30'); ?> <?php if ($comment_author) { ?> </a> <?php } ?> </div> <div class="masonry-meta-comment"> <span class="masonry-meta-author"> <?php if ($comment_author) { ?><a href="<?php echo home_url('/' . $wp_rewrite->author_base . '/') . $comment_author->user_nicename; ?>/"><?php } ?><?php echo $comment->comment_author; ?><?php if ($comment_author) { ?></a><?php } ?> </span> <span class="masonry-meta-comment-content"><?php echo $comment->comment_content; ?></span> </div> </div> <?php } ?> </div> <?php } if (is_user_logged_in()) { ?> <div id="masonry-meta-commentform-<?php echo $post->ID ?>" class="masonry-meta hide"> <div class="masonry-meta-avatar"><?php echo get_avatar($user_ID, '30'); ?></div> <div class="masonry-meta-comment"> <?php $id_form = 'commentform-' . $post->ID; $id_submit = 'submit-' . $post->ID; comment_form(array( 'id_form' => $id_form, 'id_submit' => $id_submit, 'title_reply' => '', 'cancel_reply_link' => __('X Cancel reply', 'ipin'), 'comment_notes_before' => '', 'comment_notes_after' => '', 'logged_in_as' => '', 'label_submit' => __('Post Comment', 'ipin'), 'comment_field' => '<textarea placeholder="' . __('Add a comment...', 'ipin') . '" name="comment" aria-required="true"></textarea>' )); ?> </div> </div> <?php } ?> </div> <?php $count_ad++; endwhile; else : ?> <?php endif; wp_reset_query(); ?> </div> <?php if ($maxpage != 0) { ?> <div id="navigation"> <ul class="pager"> <?php if ($pnum != 1 && $maxpage >= $pnum) { ?> <li id="navigation-previous"> <a href="<?php $permalink = get_permalink(); if (substr($permalink,-1) == '/') { $permalink = substr($permalink,0,-1); } echo $permalink . '/' . $source . '?pnum=' . ($pnum-1); ?>"><?php _e('&laquo; Previous', 'ipin') ?></a> </li> <?php } ?> <?php if ($maxpage != 1 && $maxpage != $pnum) { ?> <li id="navigation-next"> <a href="<?php $permalink = get_permalink(); if (substr($permalink,-1) == '/') { $permalink = substr($permalink,0,-1); } echo $permalink . '/' . $source . '?pnum=' . ($pnum+1); ?>"><?php _e('Next &raquo;', 'ipin') ?></a> </li> <?php } ?> </ul> </div> <?php } ?>

@raymondware
Copy link

Okay the meta info is buried somewhere in the theme files... Is there a file with "meta" in it? It may be in a folder called "templates"

@suneelkumar48
Copy link
Author

@raymondware: no sir...there is not any file of meta or not having templates folder...

@suneelkumar48
Copy link
Author

@raymondware: for meta we are using yoast plugin.

@suneelkumar48
Copy link
Author

@raymondware: may be header.php will help you?

prefix="og: http://ogp.me/ns#">
<title><?php wp_title( '', true, 'right' ); if (!is_home() && !is_front_page()) echo ' | '; bloginfo( 'name' ); $site_description = get_bloginfo( 'description', 'display' ); if ($site_description && (is_home() || is_front_page())) echo ' | ' . $site_description; ?></title>
<?php 
global $post;
if (is_single() && $post->post_content == '' && !function_exists('wpseo_init')) {
    $meta_categories = get_the_category($post->ID);

    foreach ($meta_categories as $meta_category) {
        $meta_category_name = $meta_category->name;
    }

    if (ipin_get_post_board()) {
        $meta_board_name = ipin_get_post_board()->name;
    } else {
        $meta_board_name = __('Untitled', ipin);
    }
?>
    <meta name="<?php echo 'descript' . 'ion'; //bypass yoast seo check ?>" content="<?php _e('Pinned onto', 'ipin'); ?> <?php echo esc_attr($meta_board_name); ?> <?php _e('Board in', 'ipin') ?> <?php echo esc_attr($meta_category_name); ?> <?php _e('Category', 'ipin'); ?>" />
<?php
}
?>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/favicon.ico">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<link href="<?php echo get_template_directory_uri(); ?>/css/bootstrap.css" rel="stylesheet">
<link href="<?php echo get_template_directory_uri(); ?>/css/font-awesome.min.css" rel="stylesheet">
<link href="<?php echo get_stylesheet_directory_uri(); ?>/style.css" rel="stylesheet">
<?php if (of_get_option('color_scheme') == 'dark') { ?>
<link href="<?php echo get_template_directory_uri(); ?>/style-dark.css" rel="stylesheet">
<?php } ?>

<!--[if lt IE 9]>
    <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
> <style type="text/css" media="all">#masonry { visibility: visible !important; }</style>
<script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
<div id="topmenu" class="navbar<?php if (of_get_option('color_scheme') == 'dark') echo ' navbar-inverse'; ?> navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">
            <?php if (is_user_logged_in()) { global $user_ID, $user_identity; ?>
                <?php
                $notifications_count = get_user_meta($user_ID, 'ipin_user_notifications_count', true);
                if ($notifications_count == '' || $notifications_count == '0') $notifications_count = '0';
                ?>
                <a id="top-notifications-mobile" class="hidden-desktop<?php if ($notifications_count != '0') echo ' top-notifications-mobile-count-nth'; ?>" href="<?php echo home_url('/notifications/'); ?>"><?php echo $notifications_count; ?></a>
                <a id="top-add-button" class="hidden-desktop" href="<?php echo home_url('/pins-settings/'); ?>"><i class="fa fa-plus"></i></a>
            <?php } ?>

            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <i class="icon-bar"></i>
                <i class="icon-bar"></i>
                <i class="icon-bar"></i>
            </a>

            <?php $logo = of_get_option('logo'); ?>
            <a class="brand<?php if ($logo != '') { echo ' logo'; } ?>" href="<?php echo esc_url( home_url( '/' ) ); ?>">
            <?php if ($logo != '') { ?>
                <img src="<?php echo $logo ?>" alt="logo" />
            <?php } else {
                bloginfo('name');
            }
            ?>
            </a>

            <nav id="nav-main" class="nav-collapse" role="navigation">
                <ul id="menu-top-right" class="nav pull-right">
                <?php if ($user_ID) { ?>
                    <?php if (current_user_can('edit_posts')) { ?>
                    <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" data-target="" href=""><?php _e('Add', 'ipin'); ?> <i class="fa fa-caret-down"></i></a>
                        <ul class="dropdown-menu dropdown-menu-add">
                            <li><a href="<?php echo home_url('/pins-settings/'); ?>"><?php _e('Pin', 'ipin'); ?></a></li>
                            <li><a href="<?php echo home_url('/boards-settings/'); ?>"><?php _e('Board', 'ipin'); ?></a></li>
                        </ul>
                    </li>
                    <?php } ?>

                    <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" data-target="" href=""><?php if (strlen($user_identity) > 12) { echo substr($user_identity,0, 12) . '..'; } else { echo $user_identity; } ?> <i class="fa fa-caret-down"></i></a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php echo get_author_posts_url($user_ID); ?>"><?php _e('Boards', 'ipin'); ?></a></li>
                            <li><a href="<?php echo get_author_posts_url($user_ID); ?>?view=pins"><?php _e('Pins', 'ipin'); ?></a></li>
                            <li><a href="<?php echo get_author_posts_url($user_ID); ?>?view=likes"><?php _e('Likes', 'ipin'); ?></a></li>
                            <li><a href="<?php echo home_url('/settings/'); ?>"><?php _e('Settings', 'ipin'); ?></a></li>
                            <?php if (current_user_can('administrator') || current_user_can('editor')) { ?>
                            <li><a href="<?php echo home_url('/wp-admin/'); ?>"><?php _e('WP Admin', 'ipin'); ?></a></li>
                            <?php } ?>
                            <li><a href="<?php echo home_url('/login/?action=logout&amp;nonce=' . wp_create_nonce('logout')); ?>"><?php _e('Logout', 'ipin'); ?></a></li>
                        </ul>
                    </li>
                    <li id="user-notifications-count" class="visible-desktop"><a<?php if ($notifications_count != '0') echo ' class="user-notifications-count-nth"'; ?> href="<?php echo home_url('/notifications/'); ?>"><?php echo $notifications_count; ?></a></li>
                <?php } else { ?>
                    <li class="hidden-desktop"><a href="<?php echo home_url('/register/'); ?>"><?php _e('Register', 'ipin'); ?></a></li>
                    <li class="hidden-desktop"><a href="<?php echo wp_login_url($_SERVER['REQUEST_URI']); ?>"><?php _e('Login', 'ipin'); ?></a></li>
                    <li class="visible-desktop" id="loginbox-wrapper"><a id="loginbox" data-content='<?php if (function_exists('wsl_activate')) { do_action('wordpress_social_login'); echo '<hr />'; } ?>' 
                         aria-hidden="true"><i class="fa fa-sign-in"></i> <?php _e('Register / Login', 'ipin'); ?></a>
                    </li>
                <?php } ?>
                </ul>

                <?php 
                if (has_nav_menu('top_nav')) {
                    $topmenu = wp_nav_menu(array('theme_location' => 'top_nav', 'menu_class' => 'nav', 'echo' => false));
                    if (!is_user_logged_in()) {
                        echo $topmenu;
                    } else {
                        $following_active = '';
                        if (is_page('following')) $following_active = ' active';
                        $following_menu = '<li class="menu-following' . $following_active . '"><a href="' . home_url('/following/') . '">' . __('Following', 'ipin') . '</a></li>';
                        //To remove "Following" from top menu, delete above line and uncomment below line
                        //$following_menu = '<li class="menu-following hide' . $following_active . '"><a href="' . home_url('/') . 'following/">' . __('Following', 'ipin') . '</a></li>';
                        $pos = stripos($topmenu, '<li');
                        echo substr($topmenu, 0, $pos) . $following_menu . substr($topmenu, $pos);
                    }
                } else {
                    echo '<ul id="menu-top" class="nav">';
                    wp_list_pages('title_li=&depth=0&sort_column=menu_order' );
                    echo '</ul>';
                }
                ?>
                <?php if ('' != $facebook_icon_url = of_get_option('facebook_icon_url')) { ?>
                <a href="<?php echo $facebook_icon_url; ?>" title="<?php _e('Find us on Facebook', 'ipin'); ?>" class="topmenu-social"><i class="fa fa-facebook"></i></a>
                <?php } ?>

                <?php if ('' != $twitter_icon_url = of_get_option('twitter_icon_url')) { ?>
                <a href="<?php echo $twitter_icon_url; ?>" title="<?php _e('Follow us on Twitter', 'ipin'); ?>" class="topmenu-social"><i class="fa fa-twitter"></i></a>
                <?php } ?>

                <a href="<?php bloginfo('rss2_url'); ?>" title="<?php _e('Subscribe to our RSS Feed', 'ipin'); ?>" class="topmenu-social"><i class="fa fa-rss"></i></a>

                <form class="navbar-search" method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
                    <input type="text" class="search-query" placeholder="<?php _e('Search', 'ipin'); ?>" name="s" id="s" value="<?php the_search_query(); ?>">
                    <?php if (isset($_GET['q'])) { ?>
                    <input type="hidden" name="q" value="<?php echo $_GET['q']; ?>"/>
                    <?php } ?>
                </form>
            </nav>
        </div>
    </div>
</div>

<?php if (!$user_ID && of_get_option('top_message') != '') { ?> 
<div id="top-message-wrapper" class="container">
    <div class="row">
        <div class="span3 hidden-phone"></div>
        <div id="top-message" class="span6">
            <p class="pull-right">
                <a class="btn btn-small btn-primary" href="<?php echo home_url('/register/'); ?>"><?php _e('Join Now', 'ipin'); ?></a>
                <a class="btn btn-small" href="<?php echo wp_login_url($_SERVER['REQUEST_URI']); ?>"><?php _e('Login', 'ipin'); ?></a>
            </p>
            <p class="top-message-p"><?php echo of_get_option('top_message'); ?></p>
        </div>
        <div class="span3"></div>
    </div>
</div>
<?php } ?>

<?php if (of_get_option('header_ad') != '' && !is_page('pins-settings')) { ?>
<div id="header-ad" class="container-fluid">
    <div class="row-fluid">
        <div class="span12"><?php eval('?>' . of_get_option('header_ad')); ?></div>
    </div>
</div>
<?php } ?>

<?php if (is_search() || is_category() || is_tag()) { ?>
<div class="subpage-title container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <?php if (is_search()) { ?>
                <h1><?php _e('Search results for', 'ipin'); ?> "<?php the_search_query(); ?>"</h1>
            <?php } else if (is_category()) { ?>
                <h1><?php single_cat_title(); ?></h1>
                <?php if (category_description()) { ?>
                    <?php echo category_description(); ?>
                <?php } ?>
            <?php } else if (is_tag()) { ?>
                <h1><?php _e('Tag:', 'ipin'); ?> <?php single_tag_title(); ?></h1>
                <?php if (tag_description()) { ?>
                    <?php echo tag_description(); ?>
                <?php } ?>
            <?php } ?>
        </div>
    </div>
</div>
<?php } ?>

@raymondware
Copy link

If you feel comfortable giving me FTP access, I can find the file you need to edit.. If so send it via email @ raymondware.design@gmail.com. If not you can Grep the directory searching for the string "the_author()"

via terminal do: grep -R 'the_author()' ipin/

@suneelkumar48
Copy link
Author

@raymondware: Sir i found the_author(). please review the code?

>

                    <div class="post-meta-top">
                        <div class="pull-right"><a href="<?php the_permalink(); ?>#comments"><?php comments_number(__('0 Comments', 'ipin'), __('1 Comment', 'ipin'), __('% Comments', 'ipin'));?></a><?php edit_post_link(__('Edit', 'ipin'), ' | '); ?></div>
                        <div class="pull-left"><?php echo ipin_human_time_diff(get_post_time('U', true)) . ' / ';the_author(); ?></div>
                    </div>

                    <?php
                    $imgsrc = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'large');
                    if ($imgsrc[0] != '') {
                    ?>
                    <div class="post-featured-photo">
                        <a href="<?php the_permalink(); ?>" target="_blank"><img class="featured-thumb" src="<?php echo $imgsrc[0]; ?>" alt="<?php the_title_attribute(); ?>" /></a>
                    </div>
                    <?php } ?>

                    <div class="post-content">
                        <?php
                        the_content();
                        wp_link_pages( array( 'before' => '<p><strong>' . __('Pages:', 'ipin') . '</strong>', 'after' => '</p>' ) );
                        ?>
                        
                        <div class="clearfix"></div>
                        
                        <div class="post-meta-category-tag">
                            <?php
                            $categories = get_the_category();
                            if($categories){
                                echo __('Categories', 'ipin') . ' <span class="thetags">';
                                
                                foreach($categories as $category) {
                                    echo '<a href="'.get_category_link( $category->term_id ).'">'.$category->cat_name.'</a> ';
                                }
                                
                                echo '</span>';
                            }
                            
                            $posttags = get_the_tags();
                            if ($posttags) {
                                echo __('Tags', 'ipin') . ' <span class="thetags">';
                                
                                foreach($posttags as $tag) {
                                    echo '<a href="' . get_tag_link($tag->term_id). '">' . $tag->name . '</a> '; 
                                }
                                
                                echo '</span>';
                            }
                            ?>
                        </div>
                    </div>
                    
                </div>
                <?php endwhile; ?>


                <?php if(function_exists('wp_pagenavi')) { ?>
                    <div id="navigation" class="pagination pagination-centered">
                        <?php wp_pagenavi(); ?>
                    </div>
                <?php } else { ?>
                    <div id="navigation-blog">
                        <ul class="pager">
                            <li class="previous"><?php next_posts_link(__('&laquo; Previous', 'ipin')) ?></li>
                            <li class="next"><?php previous_posts_link(__('Next &raquo;', 'ipin')) ?></li>
                        </ul>
                    </div>
                <?php } ?>
            </div>
            
            <div id="single-right-column" class="span3">
                <?php get_sidebar('left'); ?>
            </div>
        </div>
    </div>
    
    <div class="span3">
        <?php get_sidebar('right'); ?>
    </div>
</div>

@raymondware
Copy link

I am unable to see all the code... try posting the code within a pre tag

@suneelkumar48
Copy link
Author

<?php get_header(); ?>

<div class="container">
    <div class="row">
        <div class="span9">
            <div class="row">
                <div id="double-left-column" class="span6 pull-right">
                    <?php while (have_posts()) : the_post(); ?>
                    <div id="post-<?php the_ID(); ?>" <?php post_class('post-wrapper'); ?>>
                        <div class="h1-wrapper">
                            <a href="<?php the_permalink(); ?>"><h1><?php the_title(); ?></h1></a>
                        </div>

                        <div class="post-meta-top">
                            <div class="pull-right"><a href="<?php the_permalink(); ?>#comments"><?php comments_number(__('0 Comments', 'ipin'), __('1 Comment', 'ipin'), __('% Comments', 'ipin'));?></a><?php edit_post_link(__('Edit', 'ipin'), ' | '); ?></div>
                            <div class="pull-left"><?php echo ipin_human_time_diff(get_post_time('U', true)) . ' / ';the_author(); ?></div>
                        </div>

                        <?php
                        $imgsrc = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'large');
                        if ($imgsrc[0] != '') {
                        ?>
                        <div class="post-featured-photo">
                            <a href="<?php the_permalink(); ?>" target="_blank"><img class="featured-thumb" src="<?php echo $imgsrc[0]; ?>" alt="<?php the_title_attribute(); ?>" /></a>
                        </div>
                        <?php } ?>

                        <div class="post-content">
                            <?php
                            the_content();
                            wp_link_pages( array( 'before' => '<p><strong>' . __('Pages:', 'ipin') . '</strong>', 'after' => '</p>' ) );
                            ?>

                            <div class="clearfix"></div>

                            <div class="post-meta-category-tag">
                                <?php
                                $categories = get_the_category();
                                if($categories){
                                    echo __('Categories', 'ipin') . ' <span class="thetags">';

                                    foreach($categories as $category) {
                                        echo '<a href="'.get_category_link( $category->term_id ).'">'.$category->cat_name.'</a> ';
                                    }

                                    echo '</span>';
                                }

                                $posttags = get_the_tags();
                                if ($posttags) {
                                    echo __('Tags', 'ipin') . ' <span class="thetags">';

                                    foreach($posttags as $tag) {
                                        echo '<a href="' . get_tag_link($tag->term_id). '">' . $tag->name . '</a> '; 
                                    }

                                    echo '</span>';
                                }
                                ?>
                            </div>
                        </div>

                    </div>
                    <?php endwhile; ?>


                    <?php if(function_exists('wp_pagenavi')) { ?>
                        <div id="navigation" class="pagination pagination-centered">
                            <?php wp_pagenavi(); ?>
                        </div>
                    <?php } else { ?>
                        <div id="navigation-blog">
                            <ul class="pager">
                                <li class="previous"><?php next_posts_link(__('&laquo; Previous', 'ipin')) ?></li>
                                <li class="next"><?php previous_posts_link(__('Next &raquo;', 'ipin')) ?></li>
                            </ul>
                        </div>
                    <?php } ?>
                </div>

                <div id="single-right-column" class="span3">
                    <?php get_sidebar('left'); ?>
                </div>
            </div>
        </div>

        <div class="span3">
            <?php get_sidebar('right'); ?>
        </div>
    </div>
</div>

<?php get_footer(); ?>

@suneelkumar48
Copy link
Author

@raymondware: please check the code??????

@raymondware
Copy link

<?php get_header(); ?>

<div class="container">
    <div class="row">
        <div class="span9">
            <div class="row">
                <div id="double-left-column" class="span6 pull-right">
                    <?php while (have_posts()) : the_post(); ?>
                    <div id="post-<?php the_ID(); ?>" <?php post_class('post-wrapper'); ?>>
                        <div class="h1-wrapper">
                            <a href="<?php the_permalink(); ?>"><h1><?php the_title(); ?></h1></a>
                        </div>

                        <div class="post-meta-top">
                            <div class="pull-right"><a href="<?php the_permalink(); ?>#comments"><?php comments_number(__('0 Comments', 'ipin'), __('1 Comment', 'ipin'), __('% Comments', 'ipin'));?></a><?php edit_post_link(__('Edit', 'ipin'), ' | '); ?></div>
                            <div class="pull-left"><span class="post-date updated"><?php echo ipin_human_time_diff(get_post_time('U', true)); ?></span>/ <span class="vcard author post-author"><span class="fn"><?php the_author(); ?></span></span></div>
                        </div>

                        <?php
                        $imgsrc = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'large');
                        if ($imgsrc[0] != '') {
                        ?>
                        <div class="post-featured-photo">
                            <a href="<?php the_permalink(); ?>" target="_blank"><img class="featured-thumb" src="<?php echo $imgsrc[0]; ?>" alt="<?php the_title_attribute(); ?>" /></a>
                        </div>
                        <?php } ?>

                        <div class="post-content">
                            <?php
                            the_content();
                            wp_link_pages( array( 'before' => '<p><strong>' . __('Pages:', 'ipin') . '</strong>', 'after' => '</p>' ) );
                            ?>

                            <div class="clearfix"></div>

                            <div class="post-meta-category-tag">
                                <?php
                                $categories = get_the_category();
                                if($categories){
                                    echo __('Categories', 'ipin') . ' <span class="thetags">';

                                    foreach($categories as $category) {
                                        echo '<a href="'.get_category_link( $category->term_id ).'">'.$category->cat_name.'</a> ';
                                    }

                                    echo '</span>';
                                }

                                $posttags = get_the_tags();
                                if ($posttags) {
                                    echo __('Tags', 'ipin') . ' <span class="thetags">';

                                    foreach($posttags as $tag) {
                                        echo '<a href="' . get_tag_link($tag->term_id). '">' . $tag->name . '</a> '; 
                                    }

                                    echo '</span>';
                                }
                                ?>
                            </div>
                        </div>

                    </div>
                    <?php endwhile; ?>


                    <?php if(function_exists('wp_pagenavi')) { ?>
                        <div id="navigation" class="pagination pagination-centered">
                            <?php wp_pagenavi(); ?>
                        </div>
                    <?php } else { ?>
                        <div id="navigation-blog">
                            <ul class="pager">
                                <li class="previous"><?php next_posts_link(__('&laquo; Previous', 'ipin')) ?></li>
                                <li class="next"><?php previous_posts_link(__('Next &raquo;', 'ipin')) ?></li>
                            </ul>
                        </div>
                    <?php } ?>
                </div>

                <div id="single-right-column" class="span3">
                    <?php get_sidebar('left'); ?>
                </div>
            </div>
        </div>

        <div class="span3">
            <?php get_sidebar('right'); ?>
        </div>
    </div>
</div>

<?php get_footer(); ?>

@raymondware
Copy link

Try that...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment