This file contains hidden or 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
$ whois google.com | |
Whois Server Version 2.0 | |
Domain names in the .com and .net domains can now be registered | |
with many different competing registrars. Go to http://www.internic.net | |
for detailed information. | |
GOOGLE.COM.ZZZZZZZZZZZZZ.GET.ONE.MILLION.DOLLARS.AT.WWW.UNIMUNDI.COM | |
GOOGLE.COM.ZZZZZ.GET.LAID.AT.WWW.SWINGINGCOMMUNITY.COM |
This file contains hidden or 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_action('pre_get_posts', 'ipstenu_pre_get_posts'); | |
function ipstenu_pre_get_posts($query){ | |
if ($query->is_page('name-of-your-page')) { // any and all conditionals work here as a method of the $query object | |
$query->set('post_type', 'video'); // use the set method as if you were using a regular WP_Query or query_posts etc... | |
$query->set('posts_per_page', 10); | |
} | |
} |
This file contains hidden or 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 | |
// THIS FILE EXPLAINS HOW TO USE THE sld_register_post_type() FUNCTION FROM THE FOLLOWING WP PLUGIN: https://github.com/jkudish/sld-custom-content-and-taxonomies | |
/** | |
* sld_register_post_type() | |
* @param $post_type_slug the slug of the type to register | |
* @param $optional_args can be passed all of the same arguments as register_post_type() | |
* @see http://codex.wordpress.org/Function_Reference/register_post_type | |
* @param $optional_custom_plural, the plural name for this post type |
This file contains hidden or 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 | |
// THIS FILE EXPLAINS HOW TO USE THE sld_register_taxonomy() FUNCTION FROM THE FOLLOWING WP PLUGIN: https://github.com/jkudish/sld-custom-content-and-taxonomies | |
/** | |
* sld_register_taxonomy() | |
* @param $taxonomy_slug the slug of the taxonomy to register | |
* @param $post_types, the post types that use this taxonomy | |
* @param $optional_singular_name, the singular name for this post type | |
* @param $optional_args can be passed all of the same arguments as register_taxonomy() |
This file contains hidden or 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
<h1>Upcoming events:</h1> | |
<?php global $post; | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
$upcoming = tribe_get_events( array('eventDisplay'=>'past', 'posts_per_page'=>1,'paged' => get_query_var('page')) ); | |
foreach($upcoming as $post) : setup_postdata($post);?> | |
<div class="single-event"> | |
<div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"> | |
<?php the_title(); ?> | |
</a> </div> | |
<?php endforeach; ?> |
This file contains hidden or 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 | |
/** | |
* keeps a user always logged in | |
* don't use this on a production site, ever! | |
*/ | |
add_action('init', 'auto_login'); | |
add_action('admin_init', 'auto_login'); | |
function auto_login() { |
This file contains hidden or 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: Logged in only events calendar | |
Plugin URI: http://tri.be/support/forums/topic/calendar-view/#post-14059 | |
Description: Prevents non-loggedin users from seing The Events Calendar. Requires The Events Calendar by Modern Tribe Inc | |
Version: 0.1 | |
Author: Joachim Kudish | |
Author URI: http://jkudish.com/ | |
License: GPLv2 |
This file contains hidden or 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 $post; | |
$get_posts = tribe_get_events(array('posts_per_page'=>10, 'venue'=>176) ); | |
foreach($get_posts as $post) { setup_postdata($post); ?> | |
<div class="post"> | |
<h4 class="post-header"><a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></a></h4> | |
<span class="event-date"><a href="<?php the_permalink(); ?>"><?php echo tribe_get_start_date($post->ID, true, 'M j, Y'); ?></a></span> | |
<div class="post-content"><?php the_content(); ?></div> |
This file contains hidden or 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 date_default_timezone_set('America/New_York'); ?> |
This file contains hidden or 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 | |
/** | |
* Filters the year dropdown in The Events Calendar plugin's grid view | |
* shows the current year isntead of the last 2 | |
* | |
* @author Joachim Kudish @link http://jkudish.com | |
* @version 1.0 | |
* @param (string) $yearOptions the number of years options string | |
* @return (string) $yearOptions the filtered number of years options string | |
*/ |