Esempio n. 1
0
 /**
  * Prints HTML with meta information for the categories, tags and comments.
  */
 function vtstheme_entry_footer()
 {
     // Hide category and tag text for pages.
     if ('post' === get_post_type()) {
         /* translators: used between list items, there is a space after the comma */
         // $categories_list = get_the_category_list( esc_html__( ', ', 'vtstheme' ) );
         // if ( $categories_list && vtstheme_categorized_blog() && strpos($categories_list,'Uncategorized') === false ) {
         // 	printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', 'vtstheme' ) . '</span>', $categories_list ); // WPCS: XSS OK.
         // }
         /* translators: used between list items, there is a space after the comma */
         // $tags_list = get_the_tag_list( '', esc_html__( ', ', 'vtstheme' ) );
         // if ( $tags_list ) {
         // 	printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', 'vtstheme' ) . '</span>', $tags_list ); // WPCS: XSS OK.
         // }
         the_post_navigation(['prev_text' => '<i class="fa fa-chevron-left"></i>Prev', 'next_text' => 'Next<i class="fa fa-chevron-right"></i>']);
         echo '<a id="share-toggle" class="button secondary share"><i class="fa fa-share"></i> Share</a>';
         naked_social_share_buttons();
     }
     // if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
     // 	echo '<span class="comments-link">';
     // 	comments_popup_link( esc_html__( 'Leave a comment', 'vtstheme' ), esc_html__( '1 Comment', 'vtstheme' ), esc_html__( '% Comments', 'vtstheme' ) );
     // 	echo '</span>';
     // }
     // edit_post_link( esc_html__( 'Edit', 'vtstheme' ), '<span class="edit-link">', '</span>' );
 }
        ?>
			    			</li>
			    			<!-- <li class="comments">
			    				<span class="fa fa-comment-o"></span>
				    			<span><?php 
        // echo get_comments_number();
        ?>
</span>
			    			</li> -->
			    			<li class="share">
			    				<span class="fa fa-share-alt"></span>
			    			</li>
			    		</ul>
				    	<div class="shareBtns">
				    		<?php 
        echo naked_social_share_buttons();
        ?>
				    		<i class="fa fa-caret-down"></i>
				    	</div>
				    </span>
			    </div>
			</div>
		<?php 
    }
} else {
    ?>
		    <p><?php 
    _e('Sorry, no posts matched your criteria.');
    ?>
</p>
		<?php 
Esempio n. 3
0
						</div><!-- end of #author-meta -->

					<?php endif; // no description, no author's meta ?>

				</div><!-- end of .post-entry -->

				<!--?php get_template_part( 'post-data', get_post_type() ); ?-->

				<?php responsive_entry_bottom(); ?>
			</div><!-- end of #post-<?php the_ID(); ?> -->
			<div class="su-row social-share">
				<div class="su-column su-column-size-1-2 tags">
					<?php the_tags('Tags: <br />',' | ') ?>
				</div>
				<div class="su-column su-column-size-1-2 share">
					<?php naked_social_share_buttons(); ?>
				</div>
			</div>
			<?php responsive_entry_after(); ?>
			<?php $orig_post = $post;
				global $post;
				$categories = get_the_category($post->ID);
				if ($categories) {
				$category_ids = array();
				foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
				$args=array(
				'category__in' => $category_ids,
				'post__not_in' => array($post->ID),
				'posts_per_page'=> 2, // Number of related posts that will be shown.
				'caller_get_posts'=>1
				);
 /**
  * Filters the_content
  *
  * Adds the social share buttons below blog posts
  * if we've opted to display them automatically.
  *
  * @param string $content Unfiltered post content
  *
  * @access public
  * @since  1.0.0
  * @return string Content with buttons after it
  */
 public function auto_add_buttons($content)
 {
     // We do not want to automatically add buttons -- bail.
     if (!isset($this->settings['auto_add']) || empty($this->settings['auto_add'])) {
         return $content;
     }
     // Proceed with post type checks.
     global $post;
     $post_type = get_post_type($post);
     // This isn't a post or a page -- bail.
     if ($post_type != 'page' && $post_type != 'post') {
         return $content;
     }
     // This is a page and we haven't specified to add pages -- bail.
     if ($post_type == 'page' && !array_key_exists('pages', $this->settings['auto_add'])) {
         return $content;
     }
     // This is a post in the archive and we haven't specified to
     // add the buttons there -- bail.
     if (!is_single() && $post_type == 'post' && !array_key_exists('blog_archive', $this->settings['auto_add'])) {
         return $content;
     }
     // This is a single post page and we haven't specified to
     // add the buttons there -- bail.
     if (is_single() && $post_type == 'post' && !array_key_exists('blog_single', $this->settings['auto_add'])) {
         return $content;
     }
     // Add the social share buttons after the post content.
     ob_start();
     naked_social_share_buttons();
     return $content . ob_get_clean();
 }