/content-scv_comic_review.php Secret
Created
June 28, 2018 09:56
Star
You must be signed in to star a gist
Creación de la plantilla del detalle de una reseña y las taxonomías personalizadas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template part for displaying posts | |
* | |
* @link https://codex.wordpress.org/Template_Hierarchy | |
* | |
* @package WordPress | |
* @subpackage Twenty_Seventeen | |
* @since 1.0 | |
* @version 1.2 | |
*/ | |
?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
<?php | |
if ( is_sticky() && is_home() ) : | |
echo twentyseventeen_get_svg( array( 'icon' => 'thumb-tack' ) ); | |
endif; | |
?> | |
<header class="entry-header"> | |
<?php | |
if ( 'post' === get_post_type() ) { | |
echo '<div class="entry-meta">'; | |
if ( is_single() ) { | |
twentyseventeen_posted_on(); | |
} else { | |
echo twentyseventeen_time_link(); | |
twentyseventeen_edit_link(); | |
}; | |
echo '</div><!-- .entry-meta -->'; | |
}; | |
if ( is_single() ) { | |
the_title( '<h1 class="entry-title">', '</h1>' ); | |
} elseif ( is_front_page() && is_home() ) { | |
the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' ); | |
} else { | |
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); | |
} | |
?> | |
</header><!-- .entry-header --> | |
<?php if ( '' !== get_the_post_thumbnail() && ! is_single() ) : ?> | |
<div class="post-thumbnail"> | |
<a href="<?php the_permalink(); ?>"> | |
<?php the_post_thumbnail( 'twentyseventeen-featured-image' ); ?> | |
</a> | |
</div><!-- .post-thumbnail --> | |
<?php endif; ?> | |
<div class="entry-taxonomies"> | |
<div class="entry-genre"> | |
<?php echo get_the_term_list( $post->ID, 'scv_comic_genre', 'Géneros: ', ', ' ); ?> | |
</div> | |
<div class="entry-author"> | |
<?php echo get_the_term_list( $post->ID, 'scv_comic_author', 'Autores: ', ', ' ); ?> | |
</div> | |
</div> | |
<div class="entry-content"> | |
<?php | |
/* translators: %s: Name of current post */ | |
the_content( sprintf( | |
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ), | |
get_the_title() | |
) ); | |
wp_link_pages( array( | |
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ), | |
'after' => '</div>', | |
'link_before' => '<span class="page-number">', | |
'link_after' => '</span>', | |
) ); | |
?> | |
</div><!-- .entry-content --> | |
<?php | |
if ( is_single() ) { | |
twentyseventeen_entry_footer(); | |
} | |
?> | |
</article><!-- #post-## --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Enqueue styles | |
*/ | |
function scv_enqueue_styles(){ | |
// Parent Theme stylesheet | |
wp_enqueue_style( 'twentyseventeen-style', get_template_directory_uri().'/style.css' ); | |
// Theme stylesheet | |
wp_enqueue_style( 'twentyseventeen-child-style', get_stylesheet_uri(), array('twentyseventeen-style') ); | |
} | |
add_action( 'wp_enqueue_scripts', 'scv_enqueue_styles' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The template for displaying all single posts | |
* | |
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post | |
* | |
* @package WordPress | |
* @subpackage Twenty_Seventeen | |
* @since 1.0 | |
* @version 1.0 | |
*/ | |
get_header(); ?> | |
<div class="wrap"> | |
<div id="primary" class="content-area"> | |
<main id="main" class="site-main" role="main"> | |
<?php | |
/* Start the Loop */ | |
while ( have_posts() ) : the_post(); | |
get_template_part( 'template-parts/post/content', 'scv_comic_review' ); | |
// If comments are open or we have at least one comment, load up the comment template. | |
if ( comments_open() || get_comments_number() ) : | |
comments_template(); | |
endif; | |
the_post_navigation( array( | |
'prev_text' => '<span class="screen-reader-text">' . __( 'Previous Post', 'twentyseventeen' ) . '</span><span aria-hidden="true" class="nav-subtitle">' . __( 'Previous', 'twentyseventeen' ) . '</span> <span class="nav-title"><span class="nav-title-icon-wrapper">' . twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '</span>%title</span>', | |
'next_text' => '<span class="screen-reader-text">' . __( 'Next Post', 'twentyseventeen' ) . '</span><span aria-hidden="true" class="nav-subtitle">' . __( 'Next', 'twentyseventeen' ) . '</span> <span class="nav-title">%title<span class="nav-title-icon-wrapper">' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ) . '</span></span>', | |
) ); | |
endwhile; // End of the loop. | |
?> | |
</main><!-- #main --> | |
</div><!-- #primary --> | |
<?php get_sidebar(); ?> | |
</div><!-- .wrap --> | |
<?php get_footer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Theme Name: Twenty Seventeen Child | |
Theme URI: https://silicodevalley.com | |
Author: David Perálvarez | |
Author URI: https://silicodevalley.com | |
Description: Twenty Seventeen with CPT and CT support | |
Version: 1.0.0 | |
License: GNU General Public License v2 or later | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
Text Domain: tschild | |
Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready | |
Template: twentyseventeen | |
*/ | |
.single-scv_comic_review .entry-taxonomies{ | |
background-color: #eee; | |
padding: 10px 20px; | |
margin-bottom: 30px; | |
} | |
.single-scv_comic_review .entry-taxonomies a{ | |
text-decoration: underline; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment