Commit 355cac4e authored by numeroteca's avatar numeroteca

create specific single page for projects

parent 70b6bcf6
<?php
/**
* The template used for displaying single activity content in single.php
*
* @package ThemeGrill
* @subpackage ColorMag
* @since ColorMag 1.0
*/
//Gets the data
$post_id = $post->ID;
$prefixact = '_act_';
$tit = get_the_title();
$autoria = get_post_meta( $post_id, 'autoria', true );
$the_content = get_the_content();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<a href="/proyectos"><?php _e("Proyectos","colormag-child") ?></a> > <?php echo $tit; ?> | <?php echo __('Year','colormag-child').": ". get_the_term_list( $post->ID, 'yr', ' ', ', ', '' ); ?> | <?php echo get_the_term_list( $post->ID, 'tp-pr', ' ', ', ', '' ); ?> | Autoría: <?php echo $autoria."<br>"; ?>
<?php do_action( 'colormag_before_post_content' ); ?>
<?php
$image_popup_id = get_post_thumbnail_id();
$image_popup_url = wp_get_attachment_url( $image_popup_id );
?>
<?php if ( ( get_theme_mod( 'colormag_featured_image_show', 0 ) == 0 ) && ( has_post_thumbnail() ) ) { ?>
<div class="featured-image">
<?php if (get_theme_mod('colormag_featured_image_popup', 0) == 1) { ?>
<a href="<?php echo $image_popup_url; ?>" class="image-popup"><?php the_post_thumbnail( 'colormag-featured-image' ); ?></a>
<?php } else { ?>
<?php the_post_thumbnail( 'colormag-featured-image' ); ?>
<?php } ?>
</div>
<?php } ?>
<div class="article-content clearfix">
<?php if( get_post_format() ) { get_template_part( 'inc/post-formats' ); } ?>
<?php colormag_colored_category(); ?>
<header class="entry-header">
<h1 class="entry-title">
<?php the_title(); ?>
</h1>
</header>
<?php colormag_entry_meta(); ?>
<div class="entry-content clearfix">
<?php the_content();
wp_link_pages( array(
'before' => '<div style="clear: both;"></div><div class="pagination clearfix">'.__( 'Pages:', 'colormag' ),
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>'
) );
?>
</div>
</div>
<?php do_action( 'colormag_after_post_content' ); ?>
</article>
...@@ -23,6 +23,10 @@ get_header(); ?> ...@@ -23,6 +23,10 @@ get_header(); ?>
<?php get_template_part( 'content', 'actividad' ); ?> <?php get_template_part( 'content', 'actividad' ); ?>
<?php } else if ( is_singular( 'pr' ) ) { ?>
<?php get_template_part( 'content', 'project' ); ?>
<?php } else if ( is_singular( 'actividad' ) ) { ?> <?php } else if ( is_singular( 'actividad' ) ) { ?>
<?php get_template_part( 'content', 'single' ); ?> <?php get_template_part( 'content', 'single' ); ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment