本文整理汇总了PHP中get_the_author_link函数的典型用法代码示例。如果您正苦于以下问题:PHP get_the_author_link函数的具体用法?PHP get_the_author_link怎么用?PHP get_the_author_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_the_author_link函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: widget
function widget($args, $instance)
{
extract($args);
global $wp_query;
/* Our variables from the widget settings. */
$title = apply_filters('widget_title', $instance['title']);
$number = $instance['number'];
$category = $instance['category'];
/* Before widget (defined by themes). */
echo $before_widget;
/* Display the widget title if one was input (before and after defined by themes). */
if ($title) {
echo $before_title . $title . $after_title;
}
if (!$number) {
$number = -1;
}
$blog_posts = new WP_Query(array('post_type' => 'post', 'posts_per_page' => $number, 'category__in' => $category, 'orderby' => 'comment_count', 'order' => 'DESC', 'ignore_sticky_posts' => true));
if ($blog_posts->have_posts()) {
?>
<ul class="most-liked-list most-commented">
<?php
while ($blog_posts->have_posts()) {
$blog_posts->the_post();
$comments_count = wp_count_comments(get_the_ID());
$comments_approved = $comments_count->approved;
$post_author = get_the_author_link();
$post_date = get_the_date();
?>
<li>
<a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a>
<span><?php
printf(__('By %1$s on %2$s', 'hbthemes'), $post_author, $post_date);
?>
</span>
<span class="like-count"><i class="hb-moon-bubbles-7"></i></span>
<a href="<?php
the_permalink();
?>
" class="like-count-num"><?php
echo number_format($comments_approved);
?>
</a>
</li>
<?php
}
?>
</ul>
<?php
}
echo $after_widget;
}
开发者ID:phupx,项目名称:genco,代码行数:58,代码来源:widget-most-commented-posts.php
示例2: widget
function widget($args, $instance)
{
extract($args, EXTR_SKIP);
$instance = wp_parse_args($instance, array('title' => __('Latest Questions', 'dwqa'), 'number' => 5));
echo $before_widget;
echo $before_title;
echo $instance['title'];
echo $after_title;
$args = array('posts_per_page' => $instance['number'], 'order' => 'DESC', 'orderby' => 'post_date', 'post_type' => 'dwqa-question', 'suppress_filters' => false);
$questions = new WP_Query($args);
if ($questions->have_posts()) {
echo '<div class="dwqa-popular-questions">';
echo '<ul>';
while ($questions->have_posts()) {
$questions->the_post();
echo '
<li><a href="' . get_permalink() . '" class="question-title">' . get_the_title() . '</a> ' . __('asked by', 'dwqa') . ' ' . (dwqa_is_anonymous(get_the_ID()) ? __('Anonymous', 'dwqa') : get_the_author_link()) . ', ' . human_time_diff(get_the_time('U'), current_time('timestamp')) . ' ago';
'</li>';
}
echo '</ul>';
echo '</div>';
}
wp_reset_query();
wp_reset_postdata();
echo $after_widget;
}
开发者ID:blogfor,项目名称:king,代码行数:26,代码来源:Latest_Question.php
示例3: shortcode_popular_questions
public function shortcode_popular_questions($atts)
{
extract(shortcode_atts(array('number' => 5, 'title' => __('Popular Questions', 'dwqa')), $atts));
$args = array('posts_per_page' => $number, 'order' => 'DESC', 'orderby' => 'meta_value_num', 'meta_key' => '_dwqa_views', 'post_type' => 'dwqa-question', 'suppress_filters' => false);
$questions = new WP_Query($args);
$html = '';
if ($title) {
$html .= '<h3>';
$html .= $title;
$html .= '</h3>';
}
if ($questions->have_posts()) {
$html .= '<div class="dwqa-popular-questions">';
$html .= '<ul>';
while ($questions->have_posts()) {
$questions->the_post();
$html .= '<li><a href="' . get_permalink() . '" class="question-title">' . get_the_title() . '</a> ' . __('asked by', 'dwqa') . ' ' . get_the_author_link() . '</li>';
}
$html .= '</ul>';
$html .= '</div>';
}
wp_reset_query();
wp_reset_postdata();
return $html;
}
开发者ID:blogfor,项目名称:king,代码行数:25,代码来源:Shortcode.php
示例4: widget
function widget($args, $instance)
{
extract($args, EXTR_SKIP);
$instance = wp_parse_args($instance, array('title' => __('Closed Questions', 'dwqa'), 'number' => 5));
echo $before_widget;
echo $before_title;
echo $instance['title'];
echo $after_title;
$args = array('post_type' => 'dwqa-question', 'meta_query' => array('relation' => 'OR', array('key' => '_dwqa_status', 'compare' => '=', 'value' => 'resolved'), array('key' => '_dwqa_status', 'compare' => '=', 'value' => 'closed')));
$questions = new WP_Query($args);
if ($questions->have_posts()) {
echo '<div class="dwqa-popular-questions">';
echo '<ul>';
while ($questions->have_posts()) {
$questions->the_post();
echo '
<li><a href="' . get_permalink() . '" class="question-title">' . get_the_title() . '</a> ' . __('asked by', 'dwqa') . ' ' . get_the_author_link();
'</li>';
}
echo '</ul>';
echo '</div>';
}
wp_reset_query();
wp_reset_postdata();
echo $after_widget;
}
开发者ID:Korotkin-Solutions,项目名称:dw-question-answer,代码行数:26,代码来源:list-closed-question.php
示例5: appletree_post_meta
/**
* Displays meta information for a post
* @return void
*/
function appletree_post_meta()
{
if (get_post_type() == 'post') {
echo sprintf(__('Posted %s in %s%s by %s. ', 'appletreesg.com'), get_the_time(get_option('date_format')), get_the_category_list(', '), get_the_tag_list(__(', <b>Tags</b>: ', 'appletreesg.com'), ', '), get_the_author_link());
}
edit_post_link(__(' (edit)', 'appletreesg.com'), '<span class="edit-link">', '</span>');
}
开发者ID:scarecrow2003,项目名称:appletree,代码行数:11,代码来源:functions.php
示例6: theme_latest_news
function theme_latest_news($atts, $content)
{
global $themename;
extract(shortcode_atts(array("count" => 2, "category" => "", "order" => "DESC"), $atts));
query_posts(array('post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => $count, 'cat' => $category, 'order' => $order));
$output = '<ul class="blog clearfix">';
if (have_posts()) {
while (have_posts()) {
the_post();
$post_classes = get_post_class("post");
$output .= '<li class="';
foreach ($post_classes as $key => $post_class) {
$output .= $post_class . ($key + 1 < count($post_classes) ? ' ' : '');
}
$output .= '">
<div class="comment_box">
<div class="first_row">
' . get_the_time("d") . '<span class="second_row">' . strtoupper(get_the_time("M")) . '</span>
</div>';
$comments_count = get_comments_number();
$output .= ' <a class="comments_number" href="' . get_comments_link() . '" title="' . $comments_count . ($comments_count == 1 ? ' ' . __('Comment', $themename) : ' ' . __('Comments', $themename)) . '">' . $comments_count . ($comments_count == 1 ? ' ' . __('Comment', $themename) : ' ' . __('Comments', $themename)) . '</a>
</div>
<div class="post_content">';
if (has_post_thumbnail()) {
$output .= '<a class="post_image" href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_post_thumbnail(get_the_ID(), "blog-post-thumb", array("alt" => get_the_title(), "title" => "")) . '</a>';
}
$output .= ' <h2>
<a href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_title() . '</a>
</h2>
<div class="text">
' . apply_filters('the_excerpt', get_the_excerpt()) . '
</div>
<div class="post_footer">
<ul class="categories">
<li class="posted_by">' . __('Posted by', $themename) . ' <a class="author" href="' . get_the_author_link() . '" title="' . get_the_author() . '">' . get_the_author() . '</a></li>';
$categories = get_the_category();
foreach ($categories as $key => $category) {
$output .= '<li>
<a href="' . get_category_link($category->term_id) . '" ';
if (empty($category->description)) {
$output .= 'title="' . sprintf(__('View all posts filed under %s', $themename), $category->name) . '"';
} else {
$output .= 'title="' . esc_attr(strip_tags(apply_filters('category_description', $category->description, $category))) . '"';
}
$output .= '>' . $category->name . '</a>
</li>';
}
$output .= ' </ul>
<a class="more icon_small_arrow margin_right_white" href="' . get_permalink() . '" title="' . __("More", $themename) . '">' . __("More", $themename) . '</a>
</div>
</div>
</li>';
}
}
$output .= '</ul>';
//Reset Query
wp_reset_query();
return $output;
}
开发者ID:DarussalamTech,项目名称:aims_prj,代码行数:59,代码来源:latest_news.php
示例7: uppsite_get_member
function uppsite_get_member()
{
$avatar = null;
if (function_exists('get_the_author_meta')) {
$avatar = get_avatar(get_the_author_meta('user_email'));
} elseif (function_exists('get_the_author_id')) {
$avatar = get_avatar(get_the_author_id());
}
return array('name' => get_the_author(), 'link' => get_the_author_link(), 'avatar' => uppsite_extract_src_url($avatar));
}
开发者ID:alpual,项目名称:Caitlin-Sabo,代码行数:10,代码来源:functions.php
示例8: hook_after_post_content
public function hook_after_post_content($content)
{
if (is_single()) {
$content .= '
<div class="focuswarp">
<div class="focusavatar">
' . get_avatar(get_the_author_email(), '80') . '
</div>
<div class="focustext">
<h4>Author: <span>' . get_the_author_link('display_name', get_query_var('author')) . '</span></h4>' . get_the_author_meta('description', get_query_var('author')) . '
</div>';
$content .= '
<div class="focus-social">
';
if (get_the_author_meta('twitter', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('twitter')) . '" target="_blank"><i class="fa fa-twitter fa-lg"></i> Twitter</a> ';
}
if (get_the_author_meta('facebook', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('facebook')) . '" target="_blank"><i class="fa fa-facebook fa-lg"></i> Facebook</a> ';
}
if (get_the_author_meta('gplus', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('gplus')) . '" target="_blank"><i class="fa fa-google-plus fa-lg"></i> Google+</a> ';
}
if (get_the_author_meta('linkedin', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('linkedin')) . '" target="_blank"><i class="fa fa-linkedin fa-lg"></i> Linkedin</a> ';
}
if (get_the_author_meta('dribbble', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('dribbble')) . '" target="_blank"><i class="fa fa-dribbble fa-lg"></i> Dribbble</a> ';
}
if (get_the_author_meta('github', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('github')) . '" target="_blank"><i class="fa fa-github fa-lg"></i> Github</a>';
}
if (get_the_author_meta('youtube', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('youtube')) . '" target="_blank"><i class="fa fa-youtube fa-lg"></i> Youtube</a>';
}
if (get_the_author_meta('pinterest', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('pinterest')) . '" target="_blank"><i class="fa fa-pinterest-square fa-lg"></i> Pinterest</a>';
}
if (get_the_author_meta('instagram', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('instagram')) . '" target="_blank"><i class="fa fa-instagram fa-lg"></i> Instagram</a>';
}
if (get_the_author_meta('vimeo', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('vimeo')) . '" target="_blank"><i class="fa fa-vimeo-square fa-lg"></i> vimeo</a>';
}
if (get_the_author_meta('skype', get_query_var('author'))) {
$content .= '<a href="' . esc_url(get_the_author_meta('skype')) . '" target="_blank"><i class="fa fa-skype fa-lg"></i> Skype</a>';
}
$content .= '
</div>
</div>';
}
return $content;
}
开发者ID:TanvirAmi,项目名称:Focus-Author-Bio,代码行数:53,代码来源:focus_author_hook.php
示例9: createPageObject
public static function createPageObject($getComments = false, $postObject = null)
{
global $post;
if ($postObject != null) {
setup_postdata($postObject);
}
$params = array('pageLink' => get_page_link(), 'post_title' => get_the_title(), 'time' => get_the_time(), 'post_content' => apply_filters('the_content', get_the_content()), 'post_excerpt' => get_the_excerpt(), 'post_author' => get_the_author(), 'author_link' => get_the_author_link(), 'thumbnails' => self::getThumbnails($post), 'pageUri' => get_page_uri($post), 'comments' => '');
if ($getComments != false) {
$params['comments'] = self::getComments($post->ID);
}
$post_object_var = get_object_vars($post);
$post_params = $params + $post_object_var;
return new Page($post_params);
}
开发者ID:laiello,项目名称:cootheme2,代码行数:14,代码来源:PageDataHelper.php
示例10: lady_B_post_header
/**
* Prints HTML with header, title and meta information for the current post.
*
*/
function lady_B_post_header($showDate = true)
{
$mh2 = sprintf('<h2><a href="%s">%s</a></h2>', esc_url(get_the_permalink()), esc_attr(get_the_title()));
$mauthor = sprintf('<span class="posted">By %s</span>', get_the_author_link());
$mdate = "";
if ($showDate) {
$mdate = sprintf('<span class="date"><a href="%s">%s</a></span>', esc_url(get_the_permalink()), esc_html(get_the_time("F jS, Y")));
}
$postClass = get_post_class();
$mClass = "";
foreach ($postClass as $class) {
$mClass .= $class . " ";
}
print "<article> <!--new post --><header class='" . $mClass . "'>" . $mh2 . "<p>" . $mauthor . $mdate . "</p></header><div class='entry'>";
}
开发者ID:pmarki,项目名称:lady_B-wordpress,代码行数:19,代码来源:template-parts.php
示例11: createPostObject
public static function createPostObject($getComments = false, $postObject = null)
{
global $post;
if ($postObject != null) {
setup_postdata($postObject);
}
$tags = get_the_tags();
$categories = get_the_category();
$params = array('permalink' => get_permalink(), 'post_title' => get_the_title(), 'time' => get_the_time(), 'post_content' => self::getTheContent(), 'post_excerpt' => get_the_excerpt(), 'post_author' => get_the_author(), 'author_link' => get_the_author_link(), 'tags' => self::getTags($tags), 'categories' => self::getCategories($categories), 'thumbnails' => self::getThumbnails($post), 'comments' => '');
if ($getComments != false) {
$params['comments'] = self::getComments($post->ID);
}
$post_object_var = get_object_vars($post);
$post_params = $params + $post_object_var;
//echo '<pre>';
//print_r($post_params);
//echo '</pre>';
//exit();
return new Post($post_params);
}
开发者ID:laiello,项目名称:cootheme2,代码行数:20,代码来源:PostDataHelper.php
示例12: blog_shortcode
function blog_shortcode($atts, $content = null, $code)
{
global $wp_filter;
$the_content_filter_backup = $wp_filter['the_content'];
extract(shortcode_atts(array('max' => 3, 'meta' => ''), $atts));
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$query = array('post_type' => 'post', 'posts_per_page' => $max, 'paged' => $paged);
query_posts($query);
while (have_posts()) {
the_post();
$output .= '<div class="blog_post">';
$output .= '<h2><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>';
if ($meta == "true") {
$output .= '<div class="metaInfo">Posted By ';
$output .= get_the_author_link();
$output .= ' / ';
$output .= get_the_time('F, j, Y');
$output .= ' / <a href="';
$output .= get_comments_link();
$output .= '">';
$output .= get_comments_number('0', '1', '%');
$output .= ' comments</a></div>';
}
if (has_post_thumbnail()) {
$output .= '<div class="portfolio_thumbnail">';
$thumb = get_post_thumbnail_id();
$image = vt_resize($thumb, '', 530, 280, true, 70);
$output .= '<a href="' . get_permalink() . '"><img src="' . $image[url] . '" width="' . $image[width] . '" height="' . $image[height] . '" alt="' . $lbtitle . '" /></a>';
$output .= '</div>';
}
$output .= apply_filters('the_content', get_the_content());
$output .= '</div>';
}
ob_start();
wp_pagenavi();
$output .= ob_get_clean();
wp_reset_query();
$wp_filter['the_content'] = $the_content_filter_backup;
return $output;
}
开发者ID:sajidsan,项目名称:sajidsan.github.io,代码行数:40,代码来源:shortcodes.php
示例13: getPost
private static function getPost($dateFormat = false, $customFields = array())
{
if (!$dateFormat) {
$dateFormat = get_option('date_format');
}
$tags = get_the_tags();
$categories = get_the_category();
$post = array('permalink' => get_permalink(), 'title' => get_the_title(), 'time' => get_the_time($dateFormat), 'content' => self::getTheFilteredContentFromLoop(), 'excerpt' => get_the_excerpt(), 'author' => get_the_author(), 'author_link' => get_the_author_link(), 'the_tags' => self::getTagsAsArray($tags), 'the_categories' => self::getCategoriesAsArray($categories));
if (!$tags) {
$post['has_tags'] = false;
} else {
$post['has_tags'] = true;
}
if (!$categories) {
$post['has_categories'] = false;
} else {
$post['has_categories'] = true;
}
$post = self::addCustomFieldsToPost($customFields, $post);
$post = self::addThumbnailsToPost($post);
return $post;
}
开发者ID:zakirsajib,项目名称:Chester-WordPress-MVC-Theme-Framework,代码行数:22,代码来源:wp_core_data_helpers.php
示例14: widget
function widget($args, $instance)
{
extract($args, EXTR_SKIP);
$instance = wp_parse_args($instance, array('title' => __('Popular Questions', 'dwqa'), 'number' => 5));
echo $before_widget;
echo $before_title;
echo $instance['title'];
echo $after_title;
$args = array('posts_per_page' => $instance['number'], 'order' => 'DESC', 'orderby' => 'meta_value_num', 'meta_key' => '_dwqa_views', 'post_type' => 'dwqa-question', 'suppress_filters' => false);
$questions = new WP_Query($args);
if ($questions->have_posts()) {
echo '<div class="dwqa-popular-questions">';
echo '<ul>';
while ($questions->have_posts()) {
$questions->the_post();
echo '<li><a href="' . get_permalink() . '" class="question-title">' . get_the_title() . '</a> ' . __('asked by', 'dwqa') . ' ' . get_the_author_link() . '</li>';
}
echo '</ul>';
echo '</div>';
}
wp_reset_query();
wp_reset_postdata();
echo $after_widget;
}
开发者ID:douglaswebdesigns,项目名称:ask-bio-expert,代码行数:24,代码来源:popular-question.php
示例15: content
protected function content($atts, $content = null)
{
$options = get_option('sf_dante_options');
$title = $category = $item_class = $excerpt_length = $width = $offset = $el_class = $output = $filter = $items = $el_position = $item_count = '';
extract(shortcode_atts(array('title' => '', 'show_title' => 'yes', 'show_excerpt' => 'yes', "excerpt_length" => '20', "item_count" => '12', "show_details" => 'yes', "offset" => '0', "posts_order" => 'ASC', "category" => 'all', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
// CATEGORY SLUG MODIFICATION
if ($category == "All") {
$category = "all";
}
if ($category == "all") {
$category = '';
}
$category_slug = str_replace('_', '-', $category);
global $post, $wp_query, $sf_carouselID;
if ($sf_carouselID == "") {
$sf_carouselID = 1;
} else {
$sf_carouselID++;
}
$blog_args = array('post_type' => 'post', 'post_status' => 'publish', 'no_found_rows' => 1, 'category_name' => $category_slug, 'posts_per_page' => $item_count, 'offset' => $offset, 'order' => $posts_order);
$blog_items = new WP_Query($blog_args);
$count = $columns = 0;
$sidebar_config = sf_get_post_meta(get_the_ID(), 'sf_sidebar_config', true);
if (is_singular('portfolio')) {
$sidebar_config = "no-sidebars";
}
if ($sidebar_config == "left-sidebar" || $sidebar_config == "right-sidebar") {
$item_class = 'span2';
} else {
if ($sidebar_config == "both-sidebars") {
$item_class = 'span-bs-quarter';
} else {
$item_class = 'span3';
}
}
if ($width == "1/4") {
$columns = 1;
} else {
if ($width == "1/2") {
$columns = 2;
} else {
if ($width == "3/4") {
$columns = 3;
} else {
$columns = 4;
}
}
}
$items .= '<div class="carousel-wrap">';
$items .= '<div id="carousel-' . $sf_carouselID . '" class="blog-items carousel-items clearfix" data-columns="' . $columns . '">';
while ($blog_items->have_posts()) {
$blog_items->the_post();
$item_title = get_the_title();
$post_author = get_the_author_link();
$post_date = get_the_date();
$post_comments = get_comments_number();
$post_category = get_the_category();
$thumb_type = sf_get_post_meta($post->ID, 'sf_thumbnail_type', true);
$thumb_image = rwmb_meta('sf_thumbnail_image', 'type=image&size=full');
$thumb_video = sf_get_post_meta($post->ID, 'sf_thumbnail_video_url', true);
$thumb_gallery = rwmb_meta('sf_thumbnail_gallery', 'type=image&size=thumb-image');
$thumb_link_type = sf_get_post_meta($post->ID, 'sf_thumbnail_link_type', true);
$thumb_link_url = sf_get_post_meta($post->ID, 'sf_thumbnail_link_url', true);
$thumb_lightbox_thumb = rwmb_meta('sf_thumbnail_image', 'type=image&size=large');
$thumb_lightbox_image = rwmb_meta('sf_thumbnail_link_image', 'type=image&size=large');
$thumb_lightbox_video_url = sf_get_post_meta($post->ID, 'sf_thumbnail_link_video_url', true);
$thumb_lightbox_video_url = sf_get_embed_src($thumb_lightbox_video_url);
foreach ($thumb_image as $detail_image) {
$thumb_img_url = $detail_image['url'];
break;
}
if (!$thumb_image) {
$thumb_image = get_post_thumbnail_id();
$thumb_img_url = wp_get_attachment_url($thumb_image, 'full');
}
$thumb_lightbox_img_url = wp_get_attachment_url($thumb_lightbox_image, 'full');
$item_title = get_the_title();
$post_permalink = get_permalink();
$custom_excerpt = sf_get_post_meta($post->ID, 'sf_custom_excerpt', true);
$post_excerpt = '';
if ($custom_excerpt != '') {
$post_excerpt = sf_custom_excerpt($custom_excerpt, $excerpt_length);
} else {
$post_excerpt = sf_excerpt($excerpt_length);
}
if ($thumb_link_type == "link_to_url") {
$link_config = 'href="' . $thumb_link_url . '" class="link-to-url"';
$item_icon = "ss-link";
} else {
if ($thumb_link_type == "link_to_url_nw") {
$link_config = 'href="' . $thumb_link_url . '" class="link-to-url" target="_blank"';
$item_icon = "ss-link";
} else {
if ($thumb_link_type == "lightbox_thumb") {
$link_config = 'href="' . $thumb_img_url . '" class="lightbox" data-rel="ilightbox[' . $post_ID . ']"';
$item_icon = "ss-view";
} else {
if ($thumb_link_type == "lightbox_image") {
$lightbox_image_url = '';
foreach ($thumb_lightbox_image as $image) {
//.........这里部分代码省略.........
开发者ID:VeritasStrategies,项目名称:Poplin,代码行数:101,代码来源:posts-carousel.php
示例16: get_permalink
if (!is_singular()) {
echo '<a href="' . get_permalink() . '">';
}
the_title();
if (!is_singular()) {
echo '</a>';
}
?>
</<?php
echo $heading;
?>
>
<div class="post-meta post-pad-left">
<?php
echo sprintf(__('Posted at %1$s on %2$s by %3$s', 'agency'), get_the_time(get_option('time_format')), get_the_time(get_option('date_format')), get_the_author_link());
?>
</div>
<div class="post-pad-left clearfix">
<?php
the_content();
?>
</div>
</article>
<?php
if (comments_open() && !post_password_required()) {
comments_template();
}
开发者ID:kamleshcropin,项目名称:Agency-Theme,代码行数:31,代码来源:content.php
示例17: the_post
global $sf_has_gallery;
$sf_has_gallery = true;
$same_category_navigation = false;
if (isset($options['same_category_navigation'])) {
$same_category_navigation = $options['same_category_navigation'];
}
?>
<?php
if (have_posts()) {
the_post();
?>
<?php
$post_author = get_the_author_link();
$post_date = get_the_date();
$post_categories = get_the_category_list(', ');
$figure = $main_slider = $thumb_slider = "";
$gallery_images = rwmb_meta('sf_gallery_images', 'type=image&size=full-width-image-gallery');
$thumb_images = rwmb_meta('sf_gallery_images', 'type=image&size=thumb-square');
$figure .= '<div class="spb_gallery_widget">';
$main_slider .= '<div class="flexslider gallery-slider" data-transition="slide"><ul class="slides">' . "\n";
foreach ($gallery_images as $image) {
$main_slider .= "<li><a href='{$image['url']}' class='view' rel='gallery-{$post->ID}'><img src='{$image['url']}' width='{$image['width']}' height='{$image['height']}' alt='{$image['alt']}' /></a>" . "\n";
if ($image['caption'] != "") {
$main_slider .= '<p class="flex-caption">' . $image['caption'] . '</p>';
}
$main_slider .= "</li>" . "\n";
}
$main_slider .= '</ul></div>' . "\n";
开发者ID:EmmaTope,项目名称:SolidSteps,代码行数:31,代码来源:single-galleries.php
示例18: the_title
?>
<?php
the_title();
?>
<?php
}
?>
</h2>
<ul class="post-meta">
<?php
$twitter_account = get_the_author_meta('twitter');
$twitter_link = !empty($twitter_account) ? ' <a class="twitter-link" href="http://twitter.com/' . $twitter_account . '"><span class="fa fa-twitter"></span>' . $twitter_account . '</a>' : '';
?>
<li class="post-meta-author"><?php
printf(__('By %s', 'willow'), get_the_author_link() . $twitter_link);
?>
</li>
<li class="post-meta-date"><?php
echo get_the_date();
?>
</li>
<li class="post-meta-category"><?php
the_category(',');
?>
</li>
</ul>
<div class="post-content">
<?php
ob_start();
开发者ID:GaryJones,项目名称:m2xdemo,代码行数:31,代码来源:loop.php
示例19: get_the_author_link
?>
<?php
}
?>
<div class="post-body <?php
if (!get_the_post_thumbnail()) {
?>
no-thumbnail<?php
}
?>
">
<div class="post-meta">
<div class="post-meta-author">
<a href="<?php
echo get_the_author_link();
?>
"><?php
the_author();
?>
</a>
</div><!-- /.post-meta-author -->
<div class="post-date">
<?php
echo get_the_date();
?>
</div><!-- /.post-date -->
<div class="post-comments">
<?php
开发者ID:jhonrsalcedo,项目名称:sitio,代码行数:31,代码来源:content.php
示例20: the_ID
<article id="post-<?php
the_ID();
?>
" <?php
post_class('cf');
?>
role="article">
<header class="article-header">
<h1 class="single-title custom-post-type-title"><?php
the_title();
?>
</h1>
<p class="byline vcard"><?php
printf(__('Posted <time class="updated" datetime="%1$s" itemprop="datePublished">%2$s</time> by <span class="author">%3$s</span> <span class="amp">&</span> filed under %4$s.', 'wp_mattiana_theme'), get_the_time('Y-m-j'), get_the_time(get_option('date_format')), get_the_author_link(get_the_author_meta('ID')), get_the_term_list($post->ID, 'custom_cat', ' ', ', ', ''));
?>
</p>
</header>
<section class="entry-content cf">
<?php
// the content (pretty self explanatory huh)
the_content();
/*
* Link Pages is used in case you have posts that are set to break into
* multiple pages. You can remove this if you don't plan on doing that.
*
* Also, breaking content up into multiple pages is a horrible experience,
* so don't do it. While there are SOME edge cases where this is useful, it's
开发者ID:steeren,项目名称:wp-mattiana,代码行数:31,代码来源:single-custom_type.php
注:本文中的get_the_author_link函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论