Skip to content

Instantly share code, notes, and snippets.

View jhouedanou's full-sized avatar

Jean Luc Houedanou jhouedanou

View GitHub Profile
@jhouedanou
jhouedanou / archive.php
Last active August 29, 2015 14:16
Loop pour la categorie
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; ?>
<!--pour passer d'une page a l autre-->
<?php post_navigation(); ?>
<?php while (have_posts()) : the_post(); ?>
<article <?php post_class() ?>>
@jhouedanou
jhouedanou / #loopofdeath
Created March 10, 2015 15:28
Loop multiples sans posts dupliqués
<?php
$postsInCat = get_term_by('name','themes','category');
$postsInCat = $postsInCat->count;
//variable avec le nombre total de posts
$limite = 15;
$limitwhile = intval($postsInCat/$limite);
//echo $limitwhile;
?>
<!--premiere loop-->
<?php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Atoo.ci | Toute l'actualité ivoirienne.</title>
<link type="image/png" href="favicon_atoo.png" rel="icon">
<link type="image/png" href="favicon_atoo.png" rel="shortcut icon">
<style type="text/css">
body {
<?php
var $permalink = $_SERVER['REQUEST_URI'];
?>
<div class="compteur" data-permalink="<?php $permalink; ?>" style="display: none">
<p> Cet article a &eacute;t&eacute; partag&eacute; <span class="partages">0</span>fois sur facebook </p>
<p>Cet article a &eacute;t&eacute; comment&eacute;<span class="commentaires" data-url="">0</span></p>
</div>
<script>
(function($) {
var permalink = $('.compteur').data("permalink");
<?php
$args2 = array( 'cat'=> 2);
//compteur
$ints=1;
$loop2 = new WP_Query( $args2 );
while ( $loop2->have_posts() ) : $loop2->the_post();
?>
<li class="list">
<div class="info">
<div class="subinfo">
$(document).ready(function (){
$('.open-popup-link').each(function() {
$(this).magnificPopup({
type:'inline',
midClick: true // Allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source in href.
});
});
}(window.jQuery || window.$));
<a href="#popup">lien1</a>
<div id="popup">Fenêtre modale1</div>
<a href="#popup">lien1</a>
<div id="popup">Fenêtre modale contenant l'article 1</div>
<a href="#popup">lien2</a>
<div id="popup">Fenêtre modale contenant l'article 2</div>