This is a PRIVATE forum for verified users only, to view all replies/answers, you must be logged in!
Status: resolved
Viewing 11 reply threads
- AuthorPosts
- October 6, 2015 at 2:43 pm #11627
https://goo.gl/photos/co4Tgb5tqMaBdo8J9
How do I do this? - October 7, 2015 at 5:31 pm #11660
Hey there, You must be logged in to view this reply!
- October 8, 2015 at 12:35 am #11673
What code? You mean the post_meta.php?
- October 9, 2015 at 6:32 pm #11710
Hey there, You must be logged in to view this reply!
- October 17, 2015 at 9:33 pm #11742
So this code?
</span> <span class="byline"> <span class="author vcard"> <a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author"> <?php echo esc_html( get_the_author() ); ?> </a> </span> </span>
How does it has to look?
like this?
</span> <span class="author vcard"> <a>" rel="author"> <span class="byline"> <?php echo esc_html( get_the_author() ); ?> </a> </span> </span>
- This reply was modified 6 y, 7 mo by
Erick.
- This reply was modified 6 y, 7 mo by
Erick.
- This reply was modified 6 y, 7 mo by
- October 18, 2015 at 7:22 pm #11765
Hey there, You must be logged in to view this reply!
- November 2, 2015 at 10:10 pm #11897
Here you go
<?php /** * @package wpthms */ $format = get_post_format(); if( false === $format ) $format = 'standard'; $formats_meta = yt_get_post_formats_meta( get_the_ID()); /** *Quote format */ $quote_author = !empty( $formats_meta['_format_quote_source_name'] ) ? '<cite class="entry-format-meta margin-bottom-30">' . $formats_meta['_format_quote_source_name'] . '</cite>' : ''; $quote_author = !empty( $formats_meta['_format_quote_source_url'] ) ? sprintf( '<cite class="entry-format-meta margin-bottom-30"><a href="%s">%s</a></cite>', $formats_meta['_format_quote_source_url'], $formats_meta['_format_quote_source_name'] ) : $quote_author; /** *Link format */ $share_url = !empty( $formats_meta['_format_link_url'] ) ? $formats_meta['_format_link_url'] : get_permalink( get_the_ID() ); //print_r($formats_meta); $share_url_text = !empty( $formats_meta['_format_link_url'] ) ? sprintf( '<p class="entry-format-meta margin-bottom-30">%s <a href="%s">#</a></p>', $formats_meta['_format_link_url'], get_permalink( get_the_ID() ) ) : ''; /** *Extra class for entry title */ $entry_title_class = ' margin-bottom-30'; if( 'quote' === $format && $quote_author || 'link' === $format && $share_url_text ){ $entry_title_class = ''; } $entry_title = get_the_title( get_the_ID() ); if( 'link' === $format && $share_url_text ){ $entry_title = sprintf('<a href="%s" title="%s" target="_blank" rel="external" class="secondary-2-primary">%s</a>', $share_url, get_the_title( get_the_ID() ), get_the_title( get_the_ID() ) ); } $feature_image = yt_get_options('blog_single_post_featured_image'); ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php do_action( 'yt_before_single_post_entry_header' );?> <header class="entry-header"> <?php do_action( 'yt_single_post_entry_header_start' );?> <h1 class="entry-title <?php echo $entry_title_class; ?>"><?php echo $entry_title; ?></h1> <?php echo do_shortcode("[mashshare]"); ?> <?php echo 'quote' === $format ? $quote_author : '';?> <?php echo 'link' === $format ? $share_url_text : '';?> <?php if( 'hide' !== yt_get_options( 'blog_post_meta_info_mode' )): ?> <div class="entry-meta margin-bottom-30 hidden-print" style="display:none"> <span class="posted-on"> <?php $time_string = '<time class="entry-date published ' . ( get_the_time( 'U' ) == get_the_modified_time( 'U' ) ? 'updated' : '' ) . 'pull-left" datetime="%1$s">%2$s</time>'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) $time_string .= '<time class="updated hidden" datetime="%3$s">%4$s</time>'; $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); echo $time_string; ?> </span> <span class="byline"> <span class="author vcard"> <a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author"> <?php echo esc_html( get_the_author() ); ?> </a> </span> </span> </div><!-- .entry-meta --> <?php endif?> <?php do_action( 'yt_single_post_entry_header_end' );?> </header><!-- .entry-header --> <?php do_action( 'yt_before_single_post_entry_content' );?> <div class="entry-content"> <?php do_action( 'yt_single_post_entry_content_start' );?> <?php /*Standard*/ if( in_array( $format, array( 'standard', 'quote', 'link' ) ) ){ if ( 'show' == $feature_image && has_post_thumbnail() && ! post_password_required() && !get_post_meta( $post->ID, 'yt_hide_single_post_thumbnail', true ) ) : ?> <p class="entry-thumbnail margin-bottom-30"> <?php the_post_thumbnail( ''); ?> <?php if( ($thumb_excerpt = yt_get_thumbnail_meta( get_post_thumbnail_id( get_the_ID() ), 'post_excerpt' )) ){ echo '<span class="entry-caption thumbnail-caption">' . $thumb_excerpt . '</span>'; } //echo yt_get_post_thumbnail_meta( get_the_ID(), 'post_excerpt' ) ? yt_get_post_thumbnail_meta(null) : ''; //print_r( yt_get_post_thumbnail_meta()); ?> </p> <?php endif; } elseif( 'image' === $format ){ if ( ! post_password_required() && yt_get_the_post_format_image() ) : ?> <p class="entry-media margin-bottom-30"> <?php echo yt_get_the_post_format_image(); ?> </p> <?php endif; } /*Audio*/ elseif( 'audio' === $format ){ if ( has_post_thumbnail() && ! post_password_required() ) : ?> <p class="entry-thumbnail<?php echo !yt_get_the_post_format_audio() ? ' margin-bottom-30' : ''; ?>"> <?php the_post_thumbnail( ''); ?> </p> <?php endif; if ( yt_get_the_post_format_audio() && !post_password_required() ) : ?> <p class="entry-format-media <?php echo has_post_thumbnail() && get_the_post_thumbnail() && ! post_password_required() ? 'with-cover ' : ''; ?>margin-bottom-30"> <?php echo yt_get_the_post_format_audio(); ?> </p> <?php endif; /*Gallery*/ }elseif( 'gallery' === $format ){ if ( yt_get_the_post_format_gallery() && !post_password_required() ) : ?> <p class="entry-format-media margin-bottom-30"> <?php echo yt_get_the_post_format_gallery(); ?> </p> <?php endif; /*Video*/ }elseif( 'video' === $format ){ if ( yt_get_the_post_format_video() && !post_password_required() ) : ?> <p class="entry-format-media margin-bottom-30"> <?php echo yt_get_the_post_format_video(); ?> </p> <?php endif; } ?> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-links pagination-nav">' . __( 'Pages:', 'wpthms' ), 'after' => '</div>', 'link_before' => '<span class="page-numbers">', 'link_after' => '</span>', ) ); ?> <?php do_action( 'yt_single_post_entry_content_end' );?> </div><!-- .entry-content --> <?php do_action( 'yt_before_single_post_entry_footer' );?> <?php $tag_list = get_the_tag_list( '', '' ); if ( $tag_list ) : ?> <footer class="entry-meta hidden-print"> <?php do_action( 'yt_single_post_entry_footer_start' );?> <?php $meta_text = ''; /* translators: used between list items, there is a space after the comma */ if ( '' != $tag_list ) { $meta_text = '<div class="entry-tags">'; $meta_text .= __( '<strong class="tag-heading">%1$s Tags:</strong> %2$s', 'wpthms' ); $meta_text .= '</div>'; } printf( $meta_text, apply_filters('yt_icon_tag', '<i class="fa fa-tag"></i>'), $tag_list ); ?> <?php do_action( 'yt_single_post_entry_footer_end' );?> </footer><!-- .entry-meta --> <?php endif;?> <?php do_action( 'yt_after_single_post_entry_footer' );?> <!-- noptimize --><script type="text/html" data-role="header .entry-meta"><?php if( function_exists( 'yt_post_meta_description' )) yt_post_meta_description(); ?></script><!-- /noptimize --> </article><!-- #post-<?php the_ID(); ?>## --> <?php if ( function_exists( 'wpsabox_author_box' ) ) echo wpsabox_author_box(); ?>
- November 10, 2015 at 10:10 pm #11948
- November 19, 2015 at 5:16 am #12178
Still if you guys could give me the correct way, I will greatly appreciate it. I suck at php
- November 19, 2015 at 5:45 am #12181
Hey there, You must be logged in to view this reply!
- November 21, 2015 at 5:08 am #12233
- November 25, 2015 at 6:48 pm #12289
Hey there, You must be logged in to view this reply!
- AuthorPosts
Viewing 11 reply threads
- You must be logged in to reply to this topic.
This is a PRIVATE forum for verified users only, to view all replies/answers, you must be logged in!