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 | |
$query = "SELECT * FROM {$wpdb->posts} JOIN {$wpdb->prefix}ai1ec_events on ({$wpdb->prefix}ai1ec_events.post_id={$wpdb->posts}.ID) | |
WHERE post_type='ai1ec_event' AND post_status='publish' AND {$wpdb->prefix}ai1ec_events.start > '".time()."' ORDER BY {$wpdb->prefix}ai1ec_events.start limit 3"; | |
$results = $wpdb->get_results( $query ); // get result form the query | |
ob_start(); | |
foreach($results as $result){ | |
$title = ($result->post_title); // Returns the post type title |
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 | |
/** | |
* Disables comments, Add below to existing function.php file. | |
*/ | |
/** Disable support for comments and trackbacks in post types. */ | |
function df_disable_comments_post_types_support() { | |
$post_types = get_post_types(); | |
foreach ( $post_types as $post_type ) { | |
if ( post_type_supports( $post_type, 'comments' ) ) { |
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 | |
// =================================================== | |
// Load database info and local development parameters | |
// =================================================== | |
if ( file_exists( dirname( __FILE__ ) . '/local-config.php' ) ) { | |
define( 'WP_LOCAL_DEV', true ); | |
include( dirname( __FILE__ ) . '/local-config.php' ); | |
} else { | |
define( 'WP_LOCAL_DEV', false ); | |
define( 'DB_NAME', '%%DB_NAME%%' ); |
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
### Keybase proof | |
I hereby claim: | |
* I am alexwoollam on github. | |
* I am awool (https://keybase.io/awool) on keybase. | |
* I have a public key ASCB9laMpb0JT3Yt-SiieYKmTv7PMqX1IdPjNVN_oXPALQo | |
To claim this, I am signing this object: |
NewerOlder