예제 #1
0
    function formatAttribute()
    {
        global $post;
        ?>
        <ul class="post-in">
            <li>
                <?php 
        esc_html_e("Posted In  : ", "charity");
        the_category(" , ");
        $tags = get_tags();
        if (!empty($tags)) {
            the_tags(" , ");
        }
        ?>
            </li>
            <li>
                <a href="<?php 
        comments_link();
        ?>
"><?php 
        comments_number('0 : comment', '1 : comment', '% : comments');
        ?>
</a>
            </li>
        </ul>
        <?php 
    }
 function magnificient_entry_meta()
 {
     echo '<span class="byline author"><a href="' . get_author_posts_url(get_the_author_meta('ID')) . '" rel="author" class="fn">' . get_the_author() . '</a> • </span>';
     echo '<time class="updated" datetime="' . get_the_time('c') . '" pubdate><a href="' . get_permalink() . '">' . get_the_time('F jS, Y') . '</a> • </time>';
     echo '<span class="entry-category">' . the_category('&bull;') . '</span>';
     echo '<span class="entry-tags">' . the_tags(' • ', ' • ', '') . '</span>';
 }
예제 #3
0
 function foundationpress_entry_meta()
 {
     echo '<div class="meta"><time class="updated" datetime="' . get_the_time('c') . '">' . sprintf(__('%s', 'foundationpress'), get_the_date(), get_the_time()) . '</time>';
     echo ' | Published in: ';
     the_category(', ');
     echo '</div>';
 }
예제 #4
0
function blog_page_feed()
{
    $paged = get_query_var('paged', 1);
    $args = array('posts_per_page' => 10, 'paged' => $paged);
    $the_query = new WP_Query($args);
    // TAILOR PAGER BEHAVIOR TO NUMBER OF POSTS
    if ($the_query->found_posts <= 10) {
        $pager_class = 'pager-div-collapse';
    } else {
        $pager_class = 'pager-div';
    }
    if ($the_query->have_posts()) {
        while ($the_query->have_posts()) {
            $the_query->the_post();
            // START THE LOOP
            echo '<div class="blog-feed">';
            echo '<h2><a href="' . get_permalink() . '" class="blog-title">' . get_the_title() . '</a></h2>';
            echo '<p>Posted on ' . get_the_time('F j, Y') . '</p>';
            echo get_the_post_thumbnail();
            echo the_content("Continue reading " . get_the_title());
            echo '<p>Posted in ';
            the_category(', ');
            echo '</p>';
            echo '<hr>';
            echo '</div>';
        }
        echo '<div class="' . $pager_class . '">';
        echo '<h4 class="forward-paging-link">' . get_next_posts_link('More Blog Posts &raquo;', $the_query->max_num_pages) . '</h4>';
        echo '<h4 class="backward-paging-link">' . get_previous_posts_link('&laquo; Previous Blog Posts') . '</h4>';
        echo '</div>';
        wp_reset_postdata();
        //reset
    }
    //END THE LOOP
}
예제 #5
0
    /**
     * Prints HTML with meta information for the current post-date/time and author.
     */
    function totomo_posted_on()
    {
        // Default info will be shown
        $post_format = get_post_format(get_the_ID());
        ?>
	<ul class="post-meta clearfix">
		<li>
			<time class="date fa fa-clock-o" datetime="<?php 
        the_time('c');
        ?>
" pubdate><?php 
        the_time(get_option('date_format'));
        ?>
</time>
		</li>
		<li>
			<?php 
        comments_popup_link(__('No Comments', 'totomo'), __('1 Comment', 'totomo'), __('% Comments', 'totomo'), 'comments-link fa fa-comments');
        ?>
		</li>
		<li class="fa fa-tags">
			<?php 
        the_category(', ');
        ?>
		</li>
	</ul>
	<?php 
    }
