Skip to content

Instantly share code, notes, and snippets.

View giorgioriccardi's full-sized avatar
🎯
Focusing

Giorgio Riccardi giorgioriccardi

🎯
Focusing
  • Giorgio Riccardi Creations
  • Vancovuer, BC, Canada
View GitHub Profile
@giorgioriccardi
giorgioriccardi / if_else_lang.php
Last active May 15, 2018 20:59 — forked from beovulf/if_else_lang.php
If else language wordpress (polylang)
<?php
$currentlang = get_bloginfo('language');
if($currentlang=="en-CA"):
?>
<?php elseif($currentlang=="fr-CA"): ?>
<?php endif; ?>
or to avoid limitations or issues with "en-CA" "en-GB" "en-US" "en-UK" "fr-FR" etc:
$args = array(
'tag' => 'featured',
'category__in' => array( 43, 52 ),
'author__in' => array( 255, 930 )
);
$author_featured_posts = new WP_Query( $args );
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
/*
If you want more control over impress.js, the first thing is to change the way you call it. The demo
initializes impress.js like this:
<script src="js/impress.js"></script>
<script>impress().init();</script>
You want to change this to the following: