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 $blog_id; ?> | |
<?php if ($blog_id == 2) { ?> | |
<?php } elseif ($blog_id == 1) { ?> | |
<?php } ?> | |
// Add site-id class to body functions.php | |
add_filter('body_class', 'multisite_body_classes'); | |
function multisite_body_classes($classes) { | |
$id = get_current_blog_id(); |
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
#your-slider .carousel-inner{ | |
height: 500px; | |
} | |
#your-slider .carousel-inner>.active{ | |
position: relative; | |
top: 50%; | |
transform: translateY(-50%); | |
} | |
#your-slider .carousel-inner>.next, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Form polyfill</title> | |
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script> | |
<script src="modernizr.custom.js"></script> | |
<script src="webshims/polyfiller.js"></script> | |
<script> | |
$.webshims.polyfill(); | |
</script> |
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
function my_admin_notice() { | |
?> | |
<div class="error"> | |
<p><?php _e( '3/13/2013 - ATTENTION! Please do not update the Custom Post Type UI Plugin. Versions 1.0.4. and lower are causing issues with content disappearing. Version 0.9.5 is stable and should remain active until futher notice. Please contact support with any questions.', 'my-text-domain' ); ?></p> | |
</div> | |
<?php | |
} | |
add_action( 'admin_notices', 'my_admin_notice' ); |
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
if( isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) && ( $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' ) ) | |
{ | |
// Your Script | |
} else { | |
header('Location: http://www.yourdomainname.com'); | |
exit; | |
} |
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 | |
// check if the flexible content field has rows of data | |
if (have_rows('choose_layout')): | |
// loop through the rows of data | |
while (have_rows('choose_layout')) : the_row(); | |
if (get_row_layout() == 'general_content'): | |
?> | |
// | |
<?php elseif (get_row_layout() == 'block_quote'): ?> | |
// |
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
if (file_exists(dirname(__FILE__) . '/local.php')) { | |
// Local Environment | |
define('WP_ENV', 'development'); | |
//define('WP_DEBUG', true); | |
// ** MySQL settings - You can get this info from your web host ** // | |
/** The name of the database for WordPress */ | |
define('DB_NAME', '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 echo '<!-- ' . basename( get_page_template() ) . ' -->'; ?> |
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 include(TEMPLATEPATH . '/your/file/path.php'); ?> |