/** * This function outputs the post title for Conductor Widgets. */ public function conductor_widget_post_title($post, $instance, $widget, $query) { // Find the post title output element data $priority = $instance['output_elements']['post_title']; $output = $instance['output'][$priority]; do_action('conductor_widget_post_title_before', $post, $instance); ?> <!-- Article Header --> <header class="article-title-wrap"> <?php baton_categories_tags(true); ?> <?php if (strlen(get_the_title()) > 0) { ?> <h1 class="article-title"> <?php // Link post title to post if ($output['link']) { ?> <a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a> <?php // Just output the post title } else { the_title(); } ?> </h1> <?php } ?> </header> <!-- End Article Header --> <?php do_action('conductor_widget_post_title_after', $post, $instance); }
<?php } ?> <!-- Article --> <article id="post-<?php the_ID(); ?> " <?php post_class(esc_attr('content content-' . $post->post_type . ' cf')); ?> > <!-- Article Header --> <header class="article-title-wrap"> <?php baton_categories_tags(); ?> <h1 class="article-title"><?php the_title(); ?> </h1> </header> <!-- End Article Header --> <!-- Article Content --> <div class="article-content cf"> <p class="article-attachment-meta"> <?php $metadata = wp_get_attachment_metadata(); printf('<span class="meta-prep meta-prep-entry-date">Published</span> <span class="entry-date"><time class="entry-date" datetime="%1$s">%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s × %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>.', esc_attr(get_the_date('c')), esc_html(get_the_time(get_option('date_format'))), esc_url(wp_get_attachment_url()), $metadata['width'], $metadata['height'], esc_url(get_permalink($post->post_parent)), esc_attr(strip_tags(get_the_title($post->post_parent))), get_the_title($post->post_parent));