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
import requests | |
import base64 | |
from tqdm import tqdm | |
import pandas as pd | |
from datetime import datetime, timedelta | |
import searchconsole | |
domain = "" # Must have trailing slash! | |
# WordPress Logins |
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
<h3>Video Tutorial</h3> | |
<div class="video-container"> | |
<iframe src="YOUTUBE_EMBED_URL_GOES_HERE"></iframe> | |
</div> |
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( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) ){ | |
$current_site = new stdClass; | |
$current_site->id = defined( 'SITE_ID_CURRENT_SITE' ) ? constant( 'SITE_ID_CURRENT_SITE' ) : 1; | |
$current_site->domain = $domain = DOMAIN_CURRENT_SITE; | |
$current_site->path = $path = PATH_CURRENT_SITE; | |
if( defined( 'BLOGID_CURRENT_SITE' ) ){ | |
$current_site->blog_id = BLOGID_CURRENT_SITE; | |
} | |
$url = parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH ); |
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
add_action( 'init', 'stop_heartbeat', 1 ); | |
function stop_heartbeat() { | |
wp_deregister_script('heartbeat'); | |
} |
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 | |
date_default_timezone_set('Etc/UTC'); | |
require '../PHPMailerAutoload.php'; | |
//Create a new PHPMailer instance | |
$mail = new PHPMailer; | |
//Tell PHPMailer to use SMTP | |
$mail->isSMTP(); | |
//Enable SMTP debugging | |
// 0 = off (for production use) | |
// 1 = client messages |
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
/ Hook our custom function to the pre_get_posts action hook | |
add_action( 'pre_get_posts', 'add_reviews_to_frontpage' ); | |
// Alter the main query | |
function add_reviews_to_frontpage( $query ) { | |
if ( is_home() && $query->is_main_query() ) { | |
$query->set( 'post_type', array( 'post', 'movie', 'review' ) ); | |
} | |
return $query; | |
} |
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
// Display field value | |
the_field( 'FIELD NAME' ); | |
// Return field value | |
get_field( 'FIELD 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
<?php | |
$movie_box_art = get_post_meta( $post->ID, 'Box Art', TRUE ); | |
if (!empty($movie_box_art)) { ?> | |
<div class="movie-poster-box"> | |
<img src="<?php echo $movie_poster ?>" alt="<?php single_post_title(); ?> "> | |
</div> | |
<? } ?> |
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
<ul class='post-meta'> | |
<li> | |
<span class='post-meta-key'>{your_key}</span> {your_value} | |
</li> | |
</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
// Generates all custom fields attached to the post in a <ul> list | |
the_meta(); | |
// Get a specific piece of information | |
echo get_post_meta( $post->ID, 'Budget', TRUE ); |
NewerOlder