...
 
Commits (6)
......@@ -13,8 +13,9 @@ $tit = get_the_title();
$place = get_post_meta( $post_id, $prefixact.'place', true );
$time = get_post_meta( $post_id, $prefixact.'time', true );
$date = get_post_meta( $post_id, $prefixact.'date-init-fix', true );
$date_varios = get_post_meta( $post_id, $prefixact.'date-init-varios', true );
// $date = DateTime::createFromFormat('m/d/Y', $dateinit);
//$dateinit2 = get_post_meta( $post_id, $prefixact.'date-init2', true );
// $dateinit2 = get_post_meta( $post_id, $prefixact.'date-init2', true );
$dateend = get_post_meta( $post_id, $prefixact.'date-end', true );
$organizer = get_post_meta( $post_id, $prefixact.'organizador', true );
$numero_asistentes = get_post_meta( $post_id, $prefixact.'numero-asistentes', true );
......@@ -70,8 +71,15 @@ $the_content = get_the_content();
// if ( $tit!= '' ) echo __('What','colormag-child').": ".$tit."<br>";
if ( $place != '' ) echo __('Place','colormag-child').": ". $place."<br>";
if ( $time != '' ) echo __('Hour','colormag-child').": ".$time."<br>";
if ( $date != '' ) echo __('Date','colormag-child').": ". date("d/m/Y", strtotime($date)). "<br>";
if ( $dateend!= '') echo __('End date','colormag-child').": ".date( 'd/m/Y', $dateend )."<br>";
if ( $date != '' ) {
if ( $date_varios != '' ) { // si tiene múltiple fecha muestra esa
echo __('Date','colormag-child').": ". $date_varios . "<br>";
} else { // si no la tiene, muestra la fecha normal
echo __('Date','colormag-child').": ". date("d/m/Y", strtotime($date)). "<br>";
echo $date_varios;
}
}
//if ( $dateend!= '') echo __('End date','colormag-child').": ".date( 'd/m/Y', $dateend )."<br>";
echo __('Type','colormag-child').": ". get_the_term_list( $post->ID, 'tipo-actividad', ' ', ', ', '' )."<br>";
echo __('Organized by','colormag-child').": ". $organizer."<br>";
if ( $numero_asistentes != '' ) echo __('Number of people','colormag-child').": ".$numero_asistentes."<br>";
......
......@@ -21,7 +21,7 @@ $autoria = get_post_meta( $post_id, 'autoria', true );
$the_content = get_the_content();
?>
<div class="single-article clearfix">
<div class="single-article clearfix smallbox">
<?php
$featured = 'colormag-featured-post-small';
if ( has_post_thumbnail() ) {
......@@ -32,9 +32,10 @@ $the_content = get_the_content();
if ( empty( $image_alt_text ) ) {
$image_alt_text = $title_attribute;
}
$image .= '<figure>';
$image .= '<figure class="">';
$image .= '<a href="' . get_permalink() . '" title="' . the_title( '', '', false ) . '">';
$image .= get_the_post_thumbnail( $post->ID, array(200,200), array( // TODO array(200,150) could be added to control size of image
$image .= get_the_post_thumbnail( $post->ID, "colormag-featured-post-small", array( // TODO array(200,150) could be added to control size of image
// $image .= get_the_post_thumbnail( $post->ID, array(200,200), array( // TODO array(200,150) could be added to control size of image
'title' => esc_attr( $title_attribute ),
'alt' => esc_attr( $image_alt_text ),
) ) . '</a>';
......@@ -45,7 +46,7 @@ $the_content = get_the_content();
<div class="article-content">
<?php colormag_colored_category(); ?>
<h3 class="entry-title">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?> <?php if ( 'pr' == get_post_type( $post_id ) ) { echo " | ". $autoria . strip_tags(get_the_term_list( $post_id, 'yr', ' (', ',', ')' )); } ?> </a>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?> <?php if ( 'pr' == get_post_type( $post_id ) ) { echo " | ". $autoria . strip_tags(get_the_term_list( $post_id, 'yr', ' (', ', ', ')' )); } ?> </a>
</h3>
<div class="below-entry-meta">
......
......@@ -97,10 +97,33 @@ if ( ! function_exists( 'colormag_top_header_bar_display' ) ) :
endif;
// ends modifiying top bar
// Describe what it does
add_action("after_setup_theme", function () {
load_theme_textdomain( 'colormag-child', get_stylesheet_directory() . '/languages' );
}, 5);
}, 5);
//formated pagination for bootstrap from http://www.ordinarycoder.com/paginate_links-class-ul-li-bootstrap/
function custom_pagination() {
global $wp_query;
$big = 999999999; // need an unlikely integer
$pages = paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $wp_query->max_num_pages,
'prev_next' => false,
'type' => 'array',
'prev_next' => TRUE,
'prev_text' => __('<'),
'next_text' => __('>'),
) );
if( is_array( $pages ) ) {
$paged = ( get_query_var('paged') == 0 ) ? 1 : get_query_var('paged');
echo '<ul class="pagination pagination-lg">';
foreach ( $pages as $page ) {
echo "<li>$page</li>";
}
echo '</ul>';
}
}
<?php
/* Template Name: Home page */
get_header(); ?>
<?php do_action( 'colormag_before_body_content' ); ?>
......@@ -12,8 +11,8 @@ get_header(); ?>
// Display Actividades -----------------------
$args = array(
'post_type' => 'actividad', //sets post type to actividad
'meta_key' => '_act_date-init',
'orderby' => 'meta_value_num',
//'meta_key' => '_act_date-init',
//'orderby' => 'meta_value_num',
'order' => 'DESC',
'posts_per_page'=> 2,
);
......@@ -24,7 +23,7 @@ get_header(); ?>
$my_query = new WP_Query($args);
?>
<?php echo "<h2 class='subsection'><span>".__('Next Activities','colormag-child')."</span></h2>"; ?>
<?php echo "<h2 class='subsection'><span>".__('Activities','colormag-child')."</span></h2>"; ?>
<div id="futuro">
......@@ -35,6 +34,9 @@ get_header(); ?>
<?php get_template_part( 'content', 'archive' ); ?>
<?php endwhile; endif; ?>
<?php echo "<div class='moreinfo'><a href='". get_page_link(pll_get_post(161)) ."'>".__('View all the activities','colormag-child')."</a></div>"; ?>
</div>
</div><!-- #content2 -->
......@@ -53,7 +55,7 @@ get_header(); ?>
<?php endwhile; ?>
<?php get_template_part( 'navigation', 'none' ); ?>
<?php echo "<div class='moreinfo'><a href='". get_page_link(pll_get_post(156)) ."'>".__('View older posts','colormag-child')."</a></div>"; ?>
<?php else : ?>
......@@ -99,9 +101,6 @@ get_header(); ?>
$my_query = new WP_Query($args);
$my_query_archive = new WP_Query($args_archive);
$my_query_asociados = new WP_Query($args_asociados);
global $post_i; $post_i = 1;
if ($my_query->have_posts() ) : while ( $my_query->have_posts() ) : $my_query->the_post();
......@@ -112,6 +111,7 @@ get_header(); ?>
</div>
<?php echo "<div class='moreinfo'><a href='". get_page_link(pll_get_post(1625)) ."'>".__('View all the projects','colormag-child')."</a></div>"; ?>
</div><!-- #content3 -->
</div><!-- #primary -->
......
No preview for this file type
This diff is collapsed.
<?php
/* Template Name: Blog page */
get_header(); ?>
<?php
$args = array(
'ignore_sticky_posts' => 1,
'posts_per_page'=> 15
);
if ( $paged > 1 ) {
$args['paged'] = $paged;
}
$wp_query = new WP_Query($args);
$wp_count = $wp_query->post_count; //The number of posts being displayed
?>
<?php do_action( 'colormag_before_body_content' ); ?>
<div id="primary">
<div id="content" class="clearfix">
<?php if ($wp_query->have_posts() ) :
$count = 0;
while ( $wp_query->have_posts()) : $wp_query->the_post();
?>
<?php get_template_part( 'content', '' ); ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<hr>
Pagination
<hr>
<div style="clear:both;">
<?php echo custom_pagination(); ?>
</div>
</div><!-- #content -->
</div><!-- #primary -->
<?php colormag_sidebar_select(); ?>
<?php do_action( 'colormag_after_body_content' ); ?>
<?php get_footer(); ?>
This diff is collapsed.
......@@ -50,6 +50,11 @@ body.entidad-template-default #content article.entidad {
margin: 0 auto;
}
.moreinfo {
margin:0 0 20px 0;
clear:both;
}
/* Add features for Projects and Activities */
/* We add the behaviour for our own custom post types */
......@@ -101,6 +106,14 @@ body.entidad-template-default #content article.entidad {
clear: both;
}
.smallbox h3 {
font-size: 1.5em !important;
}
.smallbox .below-entry-meta p {
margin: 10px 0 0 125px;
}
/* Project metadata y otros*/
a.migas {
color:#000;
......@@ -239,7 +252,7 @@ h2.subsection span {
margin-bottom: 30px;
}
.single #content .pr, #content .pr,
.single #content .actividad, #content .actividad {
.single #content .actividad, #content .actividad, #futuro .actividad {
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}
......@@ -363,3 +376,49 @@ img {
img:hover {
opacity: 0.4 !important;
}
/* Pagination */
.pagination-lg > li:first-child > a, .pagination-lg > li:first-child > span {
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
}
.pagination-lg > li > a, .pagination-lg > li > span {
padding: 10px 16px;
font-size: 18px;
line-height: 1.3333333;
}
.pagination > li {
display: inline;
}
.pagination > li > a, .pagination > li > span {
position: relative;
float: left;
padding: 6px 12px;
margin-left: -1px;
line-height: 1.42857143;
color: #337ab7;
text-decoration: none;
background-color: #fff;
border: 1px solid #ddd;
}
.pagination {
display: inline-block;
padding-left: 0;
margin: 20px 0;
border-radius: 4px;
}
.pagination-lg > li:last-child > a, .pagination-lg > li:last-child > span {
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
}
.page-numbers.current {
background:lightgray;
}
/* cookies */
.cookie-notice {
background-color:#FFF 0 !important;
}
/* croping images */