예제 #6
0
function the_breadcrumb()
{
    if (!is_home()) {
        echo '<a href="';
        echo get_option('home');
        echo '">';
        echo "<img src=\"";
        echo bloginfo('stylesheet_directory');
        echo "/css/images/breadcrumbs_spinner.png\" style=\"display: block; float: left; margin: 0 10px 0 12px;\" />";
        // bloginfo('name');
        echo "</a> <img src=\"";
        echo bloginfo('stylesheet_directory');
        echo "/css/images/breadcrumbs_separrow.png\" style=\"display: block; float: left; margin: 0 0 0 -2px;\" /> ";
        if (is_category() || is_single()) {
            echo "<ul>";
            the_category('title_li=');
            if (is_single()) {
                echo " » ";
                the_title();
            }
        } elseif (is_page()) {
            echo "<ul><li>";
            echo the_title();
            echo "</li></ul>";
        }
    }
}
예제 #7
0
function post_meta()
{
    ?>
	<ul class="post_meta">
		<li class="date"><?php 
    echo get_the_date();
    ?>
</li>
		<li class="category"><?php 
    the_category(', ');
    ?>
</li>
		<?php 
    $post_tags = wp_get_post_tags($post->ID);
    if (!empty($post_tags)) {
        ?>
				<li class="tags"><?php 
        the_tags('', ', ', '');
        ?>
</li>
			<?php 
    }
    ?>
	</ul><!-- .post-meta -->
<?php 
}
예제 #8
0
파일: functions.php 프로젝트: sykot/wp-bs
function MyBreadcrumb()
{
    if (!is_home()) {
        echo '<li><a href="';
        echo get_option('home');
        echo '/">';
        echo 'Home';
        echo '</a><span class="divider">/</span></li>';
        if (is_category() || is_single()) {
            echo '<li>';
            the_category(', ', '&title_li=');
            echo '<span class="divider">/</span></li>';
            echo '</li>';
            if (is_single()) {
                echo '<li class="active">';
                // the_title();
                echo '</li>';
            }
        } elseif (is_page()) {
            echo '<li class="active">';
            the_title();
            echo '</li>';
        }
    }
}
예제 #9
0
function the_breadcrumb()
{
    echo '<div class="e-breadcrumbs">';
    echo '<a href="';
    echo get_option('home');
    echo '">';
    bloginfo('name');
    echo "</a>";
    if (is_category() || is_single()) {
        echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;";
        the_category(' &bull; ');
        if (is_single()) {
            echo " &nbsp;&nbsp;&#187;&nbsp;&nbsp; ";
            the_title();
        }
    } elseif (is_page()) {
        echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;";
        echo the_title();
    } elseif (is_search()) {
        echo "&nbsp;&nbsp;&#187;&nbsp;&nbsp;Search Results for... ";
        echo '"<em>';
        echo the_search_query();
        echo '</em>"';
    }
    echo '</div>';
}
예제 #10
0
/**
 * Print breadcrumb trail
 *
 *
 */
function smartadapt_the_bredcrumb()
{
    //Get bredcrumb separator
    $sep = smartadapt_option('breadcrumb_separator') ? smartadapt_option('breadcrumb_separator') : ' &raquo; ';
    if (!is_front_page()) {
        echo '<a href="';
        echo home_url();
        echo '">';
        bloginfo('name');
        echo '</a>' . $sep;
        if (is_category() || is_single()) {
            the_category($sep);
        } elseif (is_archive() || is_single()) {
            if (is_day()) {
                printf(__('%s', 'smartadapt'), get_the_date());
            } elseif (is_month()) {
                printf(__('%s', 'smartadapt'), get_the_date(_x('F Y', 'monthly archives date format', 'smartadapt')));
            } elseif (is_year()) {
                printf(__('%s', 'smartadapt'), get_the_date(_x('Y', 'yearly archives date format', 'smartadapt')));
            } else {
                _e('Blog Archives', 'smartadapt');
            }
        }
        if (is_page()) {
            echo the_title();
        }
    }
}
function b_wp_contents_show($options)
{
    //	global $xoopsDB,$xoopsUser;
    //	global $tableoptions,$tableusers;
    //	global $id, $posts, $post, $day, $previousday, $newday;
    $id = 1;
    global $posts, $post, $day, $previousday, $newday;
    global $dateformat, $time_difference, $siteurl, $blogfilename;
    global $tablelinks, $tablelinkcategories;
    global $querystring_start, $querystring_equal, $querystring_separator, $month, $wpdb, $start_of_week;
    global $tableposts, $tablepost2cat, $tablecomments, $tablecategories;
    global $smilies_directory, $use_smilies, $wp_smiliessearch, $wp_smiliesreplace;
    global $wp_bbcode, $use_bbcode, $wp_gmcode, $use_gmcode, $use_htmltrans, $wp_htmltrans, $wp_htmltranswinuni;
    require_once dirname(__FILE__) . '/../wp-blog-header.php';
    $blog = 1;
    $block = array();
    $block['siteurl'] = $siteurl;
    foreach ($posts as $post) {
        $content = array();
        start_wp();
        $content['date'] = the_date('', '<h2>', '</h2>', false);
        $content['time'] = the_time('', false);
        $content['title'] = the_title('', '', false);
        $content['permlink'] = get_permalink();
        //
        ob_start();
        the_author();
        $content['author'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        the_category();
        $content['category'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        the_content();
        $content['body'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        link_pages('<br />Pages: ', '<br />', 'number');
        $content['linkpage'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        comments_popup_link('Comments (0)', 'Comments (1)', 'Comments (%)');
        $content['comments'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        trackback_rdf();
        $content['trackback'] = ob_get_contents();
        ob_end_clean();
        //
        $block['contents'][] = $content;
    }
    return $block;
}
예제 #12
0
 public function post_category($atts)
 {
     ob_start();
     the_category(', ');
     $category = ob_get_contents();
     ob_end_clean();
     return sprintf('<span class="tf_post_category">%s</span>', $category);
 }
예제 #13
0
    function widget($args, $instance)
    {
        extract($args);
        ?>
		<?php 
        echo $before_widget;
        ?>
        <?php 
        if ($instance['title']) {
            echo $before_title . $instance['title'] . $after_title;
        }
        ?>
        <ul class="spy">
		<?php 
        query_posts(array('posts_per_page' => 5, 'orderby' => 'rand', 'caller_get_posts' => 1));
        while (have_posts()) {
            the_post();
            ?>
		<li><?php 
            if (has_post_thumbnail()) {
                ?>
		<div class="img"><?php 
                the_post_thumbnail('thumbnail', array('alt' => trim(strip_tags($post->post_title)), 'title' => trim(strip_tags($post->post_title))));
                ?>
</div><?php 
            }
            ?>
		<h2><a href="<?php 
            the_permalink();
            ?>
" title="<?php 
            the_title();
            ?>
"><?php 
            the_title();
            ?>
</a></h2>
		<div class="fcats"><?php 
            the_category(', ');
            ?>
</div> 
		<div class="fcats"><?php 
            the_time('Y.m.d');
            ?>
</div> 
		</li>
		<?php 
        }
        wp_reset_query();
        ?>
		</ul>
		<?php 
        echo $after_widget;
        ?>

	<?php 
    }
예제 #14
0
 /**
  * Prints HTML with meta information for the current post—date/time and author.
  *
  * @since xjsxj 1.0
  */
 function xjsxj_posted_on()
 {
     printf(__('<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s &nbsp;', 'xjsxj'), 'meta-prep meta-prep-author', sprintf('<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>', get_permalink(), esc_attr(get_the_date()), get_the_time('Y/m/d')), sprintf('<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>', get_author_posts_url(get_the_author_meta('ID')), sprintf(esc_attr__('View all posts by %s', 'xjsxj'), get_the_author()), get_the_author()));
     // added by rocketxujia
     echo __('评论[');
     comments_popup_link('0', '1', '%');
     echo __(']&nbsp;&nbsp;-');
     the_category(', ');
 }
예제 #15
0
function agatha_breadcrumb()
{
    global $post;
    echo '<ul id="trilha">';
    if (!is_home()) {
        echo '<li><a href="';
        echo get_option('home');
        echo '">';
        echo 'Página inicial';
        echo '</a></li><li class="separador"> / </li>';
        if (is_category() || is_single()) {
            echo '<li>';
            the_category(' </li><li class="separador"> / </li><li> ');
            if (is_single()) {
                echo '</li><li class="separador"> / </li><li>';
                the_title();
                echo '</li>';
            }
        } elseif (is_page()) {
            if ($post->post_parent) {
                $anc = get_post_ancestors($post->ID);
                $title = get_the_title();
                foreach ($anc as $ancestor) {
                    $output = '<li><a href="' . get_permalink($ancestor) . '" title="' . get_the_title($ancestor) . '">' . get_the_title($ancestor) . '</a></li> <li class="separador">/</li>';
                }
                echo $output;
                echo '<strong title="' . $title . '"> ' . $title . '</strong>';
            } else {
                echo '<li><strong> ' . get_the_title() . '</strong></li>';
            }
        }
    } elseif (is_tag()) {
        single_tag_title();
    } elseif (is_day()) {
        echo "<li>Arquivo de ";
        the_time('j \\d\\e F \\d\\e Y');
        echo '</li>';
    } elseif (is_month()) {
        echo "<li>Arquivo de ";
        the_time('F \\d\\e Y');
        echo '</li>';
    } elseif (is_year()) {
        echo "<li>Arquivo de ";
        the_time('Y');
        echo '</li>';
    } elseif (is_author()) {
        echo "<li>Arquivo do autor";
        echo '</li>';
    } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
        echo "<li>Arquivo do blog";
        echo '</li>';
    } elseif (is_search()) {
        echo "<li>Resultados da pesquisa";
        echo '</li>';
    }
    echo '</ul>';
}
예제 #16
0
/**
 * @desc Output of  the Category
 * @author Georg Leciejewski
 */
function c_widget_category($args, $number = 1)
{
    $options = get_option('c_widget_category');
    $before_widget = stripslashes($options[$number]['before_widget']);
    $after_widget = stripslashes($options[$number]['after_widget']);
    echo $before_widget;
    the_category();
    echo $after_widget;
}
예제 #17
0
function breadcrumbs()
{
    global $post;
    echo '<ol class="breadcrumb">';
    if (!is_home()) {
        echo '<li><a href="';
        echo get_option('home');
        echo '">';
        echo 'Home';
        echo '</a></li>';
        if (is_category() || is_single()) {
            echo '<li>';
            the_category(' </li><li> ');
            if (is_single()) {
                echo '</li><li>';
                the_title();
                echo '</li>';
            }
        } elseif (is_page()) {
            if ($post->post_parent) {
                $anc = get_post_ancestors($post->ID);
                $title = get_the_title();
                foreach ($anc as $ancestor) {
                    $output = '<li><a href="' . get_permalink($ancestor) . '" title="' . get_the_title($ancestor) . '">' . get_the_title($ancestor) . '</a></li> ';
                }
                echo $output;
                echo '<strong title="' . $title . '"> ' . $title . '</strong>';
            } else {
                echo '<li><strong> ' . get_the_title() . '</strong></li>';
            }
        }
    } elseif (is_tag()) {
        single_tag_title();
    } elseif (is_day()) {
        echo "<li>Archive for ";
        the_time('F jS, Y');
        echo '</li>';
    } elseif (is_month()) {
        echo "<li>Archive for ";
        the_time('F, Y');
        echo '</li>';
    } elseif (is_year()) {
        echo "<li>Archive for ";
        the_time('Y');
        echo '</li>';
    } elseif (is_author()) {
        echo "<li>Author Archive";
        echo '</li>';
    } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
        echo "<li>Blog Archives";
        echo '</li>';
    } elseif (is_search()) {
        echo "<li>Search Results";
        echo '</li>';
    }
    echo '</ol>';
}
예제 #18
0
/**
 * Wp in Progress
 * 
 * @package Wordpress
 * @author WPinProgress
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * It is also available at this URL: http://www.gnu.org/licenses/gpl-3.0.txt
 */
function diarjolite_after_content_function()
{
    if (is_home() || is_category() || is_search() || is_tag() || is_page() && get_post_type() != "page") {
        do_action('diarjolite_excerpt');
        ?>

        <div class="post-info">
            <div class="left"> <?php 
        echo get_the_date('m.d.Y');
        ?>
 </div>
            <div class="right"> <?php 
        the_category(', ');
        ?>
 </div>
        </div>
            
        <div class="clear"></div>

	<?php 
    } else {
        if (is_single()) {
            ?>

    	<div class="line"> <span> <?php 
            echo __("On ", "diarjolite") . get_the_date() . __(" by ", "diarjolite") . get_the_author();
            ?>
 </span> </div>

	<?php 
        }
        the_content();
        echo '<div class="clear"></div>';
        if (get_post_type() == "post") {
            ?>
        <div class="post-info">
            <div class="left"> <?php 
            the_category(', ');
            ?>
 </div>
            <div class="right"> <?php 
            the_tags('Tags: ', ', ', '');
            ?>
  </div>
        </div>
            
        <div class="clear"></div>

    <?php 
        }
    }
    ?>

<?php 
}
예제 #19
0
function wcr_author_loop()
{
    $args = array('author' => get_the_author_meta('ID'), 'orderby' => 'post_date', 'order' => 'DESC', 'posts_per_page' => '10');
    $loop = new WP_Query($args);
    if ($loop->have_posts()) {
        // loop through posts
        while ($loop->have_posts()) {
            $loop->the_post();
            ?>

			<article class="entry" itemprop="blogPost" itemtype="http://schema.org/BlogPosting" itemscope="itemscope">
                <header class="entry-header"> 
                <a href="<?php 
            echo get_permalink();
            ?>
" title="<?php 
            the_title();
            ?>
">
                <h1 itemprop="headline">  <?php 
            the_title();
            ?>
 </h1>
                </a>
                <p class="entry-meta">

				<?php 
            the_time('l, F jS, Y');
            echo ' by ';
            the_author();
            ?>


                </header>
                    <div class="author-blog entry-content">
                  <?php 
            if (has_post_thumbnail()) {
                the_post_thumbnail('medium');
            }
            ?>
                  <?php 
            the_excerpt();
            ?>
                    </div>
                <footer>
                Categories: <?php 
            the_category(', ');
            ?>
                </footer>
            </article>
<?php 
        }
    }
    wp_reset_postdata();
}
예제 #20
0
function the_crumbs()
{
    echo '<nav class="crumbs">现在位置: ';
    echo '<a title="返回首页" href="';
    echo get_settings('home');
    echo '">';
    echo '首页';
    echo "</a>";
    if (is_category()) {
        echo ' &gt; ';
        echo get_category_parents(get_query_var('cat'), true, ' &gt; ');
        echo ' 文章 ';
    }
    if (is_single()) {
        echo ' &gt; ';
        echo the_category(' &gt; ', 'multiple');
        echo ' &gt; ';
        echo ' 正文 ';
    }
    if (is_page()) {
        echo ' &gt; ';
        echo the_title();
    } elseif (is_tag()) {
        echo ' &gt; ';
        single_tag_title();
        echo ' &gt; 文章 ';
    } elseif (is_day()) {
        echo ' &gt; ';
        echo "发表于";
        the_time('Y年m月d日');
        echo '的文章';
    } elseif (is_month()) {
        echo ' &gt; ';
        echo "发表于";
        the_time('Y年m月');
        echo '的文章';
    } elseif (is_year()) {
        echo ' &gt; ';
        echo "发表于";
        the_time('Y年');
        echo '的文章';
    } elseif (is_author()) {
        echo ' &gt; ';
        echo wp_title('');
        echo '发表的文章';
    } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
        echo "Blog Archives";
        echo '';
    } elseif (is_search()) {
        echo ' &gt; ';
        echo "搜索结果";
        echo '';
    }
    echo '</nav>';
}
예제 #21
0
 /**
  * Print HTML with meta information for the current post-date/time and author.
  *
  * @since 2.2.0
  */
 function odin_posted_on()
 {
     if (is_sticky() && is_home() && !is_paged()) {
         echo '<span class="featured-post">' . __('Sticky', 'morfeu') . ' </span>';
     }
     // Set up and print post meta information.
     printf('<span class="entry-date"> <i class="icon-circle glyphicon glyphicon-calendar"></i> <time class="entry-date" datetime="%s">%s</time></span> <i class="icon-circle glyphicon glyphicon-user"></i> <span class="author vcard">' . __('By', 'morfeu') . ' <a class="url fn n" href="%s" rel="author">%s</a></span>', esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author());
     printf(' <i class="icon-circle glyphicon glyphicon-comment"></i>');
     comments_number(__('0 Comments', 'morfeu'), __('1 Comment', 'morfeu'), __('% Comments', 'morfeu'));
     printf(' <i class="icon-circle glyphicon glyphicon-folder-open"></i>');
     the_category(', ');
 }
    function elitepress_post_meta_content()
    {
        ?>
   
	        <!--show date of post-->
			
			<div class="blog-post-info-detail">
				<span class="blog_tags">
						<?php 
        _e('By', 'elitepress');
        ?>
<a href="<?php 
        echo get_author_posts_url(get_the_author_meta('ID'));
        ?>
"><?php 
        the_author_link();
        ?>
</a>
								
						<?php 
        _e('On', 'elitepress');
        ?>
<a href="<?php 
        the_permalink();
        ?>
"><?php 
        echo get_the_date();
        ?>
</a>
								
						<?php 
        $tag_list = get_the_tag_list();
        if (!empty($tag_list)) {
            ?>
						<div class="blog-tags"><?php 
            _e('In', 'elitepress');
            the_tags('', ', ', '');
            ?>
,<?php 
            $cat_list = get_the_category_list();
            if (!empty($cat_list)) {
                the_category(', ');
            }
            ?>
						</div><?php 
        }
        ?>
				</span>
			</div>
			
			
			<?php 
    }
예제 #23
0
    /**
     * Prints HTML with meta information for the current post-date/time and author.
     */
    function courage_posted_on()
    {
        ?>
	<span class="news-date"><?php 
        the_time('m.d.Y');
        ?>
</span> | <span class="news-topic"><?php 
        the_category(', ');
        ?>
</span>
	<?php 
    }
예제 #24
0
    /**
     * Display Blog meta as Author, Date, Category
     */
    function mars_blog_metas()
    {
        ob_start();
        global $post;
        $author = get_the_author_meta('display_name', mars_get_post_authorID($post->ID));
        $category = get_the_category($post->ID);
        the_category(', ');
        return '
			<span class="post-meta"><i class="fa fa-user"></i> <a href="' . get_author_posts_url(get_the_author_meta('ID')) . '">' . $author . '</a> <span class="sep">/</span>
			<i class="fa fa-clock-o"></i> ' . the_date('', '', '', false) . ' <span class="sep">/</span>
			<i class="fa fa-folder-open"></i> ' . ob_get_clean() . '</span>';
    }
function b_wp_contents_show($options)
{
    global $xoopsDB, $xoopsUser, $wpdb, $siteurl;
    global $tableoptions, $tableposts, $tableusers, $tablecategories, $tablecomments, $tablepost2cat;
    global $querystring_start, $querystring_equal, $querystring_separator;
    global $id, $posts, $post, $day, $previousday, $dateformat, $newday;
    require_once dirname(__FILE__) . '/../wp-blog-header.php';
    $blog = 1;
    $block = array();
    $block['siteurl'] = $siteurl;
    foreach ($posts as $post) {
        $content = array();
        start_wp();
        $content['date'] = the_date('', '<h2>', '</h2>', false);
        $content['time'] = the_time('', false);
        $content['title'] = the_title('', '', false);
        $content['permlink'] = get_permalink();
        //
        ob_start();
        the_author();
        $content['author'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        the_category();
        $content['category'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        the_content();
        $content['body'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        link_pages('<br />Pages: ', '<br />', 'number');
        $content['linkpage'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        comments_popup_link('Comments (0)', 'Comments (1)', 'Comments (%)');
        $content['comments'] = ob_get_contents();
        ob_end_clean();
        //
        ob_start();
        trackback_rdf();
        $content['trackback'] = ob_get_contents();
        ob_end_clean();
        //
        $block['contents'][] = $content;
    }
    return $block;
}
예제 #26
0
function CM_breadcrumbs($sep = '/', $label = 'You are here: ')
{
    global $post;
    // If this is front-page (home), output nothing and EXIT
    if (is_front_page()) {
        return;
    }
    // Create a constant for the separator, with space padding.
    $SEP = '  ' . $sep . '  ';
    // Output HTML wrapper and label
    echo '<div class="breadcrumbs">';
    echo '<span class="label">' . $label . '</span>';
    // Output Home link
    echo CM_make_link(get_bloginfo('url'), __('Home', 'CM Starter'), get_bloginfo('name'), true) . $SEP;
    // If this is home (blog)
    if (is_home()) {
        echo 'Blog';
        //Close wrapper and EXIT
        echo '</div>';
        return;
    }
    //If this is an archive
    if (is_archive()) {
        echo 'Archive';
        //Close wrapper and EXIT
        echo '</div>';
        return;
    }
    // If this is a blog entry
    if (is_single()) {
        the_category(', ');
        echo $SEP;
        // If this is a page
    } elseif (is_page()) {
        $parent_id = $post->post_parent;
        $parents = array();
        while ($parent_id) {
            $page = get_page($parent_id);
            $parents[] = CM_make_link(get_permalink($page->ID), get_the_title($page->ID)) . $SEP;
            $parent_id = $page->post_parent;
        }
        $parents = array_reverse($parents);
        foreach ($parents as $parent) {
            echo $parent;
        }
    }
    // Wordpess function that output current post/page title.
    the_title();
    // Close wrapper
    echo '</div>
';
}
예제 #27
0
파일: brew.php 프로젝트: shopline/doxytheme
function custom_breadcrumb()
{
    if (!is_home()) {
        echo '<ol class="breadcrumb">';
        echo '<li><a href="' . get_option('home') . '">Home</a></li>';
        if (is_single()) {
            echo '<li>';
            the_category(', ');
            echo '</li>';
            if (is_single()) {
                echo '<li>';
                the_title();
                echo '</li>';
            }
        } elseif (is_category()) {
            echo '<li>';
            single_cat_title();
            echo '</li>';
        } elseif (is_page()) {
            echo '<li>';
            the_title();
            echo '</li>';
        } elseif (is_tag()) {
            echo '<li>Tag: ';
            single_tag_title();
            echo '</li>';
        } elseif (is_day()) {
            echo '<li>Archive for ';
            the_time('F jS, Y');
            echo '</li>';
        } elseif (is_month()) {
            echo '<li>Archive for ';
            the_time('F, Y');
            echo '</li>';
        } elseif (is_year()) {
            echo '<li>Archive for ';
            the_time('Y');
            echo '</li>';
        } elseif (is_author()) {
            echo '<li>Author Archives';
            echo '</li>';
        } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
            echo '<li>Blog Archives';
            echo '</li>';
        } elseif (is_search()) {
            echo '<li>Search Results';
            echo '</li>';
        }
        echo '</ol>';
    }
}
    function post_meta()
    {
        ?>
            <div class="post-meta">
            <span class="cats"> Category: <?php 
        the_category(', ');
        ?>
</span>
            <?php 
        edit_post_link('| Edit', ' <span class="edit">', '</span>');
        ?>
            </div>
        <?php 
    }
예제 #29
0
/**
 * Wp in Progress
 * 
 * @author WPinProgress
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * It is also available at this URL: http://www.gnu.org/licenses/gpl-3.0.txt
 */
function novalite_before_content_function()
{
    global $post;
    ?>


    <div class="line"> 
    
        <div class="entry-info">
       
            <div class="entry-date"><strong> <?php 
    _e('Posted on:', 'wip');
    ?>
 </strong> <?php 
    echo get_the_date();
    ?>
 <span class="sep">/</span> </div>
            
            <?php 
    if (comments_open() && novalite_setting('wip_view_comments') == "on") {
        ?>

                <div class="entry-comments"> <strong><?php 
        _e('Comments: ', 'wip');
        ?>
</strong>
                    <?php 
        echo comments_number('<a href="' . get_permalink($post->ID) . '#respond">' . __("No comments", "wip") . '</a>', '<a href="' . get_permalink($post->ID) . '#comments">1 ' . __("comment", "wip") . '</a>', '<a href="' . get_permalink($post->ID) . '#comments">% ' . __("comments", "wip") . '</a>');
        ?>

                <span class="sep">/</span> </div> 
            <?php 
    }
    ?>

            
            <div class="entry-standard"> 
            	<strong> <?php 
    _e('Categories: ', 'wip');
    echo the_category(', ');
    ?>
 </strong>
            </div>

        </div>

    </div>
    
<?php 
}
예제 #30
0
파일: functions.php 프로젝트: jlv-code/cjp
function the_breadcrumb()
{
    echo '<a href="', get_option('home'), '">', 'Inicio', "</a>";
    if (is_category() || is_single()) {
        echo " » ";
        the_category(' - ');
        if (is_single()) {
            echo " » ";
            the_title();
        }
    } elseif (is_page()) {
        echo " » ", the_title();
    }
}