...
 
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
......@@ -2,20 +2,19 @@ msgid ""
msgstr ""
"Project-Id-Version: wikitoki\n"
"POT-Creation-Date: 2015-02-18 23:24+0100\n"
"PO-Revision-Date: 2020-01-29 15:01+0100\n"
"PO-Revision-Date: 2020-02-07 16:00+0100\n"
"Last-Translator: pablo <pablo@basurama.org>\n"
"Language-Team: wikitoki <info@wikitoki.org>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.4\n"
"X-Generator: Poedit 2.3\n"
"X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
"X-Poedit-Basepath: .\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-SearchPath-0: /home/pablo/sites/montera34/wp-content/themes/"
"spacious-child\n"
"X-Poedit-SearchPath-0: /home/pablo/sites/montera34/wp-content/themes/spacious-child\n"
#: /home/pablo/sites/montera34/wp-content/themes/spacious-child/page-actividades.php:18
#: /home/pablo/sites/montera34/wp-content/themes/spacious-child/content-single-actividad.php:75
......@@ -187,9 +186,7 @@ msgid "Relación con el barrio"
msgstr ""
#: /home/pablo/sites/montera34/wp-content/themes/spacious-child/functions.php:183
msgid ""
"Qué relación las actividades ha tenido con temas promovidos por el "
"Ayuntamiento"
msgid "Qué relación las actividades ha tenido con temas promovidos por el Ayuntamiento"
msgstr ""
#: /home/pablo/sites/montera34/wp-content/themes/spacious-child/functions.php:192
......@@ -570,10 +567,7 @@ msgid "oEmbed"
msgstr ""
#: /home/pablo/sites/montera34/wp-content/themes/spacious-child/lib/metabox/example-functions.php:250
msgid ""
"Enter a youtube, twitter, or instagram URL. Supports services listed at <a "
"href=\"http://codex.wordpress.org/Embeds\">http://codex.wordpress.org/"
"Embeds</a>."
msgid "Enter a youtube, twitter, or instagram URL. Supports services listed at <a href=\"http://codex.wordpress.org/Embeds\">http://codex.wordpress.org/Embeds</a>."
msgstr ""
#: /home/pablo/sites/montera34/wp-content/themes/spacious-child/lib/metabox/example-functions.php:262
......@@ -732,13 +726,13 @@ msgstr "Organizaciones a las que pertenece"
msgid "People in Wikitoki that belong to"
msgstr "Personas en Wikitoki que pertenecen a"
msgid "Active residency"
msgid "Active residencies"
msgstr "Residencias activas"
msgid "Active projects"
msgstr "Proyectos activos"
msgid "Residency Archive"
msgid "Residencies Archive"
msgstr "Residencias archivadas"
msgid "Associated projects"
......@@ -771,6 +765,15 @@ msgstr "Blog"
msgid "Date"
msgstr "Fecha"
msgid "View all the activities"
msgstr "Ver todas las actividades"
msgid "View older posts"
msgstr "Ver entradas más antiguas"
msgid "View all the projects"
msgstr "Ver todos los proyectos"
#~ msgid "Activities spacious"
#~ msgstr "Archivo de actividades pacious"
......
<?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 */