This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin name: Simple Password lockdown | |
* Plugin URI: https://gist.github.com/1687747 | |
* Description: Block site from non-logged in users | |
*/ | |
add_action('get_header', 'wpq_member_only_site'); | |
function wpq_member_only_site() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $user_ID, $user_identity, $user_level; | |
if ($user_ID) { | |
if($_POST) | |
{ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Base functions.php for WordPress themes | |
* | |
* @package WordPress 3.3 | |
* @author Andres Hermosilla | |
*/ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="info-box"> | |
<?php $krogsquery = new WP_Query( array( | |
'post_type' => 'post', | |
'posts_per_page' => 3 | |
)); ?> | |
<h3 class="info-headline">City News</h3> | |
<?php while($krogsquery->have_posts()) : $krogsquery->the_post(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$terms = get_terms("tribe_events_cat"); | |
$count = count($terms); | |
if ( $count > 0 ){ | |
echo '<ul class="events-cat-menu">'; | |
foreach ( $terms as $term ) { | |
echo '<li class="cat_'. $term->slug .'"><a href="'. get_term_link($term->slug, 'tribe_events_cat') .'">' . $term->name . '</a></li>'; | |
} | |
echo '</ul>'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Make the Facebook Like box responsive (fluid width) | |
https://developers.facebook.com/docs/reference/plugins/like-box/ | |
*/ | |
/* This element holds injected scripts inside iframes that in some cases may stretch layouts. So, we're just hiding it. */ | |
#fb-root { | |
display: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function () { | |
var $feed = $(".feed"), | |
$trigger = $(".next_page"), | |
$spinner = $(".spinner"), | |
spinner = "<div class=\"spinner\"></div>"; | |
var isotopeSettings = { | |
itemSelector: ".box" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add 'class="span4"' to all widgets in the Content Bottom sidebar | |
*/ | |
function bb_content_bottom_widget_class($params) { | |
if ($params[0]['id'] == 'roots-content-bottom') { | |
$class = 'class="span4 '; | |
$params[0]['before_widget'] = preg_replace('/class=\"/', "$class", $params[0]['before_widget'], 1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (have_posts()) : ?> | |
<?php $count = 0; ?> | |
<?php while (have_posts()) : the_post(); ?> | |
<?php $count++; ?> | |
<!-- Check for the first blog post in the loop && makes sure it the first page of results && makes sure it is the blog --> | |
<?php if ($count == 1 && $paged == 0 && is_home()) : ?> | |
<!-- Most recent blog post with custom template will display above older entries - Requires a content-featured.php or whatever you want to name your file or replace with code --> | |
<?php get_template_part( 'content', 'featured' ); ?> |
OlderNewer