Skip to content

Instantly share code, notes, and snippets.

@suneelkumar48
Created November 24, 2014 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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

It looks like they are calling other templates into the single.php file... Is there a "blog.php" file in that directory?

@suneelkumar48
Copy link
Author

@raymondware: There is not blog.php...here is single-pin.php and the code is:

ID), 'full'); $imgsrc_full = $imgsrc;
                //exclude animated gif
                if (substr($imgsrc[0], -3) != 'gif' && intval($imgsrc[1]) > 520) {
                    $imgsrc = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'large');
                }
                
                if ($imgsrc[0] == '') {
                    $imgsrc[0] = get_template_directory_uri() . '/img/blank.gif';
                }
                
                $earliest_post_id = get_post_meta($post->ID, "_Earliest Post ID", true);
                $original_post_id = get_post_meta($post->ID, "_Original Post ID", true);
                $photo_source = get_post_meta($post->ID, "_Photo Source", true);
                $photo_source_domain = parse_url($photo_source, PHP_URL_HOST);
                $post_video = ipin_get_post_video($photo_source);
                ?>
                <div id="post-<?php the_ID(); ?>" <?php post_class('post-wrapper'); ?>>
                    <div class="post-top-wrapper">
                        <div class="pull-left">
                            <a href="<?php echo home_url('/' . $wp_rewrite->author_base . '/') . get_the_author_meta('user_nicename'); ?>/">
                            <?php echo get_avatar($post->post_author, '48'); ?>
                            </a>
                        </div>
                        
                        <div class="post-top-wrapper-header">
                            <?php if ($post->post_author != $user_ID) { ?> 
                            <button class="btn pull-right follow ipin-follow<?php if ($followed = ipin_followed(ipin_get_post_board()->parent)) { echo ' disabled'; } ?>" data-board_parent_id="0" data-author_id="<?php echo $post->post_author; ?>" data-board_id="<?php echo ipin_get_post_board()->parent; ?>" type="button"><?php if (!$followed) { _e('Follow', 'ipin'); } else { _e('Unfollow', 'ipin'); } ?></button>
                            <?php } ?>
                            <a href="<?php echo home_url('/' . $wp_rewrite->author_base . '/') . get_the_author_meta('user_nicename'); ?>/">
                                <div itemprop="author" class="post-top-wrapper-author"><?php echo get_the_author_meta('display_name'); ?></div>
                            </a>
                            <?php 
                            if ($original_post_id != '' && $original_post_id != 'deleted') {
                                _e('Repinned', 'ipin');

                            } else {
                                _e('Pinned', 'ipin');
                            }
                            echo ' ' . ipin_human_time_diff(get_post_time('U', true));
                            ?>
                            <time itemprop="datePublished" datetime="<?php the_time('Y'); ?>-<?php the_time('m'); ?>-<?php the_time('d'); ?>"></time>
                        </div>
                    </div>

                    <?php if ($post->post_status == 'publish') { ?>
                    <div class="post-share">
                        <div class="fb-like" data-width="450" data-href="<?php the_permalink(); ?>" data-colorscheme="light" data-layout="button_count" data-action="like" data-show-faces="false" data-send="false"></div>
                        
                        <p></p>
                        
                        <div class="fb-share-button" data-href="<?php the_permalink(); ?>" data-width="75" data-type="button_count"></div>

                        <p></p>
                        
                        <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-text="<?php echo preg_replace('/[\n\r]/', ' ', mb_strimwidth(the_title_attribute('echo=0'), 0, 100, ' ...')); ?>">Tweet</a>
                        
                        <p></p>

                        <div class="g-plusone" data-size="medium" data-href="<?php the_permalink(); ?>"></div>
                        
                        <p></p>
                        
                        <a data-pin-config="beside" href="//pinterest.com/pin/create/button/?url=<?php echo rawurlencode(get_permalink()); ?>&amp;media=<?php echo rawurlencode($imgsrc[0]); ?>&amp;description=<?php echo preg_replace('/[\n\r]/', ' ', rawurlencode(html_entity_decode(mb_strimwidth(the_title_attribute('echo=0'), 0, 255, ' ...'), ENT_QUOTES))); ?>" data-pin-do="buttonPin"><img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" alt="Pinterest Pin It" /></a>
                        
                        <p></p>
                        
                        <a class="post-embed btn btn-mini"><strong>&lt;&gt; <?php _e('Embed', 'ipin'); ?></strong></a>
                        
                        <p></p>
                        
                        <a class="post-email btn btn-mini"><strong>@&nbsp; <?php _e('Email', 'ipin'); ?></strong></a>
                        
                        <p></p>
                        
                        <a class="post-report btn btn-mini"><strong><i class="fa fa-flag"></i>&nbsp; <?php _e('Report', 'ipin'); ?></strong></a>

                        <p></p>                 

                        <button class="post-close btn btn-mini hide"><i class="fa fa-times"></i></button>
                    </div>
                    <?php } ?>
                    
                    <div class="post-top-meta">
                        <div class="pull-left">
                            <div class="post-actionbar">
                                <?php if ($post->post_status == 'publish' && (current_user_can('administrator') || current_user_can('editor') || current_user_can('author') || !is_user_logged_in())) { ?>
                                <a class="ipin-repin btn" 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_status == 'publish' && $post->post_author != $user_ID) { ?> 
                                <button class="ipin-like btn <?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 } if ($post->post_author == $user_ID || current_user_can('edit_others_posts')) { ?>
                                <a class="ipin-edit btn" href="<?php echo home_url('/pins-settings/'); ?>?i=<?php the_ID(); ?>"><?php _e('Edit', 'ipin'); ?></a>
                                <?php } ?>
                                
                                <?php                                   
                                if (!$post_video) {
                                ?>
                                <a class="ipin-zoom btn" href="<?php echo $imgsrc_full[0]; ?>"><i class="fa fa-search-plus"></i> <?php _e('Zoom', 'ipin'); ?></a>
                                <?php } ?>
                            </div>
                        </div>
                        <div class="pull-right">
                            <?php if ($photo_source == '') { ?>
                            <strong><?php _e('Uploaded by user', 'ipin'); ?></strong>
                            <?php 
                            } else { 
                                _e('From', 'ipin'); ?> 
                                <a href="<?php echo $photo_source; ?>" target="_blank"><?php echo $photo_source_domain; ?></a>
                            <?php } ?>
                        </div>
                        
                        <?php
                        if ($post->post_status == 'pending') {
                            echo '<div class="clearfix"></div><span class="label label-warning">' . __('Pending Review', 'ipin') . '</span>';
                        }
                        ?>
                    </div>
                    
                    <div class="clearfix"></div>
                    
                    <?php if (of_get_option('single_pin_above_ad') != '') { ?>
                    <div id="single-pin-above-ad">
                        <?php eval('?>' . of_get_option('single_pin_above_ad')); ?>
                    </div>
                    <?php } ?>
                    
                    <div class="post-featured-photo">
                        <div class="post-nav-next"><?php echo previous_post_link('%link', '<i class="fa fa-chevron-right"></i>', false, ipin_blog_cats()); ?></div>
                        <div class="post-nav-prev"><?php echo next_post_link('%link', '<i class="fa fa-chevron-left"></i>', false, ipin_blog_cats()); ?></div>
    
                    <?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 ($post_video) { ?>
                        <div class="video-embed-wrapper">
                            <?php echo $post_video; ?>
                        </div>
                        <img class="featured-thumb hide" src="<?php echo $imgsrc[0]; ?>" width="<?php echo $imgsrc[1]; ?>" height="<?php echo ($imgsrc[1] > 520) ? (round($imgsrc[1]/$imgsrc[2]*520)) : $imgsrc[2]; ?>" alt="<?php echo mb_strimwidth(the_title_attribute('echo=0'), 0, 255, ' ...') ?>" />
                    <?php } else {  ?>
                        <img class="featured-thumb" src="<?php echo $imgsrc[0]; ?>" width="<?php echo $imgsrc[1]; ?>" height="<?php echo ($imgsrc[1] > 520) ? (round($imgsrc[1]/$imgsrc[2]*520)) : $imgsrc[2]; ?>" alt="<?php echo mb_strimwidth(the_title_attribute('echo=0'), 0, 100, ' ...'); ?>" />
                    <?php } ?>
                    
                    <?php if ($post->post_status == 'publish') { ?>
                        <div class="post-share-horizontal visible-phone">
                            <iframe src="//www.facebook.com/plugins/like.php?href=<?php echo rawurlencode(get_permalink()); ?>&amp;layout=button_count&amp;width=135&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;share=true<?php if (get_option('wsl_settings_Facebook_app_id')) echo '&amp;appId=' . get_option('wsl_settings_Facebook_app_id'); ?>" style="border:none; overflow:hidden; width:135px; height:21px;"></iframe>

                            <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-text="<?php echo preg_replace('/[\n\r]/', ' ', mb_strimwidth(the_title_attribute('echo=0'), 0, 100, ' ...')); ?>">Tweet</a>

                            <div class="g-plusone" data-size="medium" data-href="<?php the_permalink(); ?>"></div>
                            <script>(function() {var po=document.createElement('script');po.type='text/javascript';po.async=true;po.src='https://apis.google.com/js/plusone.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(po,s);})();</script>

                            <a class="pinterest" data-pin-config="beside" href="//pinterest.com/pin/create/button/?url=<?php echo rawurlencode(get_permalink()); ?>&amp;media=<?php echo rawurlencode($imgsrc[0]); ?>&amp;description=<?php echo preg_replace('/[\n\r]/', ' ', rawurlencode(html_entity_decode(mb_strimwidth(the_title_attribute('echo=0'), 0, 100, ' ...'), ENT_QUOTES))); ?>" data-pin-do="buttonPin"><img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" alt="Pinterest Pin It" /></a>
                                                            
                            <a class="post-embed btn btn-mini"><strong>&lt;&gt; <?php _e('Embed', 'ipin'); ?></strong></a>
                            
                            <a class="post-email btn btn-mini"><strong>@&nbsp; <?php _e('Email', 'ipin'); ?></strong></a>
                            
                            <a class="post-report btn btn-mini"><strong><i class="fa fa-flag"></i> <?php _e('Report', 'ipin'); ?></strong></a>
                        </div>
                    </div>
                    <?php } ?>

                    <?php if (of_get_option('single_pin_below_ad') != '') { ?>
                    <div id="single-pin-below-ad">
                        <?php eval('?>' . of_get_option('single_pin_below_ad')); ?>
                    </div>
                    <?php } ?>
                    
                    <?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-content">
                        <?php if (of_get_option('form_title_desc') != 'separate') { ?>                      
                            <?php if (mb_strlen(get_the_title()) < 120) { ?>
                                <h1 itemprop="name" 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 wpautop(preg_replace_callback('/<a[^>]+/', 'ipin_nofollow_callback', get_the_title())); ?></h1>
                            <?php } else { ?>
                                <div itemprop="name" 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 wpautop(preg_replace_callback('/<a[^>]+/', 'ipin_nofollow_callback', get_the_title())); ?></div>
                            <?php } ?>
                        <?php } else { ?>
                                <h1 itemprop="name" class="post-title post-title-large" 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 the_title(); ?></h1>
                        <?php } ?>

                        <?php
                        echo '<div itemprop="description" class="thecontent">' . preg_replace_callback('/<a[^>]+/', 'ipin_nofollow_callback', apply_filters('the_content', get_the_content()))  . '</div>';

                        if ($the_tags) {
                            echo '<div itemprop="keywords" class="thetags">';
                            
                            foreach($the_tags as $the_tag) {
                                echo '<a href="' . get_tag_link($the_tag->term_id). '">' . $the_tag->name . '</a> '; 
                            }
                            
                            echo '</div>';
                        }
                        wp_link_pages( array( 'before' => '<p><strong>' . __('Pages:', 'ipin') . '</strong>', 'after' => '</p>' ) );
                        ?>

                        <?php if ($original_post_id != '' && $original_post_id != 'deleted') { ?>
                            <p class="post-original-author">
                            <?php 
                            $original_postdata = get_post($original_post_id, 'ARRAY_A');
                            $original_author = get_user_by('id', $original_postdata['post_author']);
                            $board = wp_get_post_terms($original_post_id, 'board', array("fields" => "all")); 
                            ?>
                            <?php 
                            if ($board) {
                                _e('Repinned from', 'ipin');
                                ?> 
                                <a href="<?php echo get_term_link($board[0]->slug, 'board'); ?>"><?php echo $board[0]->name; ?></a> 
                                <?php _e('by', 'ipin'); ?> <a href="<?php echo home_url('/' . $wp_rewrite->author_base . '/') . $original_author->user_nicename; ?>/"><?php echo $original_author->display_name; ?></a> 
                            <?php } ?>
                            </p>
                        <?php } ?>
                        
                        <?php 
                            if ($earliest_post_id != '' && $earliest_post_id != 'deleted') { ?>
                            <p class="post-original-author">
                            <?php 
                            $earliest_postdata = get_post($earliest_post_id, 'ARRAY_A');
                            $earliest_author = get_user_by('id', $earliest_postdata['post_author']);
                            $earliest_board = wp_get_post_terms($earliest_post_id, 'board', array("fields" => "all")); 
                            ?>
                            <?php 
                            if ($earliest_board) {
                                _e('Originally pinned onto', 'ipin'); ?> 
                                <a href="<?php echo get_term_link($earliest_board[0]->slug, 'board'); ?>"><?php echo $earliest_board[0]->name; ?></a> 
                                <?php _e('by', 'ipin'); ?> <a href="<?php echo home_url('/' . $wp_rewrite->author_base . '/') . $earliest_author->user_nicename; ?>/"><?php echo $earliest_author->display_name; ?></a>
                            <?php } ?>
                            </p>
                        <?php } ?>
                    </div>
                    
                    <div class="post-comments">
                        <div class="post-comments-wrapper">
                            <?php if ($post->post_status == 'publish') { ?>
                                <?php comments_template(); ?>
                                <?php if (of_get_option('facebook_comments') != 'disable' && comments_open()) { ?>
                                <div class="fb-comments" data-href="<?php the_permalink(); ?>" data-num-posts="5"<?php if (of_get_option('color_scheme') == 'dark') { echo ' data-colorscheme="dark"'; } ?> data-width="100%"></div>
                                <?php } ?>
                            <?php } ?>
                        </div>
                    </div>
                    
                    <?php
                    if (ipin_get_post_board()) {
                    ?>
                    <div class="post-board hide">
                        <div class="post-board-wrapper">
                            <?php if ($post->post_author != $user_ID) { ?>
                            <button class="btn btn-mini pull-right follow ipin-follow<?php if ($followed = ipin_followed(ipin_get_post_board()->term_id)) { echo ' disabled'; } ?>" data-author_id="<?php echo $post->post_author; ?>" data-board_id="<?php echo ipin_get_post_board()->term_id;  ?>" data-board_parent_id="<?php echo ipin_get_post_board()->parent; ?>" type="button"><?php if (!$followed) { _e('Follow', 'ipin'); } else { _e('Unfollow', 'ipin'); } ?></button>
                            <?php } ?>
                            <h4><?php _e('Pinned onto', 'ipin') ?> <?php the_terms($post->ID, 'board', '<span>', ', ', '</span>'); ?></h4>
                            <?php                           
                            $board_id = ipin_get_post_board()->term_id;
                            $board_name = ipin_get_post_board()->name;
                            $board_count = ipin_get_post_board()->count;
                            $board_slug = ipin_get_post_board()->slug;
                            $board_link = get_term_link($board_slug, 'board');
                        
                            $board_thumbnail_ids = $wpdb->get_col($wpdb->prepare(
                                "
                                SELECT v.meta_value
                                FROM $wpdb->postmeta AS v
                                INNER JOIN (                
                                    SELECT object_id
                                    FROM $wpdb->term_taxonomy, $wpdb->term_relationships
                                    WHERE $wpdb->term_taxonomy.term_id = %d
                                    AND $wpdb->term_taxonomy.term_taxonomy_id = $wpdb->term_relationships.term_taxonomy_id
                                    AND $wpdb->term_taxonomy.taxonomy = 'board'
                                    ORDER BY $wpdb->term_relationships.object_id DESC
                                    LIMIT 0, 10
                                    ) AS v2 ON v.post_id = v2.object_id
                                    AND v.meta_key = '_thumbnail_id'
                                ",
                                $board_id
                            ));
                            ?>
                                <a href="<?php echo $board_link; ?>">
                                <?php
                                $post_array = array();
                                foreach ($board_thumbnail_ids as $board_thumbnail_id) {
                                    $board_imgsrc = wp_get_attachment_image_src($board_thumbnail_id, 'thumbnail');
                                    $board_imgsrc = $board_imgsrc[0];
                                    array_unshift($post_array, $board_imgsrc);
                                }

                                $post_array_final = array_fill(0, 10, '');
                                
                                foreach ($post_array as $post_imgsrc) {
                                    array_unshift($post_array_final, $post_imgsrc);
                                    array_pop($post_array_final);
                                }
                                
                                foreach ($post_array_final as $post_final) {
                                    if ($post_final !=='') {
                                        ?>
                                        <div class="post-board-photo">
                                            <img src="<?php echo $post_final; ?>" alt="" />
                                        </div>
                                        <?php
                                    } else {
                                        ?>
                                        <div class="post-board-photo">
                                        </div>
                                        <?php
                                    }
                                }
                                ?>
                                </a>
                        </div>
                        
                        <div class="clearfix"></div>
                    </div>
                    <?php } ?>
                    
                    <?php
                    if (isset($photo_source_domain)) {
                        $loop_domain_args = array(
                            'posts_per_page' => 10,
                            'meta_key' => '_Photo Source Domain',
                            'meta_value' => $photo_source_domain,
                            'post__not_in' => array($post->ID),
                            'meta_query' => array(
                                array(
                                'key' => '_Original Post ID',
                                'compare' => 'NOT EXISTS'
                                )
                            )
                            
                        );
                        
                        $loop_domain = new WP_Query($loop_domain_args);
                        if ($loop_domain->post_count > 0) {
                    ?>
                        <div id="post-board-source" class="post-board hide">
                            <div class="post-board-wrapper">
                                <h4><?php _e('Also from', 'ipin'); ?> <a href="<?php echo home_url('/source/') . $photo_source_domain; ?>/"><?php echo $photo_source_domain; ?></a></h4>
                                    <a href="<?php echo home_url('/source/') . $photo_source_domain; ?>/">
                                    <?php
                                    $post_domain_array = array();
                                    while ($loop_domain->have_posts()) : $loop_domain->the_post();
                                        $domain_imgsrc = wp_get_attachment_image_src(get_post_thumbnail_id($loop_board->ID),'thumbnail');
                                        $domain_imgsrc = $domain_imgsrc[0];
                                        array_unshift($post_domain_array, $domain_imgsrc);
                                    endwhile;
                                    wp_reset_query();
                                    
                                    $post_domain_array_final = array_fill(0, 10, '');
                                    
                                    foreach ($post_domain_array as $post_imgsrc) {
                                        array_unshift($post_domain_array_final, $post_imgsrc);
                                        array_pop($post_domain_array_final);
                                    }
                                    
                                    foreach ($post_domain_array_final as $post_final) {
                                        if ($post_final !=='') {
                                            ?>
                                            <div class="post-board-photo">
                                                <img src="<?php echo $post_final; ?>" alt="" />
                                            </div>
                                            <?php
                                        } else {
                                            ?>
                                            <div class="post-board-photo">
                                            </div>
                                            <?php
                                        }
                                    }
                                    ?>
                                    </a>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    <?php
                        }
                    }
                    
                    $post_likes = get_post_meta($post->ID, "_Likes User ID");
                    $post_likes_count = count($post_likes[0]);
                    if (!empty($post_likes[0])) {
                    $post_likes[0] = array_slice($post_likes[0], -16);
                    ?>
                    <div class="post-likes">
                        <div class="post-likes-wrapper">
                            <h4><?php _e('Likes', 'ipin'); ?></h4>
                            <div class="post-likes-avatar">
                            <?php
                            foreach ($post_likes[0] as $post_like) {
                                $like_author = get_user_by('id', $post_like);
                                ?>
                                <a id="likes-<?php echo $post_like; ?>" href="<?php echo home_url('/' . $wp_rewrite->author_base . '/') . $like_author->user_nicename; ?>/" rel="tooltip" title="<?php echo esc_attr($like_author->display_name); ?>">
                                <?php echo get_avatar($like_author->ID, '48'); ?>
                                </a>
                            <?php 
                            }
                            if ($post_likes_count > 16) {
                            ?>
                                <p class="more-likes"><strong>+<?php echo $post_likes_count - 16 ?></strong> <?php _e('more likes', 'ipin'); ?></p>
                            <?php } ?>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                    
                    <?php
                    $post_repins = get_post_meta($post->ID, "_Repin Post ID");
                    $post_repins_count = count($post_repins[0]);
                    if (!empty($post_repins[0])) {
                    $post_repins[0] = array_slice($post_repins[0], -10);
                    ?>
                    <div id="post-repins">
                        <div class="post-repins-wrapper">
                            <h4><?php _e('Repins', 'ipin'); ?></h4>
                            <ul>
                            <?php
                            foreach ($post_repins[0] as $post_repin) {
                                $repin_postdata = get_post($post_repin, 'ARRAY_A');
                                $repin_author = get_user_by('id', $repin_postdata['post_author']);
                                ?>
                                <li id="repins-<?php echo $post_repin; ?>">
                                <a class="post-repins-avatar pull-left" href="<?php echo home_url('/' . $wp_rewrite->author_base . '/') . $repin_author->user_nicename; ?>/">
                                <?php echo get_avatar($repin_author->ID, '48'); ?>
                                </a> 
                                <div class="post-repins-content">
                                <a href="<?php echo home_url('/' . $wp_rewrite->author_base . '/') . $repin_author->user_nicename; ?>/">
                                <?php echo $repin_author->display_name; ?>
                                </a> 
                                <?php
                                _e('onto', 'ipin');
                                $board = wp_get_post_terms($post_repin, 'board', array("fields" => "all"));
                                echo ' <a href="' . get_term_link($board[0]->slug, 'board') . '">' . $board[0]->name . '</a></div>';
                                ?>
                                </li>
                            <?php 
                            }   
                            if ($post_repins_count > 10) {
                            ?>
                                <li class="more-repins"><strong>+<?php echo $post_repins_count - 10; ?></strong> <?php _e('more repins', 'ipin'); ?></li>
                            <?php } ?>
                            </ul>
                        </div>
                    </div>
                    <?php } ?>
                    
                    <div id="post-zoom-overlay"></div>
                    <div id="post-embed-overlay"></div>
                    <div id="post-email-overlay"></div>
                    <div id="post-report-overlay"></div>
                    
                    <div id="post-fullsize" class="lightbox hide" tabindex="-1" role="dialog" aria-hidden="true">
                        <div class='lightbox-header'>
                            <button type="button" class="close" id="post-fullsize-close" aria-hidden="true">&times;</button>
                        </div>
                        <div class="lightbox-content">
                            <img itemprop="image" src="<?php echo $imgsrc_full[0]; ?>" width="<?php echo $imgsrc_full[1]; ?>" height="<?php echo $imgsrc_full[2]; ?>" alt="<?php echo mb_strimwidth(the_title_attribute('echo=0'), 0, 100, ' ...'); ?>" />
                        </div>
                    </div>
                    
                    <div class="modal hide" id="post-embed-box" tabindex="-1" role="dialog" aria-hidden="true">
                        <div class="modal-header">
                            <button id="post-embed-close" type="button" class="close" aria-hidden="true">x</button>
                            <div><?php _e('Embed Pin on Your Blog', 'ipin'); ?></div>
                        </div>
                        
                        <div class="modal-footer">
                            <?php $size = getimagesize(realpath(str_replace(home_url('/'),'',$imgsrc[0]))); ?>
                            <input type="text" id="embed-width" value="<?php echo $size[0]; ?>" /><span class="help-inline"> <?php _e('px -Image Width', 'ipin'); ?></span>
                            <input type="text" id="embed-height" value="<?php echo $size[1]; ?>" /><span class="help-inline"> <?php _e('px -Image Height', 'ipin'); ?></span>
                            <textarea><div style='padding-bottom: 2px;line-height:0px;'><a href='<?php the_permalink(); ?>' target='_blank'><img src='<?php echo $imgsrc[0]; ?>' border='0' width='<?php echo $size[0]; ?>' height='<?php echo $size[1]; ?>' /></a></div><div style='float:left;padding-top:0px;padding-bottom:0px;'><p style='font-size:10px;color:#76838b;'><?php _e('Source', 'ipin'); ?>: <a style='text-decoration:underline;font-size:10px;color:#76838b;' href='<?php echo $photo_source;  ?>'><?php echo $photo_source_domain; ?></a> <?php _e('via', 'ipin'); ?> <a style='text-decoration:underline;font-size:10px;color:#76838b;' href='<?php echo home_url('/' . $wp_rewrite->author_base . '/') . get_the_author_meta('user_nicename'); ?>' target='_blank'><?php echo get_the_author_meta('display_name'); ?></a> <?php _e('on', 'ipin'); ?> <a style='text-decoration:underline;color:#76838b;' href='<?php echo home_url('/'); ?>' target='_blank'><?php bloginfo('name'); ?></a></p></div></textarea>
                        </div>
                    </div>
                    
                    <div class="modal hide" id="post-email-box" tabindex="-1" role="dialog" aria-hidden="true">
                        <div class="modal-header">
                            <button id="post-email-close" type="button" class="close" aria-hidden="true">x</button>
                            <div><?php _e('Email This Pin', 'ipin'); ?></div>
                        </div>
                        
                        <div class="modal-footer">
                            <input type="text" id="recipient-name" /><span class="help-inline"> <?php _e('Recipient Name', 'ipin'); ?></span>
                            <input type="email" id="recipient-email" /><span class="help-inline"> <?php _e('Recipient Email', 'ipin'); ?></span>
                            <input type="hidden" id="email-post-id" value="<?php echo $post->ID; ?>" />
                            <textarea placeholder="<?php _e('Message (optional)', 'ipin'); ?>"></textarea>
                            <input class="btn btn-primary" type="submit" disabled="disabled" value="<?php _e('Send Email', 'ipin'); ?>" id="post-email-submit" name="post-email-submit">
                            <div class="ajax-loader-email-pin ajax-loader hide"></div>
                        </div>
                    </div>
                    
                    <div class="modal hide" id="post-report-box" tabindex="-1" role="dialog" aria-hidden="true">
                        <div class="modal-header">
                            <button id="post-report-close" type="button" class="close" aria-hidden="true">x</button>
                            <div><?php _e('Report This Pin', 'ipin'); ?></div>
                        </div>
                        
                        <div class="modal-footer">
                            <input type="hidden" id="report-post-id" value="<?php echo $post->ID; ?>" />
                            <textarea placeholder="<?php _e('Please write a little about why you want to report this pin.', 'ipin'); ?>"></textarea>
                            <input class="btn btn-primary" type="submit" disabled="disabled" value="<?php _e('Report Pin', 'ipin'); ?>" id="post-report-submit" name="post-report-submit">
                            <div class="ajax-loader-report-pin ajax-loader hide"></div>
                        </div>
                    </div>
                </div>
                <?php endwhile; ?>
            </div>
            
            <div id="single-right-column" class="span3">
                <?php
                if (!isset($_GET['lightbox'])) {
                    get_sidebar('left');
                }
                ?>
            </div>
        </div>
    </div>

    <div class="span3">
        <?php
        if (!isset($_GET['lightbox'])) {
            get_sidebar('right');
        }
        ?>
    </div>
</div>

@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