Skip to content

Commit

Permalink
some more dev
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelpeixe committed Oct 21, 2013
1 parent 988d18e commit 9187da4
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 37 deletions.
5 changes: 4 additions & 1 deletion content-map-group.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@
<div class="map-sidebar">
<div class="viewing-post">
</div>
<?php get_template_part('section', 'sticky-posts'); ?>
<?php
if(is_front_page() && !is_paged())
get_template_part('section', 'sticky-posts');
?>
</div>
<?php endif; ?>
<div class="map-container">
Expand Down
5 changes: 4 additions & 1 deletion content-map.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<div class="map-sidebar">
<div class="viewing-post">
</div>
<?php get_template_part('section', 'sticky-posts'); ?>
<?php
if(is_front_page() && !is_paged())
get_template_part('section', 'sticky-posts');
?>
</div>
<?php endif; ?>
<div class="map-container"><div id="map_<?php echo jeo_get_map_id(); ?>" class="map"></div></div>
Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function infoamazonia_scripts() {
'ajaxurl' => admin_url('admin-ajax.php'),
'query' => $jeo_markers->query(),
'stories_label' => __('stories', 'infoamazonia'),
'home' => is_front_page(),
'home' => (is_front_page() && !is_paged()),
'copy_embed_label' => __('Copy the embed code', 'infoamazonia'),
'share_label' => __('Share this', 'infoamazonia'),
'print_label' => __('Print', 'infoamazonia'),
Expand Down
19 changes: 19 additions & 0 deletions inc/advanced-navigation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

/*
* Ekuatorial
* Advanced navigation
*/


class Ekuatorial_AdvancedNav {

function __construct() {



}

}

?>
2 changes: 2 additions & 0 deletions js/infoamazonia.markers.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@
markers.openMarker(markerID, false);
return false;
});
if(!fStoryID)
story = listPosts.find('li:first-child').attr('id');
}

Shadowbox.init({
Expand Down
4 changes: 2 additions & 2 deletions searchform.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<form role="search" method="get" id="searchform">
<form role="search" method="get" id="searchform" action="<?php echo home_url('/'); ?>">
<div>
<input type="text" name="s" id="s" placeholder="<?php echo infoamazonia_search_placeholder(); ?>" value="<?php echo $_GET['s']; ?>" />
<input type="text" name="s" id="s" placeholder="<?php _e('Search for stories', 'ekuatorial'); ?>" value="<?php echo $_GET['s']; ?>" />
<input type="submit" class="button" id="searchsubmit" value="<?php _e('Search', 'infoamazonia'); ?>" />
</div>
</form>
62 changes: 30 additions & 32 deletions section-sticky-posts.php
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
<?php
if(is_front_page()) :
$sticky = new WP_Query(array(
'posts_per_page' => 4,
'post__in' => get_option('sticky_posts'),
'ignore_sticky_posts' => 1
));
if($sticky->have_posts()) :
?>
<div class="sticky-posts">
<?php while($sticky->have_posts()) : $sticky->the_post(); ?>
<div class="sticky-item" data-postid="<?php the_ID(); ?>">
<article id="sticky-post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="post-header">
<?php if(has_post_thumbnail()) : ?>
<div class="post-thumbnail">
<?php the_post_thumbnail('thumbnail'); ?>
</div>
<?php endif; ?>
<h2><?php the_title(); ?></h2>
</header>
<section class="post-content">
<?php the_excerpt(); ?>
<a class="button" href="<?php the_permalink(); ?>"><?php _e('Read more', 'ekuatorial'); ?></a>
<a class="button" href="<?php echo jeo_get_share_url(array('p' => get_the_ID())); ?>"><?php _e('Share', 'ekuatorial'); ?></a>
</section>
</article>
</div>
<?php endwhile; ?>
</div>
<?php
endif;
$sticky = new WP_Query(array(
'posts_per_page' => 4,
'post__in' => get_option('sticky_posts'),
'ignore_sticky_posts' => 1
));
if($sticky->have_posts()) :
?>
<div class="sticky-posts">
<?php while($sticky->have_posts()) : $sticky->the_post(); ?>
<div class="sticky-item" data-postid="<?php the_ID(); ?>">
<article id="sticky-post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="post-header">
<?php if(has_post_thumbnail()) : ?>
<div class="post-thumbnail">
<?php the_post_thumbnail('thumbnail'); ?>
</div>
<?php endif; ?>
<h2><?php the_title(); ?></h2>
</header>
<section class="post-content">
<?php the_excerpt(); ?>
<a class="button" href="<?php the_permalink(); ?>"><?php _e('Read more', 'ekuatorial'); ?></a>
<a class="button" href="<?php echo jeo_get_share_url(array('p' => get_the_ID())); ?>"><?php _e('Share', 'ekuatorial'); ?></a>
</section>
</article>
</div>
<?php endwhile; ?>
</div>
<?php
endif;
?>
?>

0 comments on commit 9187da4

Please sign in to comment.