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 | |
function add_ie_scripts () { | |
global $is_IE; | |
if ($is_IE) { | |
wp_enqueue_script( 'selectivizr', get_template_directory_uri() . '/scripts/libraries/selectivizr-min.js' ); | |
wp_enqueue_script( 'respondJS', get_template_directory_uri() . '/scripts/libraries/respond.min.js' ); | |
} | |
} | |
add_action('wp_enqueue_scripts', 'add_ie_scripts', 1); | |
?> |
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 | |
/** | |
* FTP Settings | |
*/ | |
//define('FS_METHOD', 'ftpext'); | |
//define('FTP_BASE', '/path/to/wordpress/'); | |
//define('FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/'); | |
//define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/'); | |
//define('FTP_PUBKEY', '/home/username/.ssh/id_rsa.pub'); | |
//define('FTP_PRIKEY', '/home/username/.ssh/id_rsa'); |
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 | |
function current_taxonomy_item($classes, $item) { | |
global $naventries; | |
$naventries[$item->ID] = $item; | |
if($item->type == 'taxonomy') { | |
global $post; | |
$terms = get_the_terms($post->ID, $item->object); | |
$currentTerms = array(); | |
foreach($terms as $term) { | |
$currentTerms[] = $term->slug; |
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
mailto:{email_address}?subject={subject}&body=<?php echo urlencode(get_the_title()); ?>%0A<?php the_permalink(); ?> | |
# Google+ | |
https://plus.google.com/share?url=<?php the_permalink(); ?> | |
https://twitter.com/intent/tweet?url=<?php the_permalink(); ?>&via={username}&text=<?php echo urlencode(get_the_title()); ?>&in_reply_to={username}&hashtags={hash,tags}&related={usernames,usernames} | |
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 | |
function custom_search_template($template) { | |
global $wp_query; | |
$post_type = get_query_var('post_type'); | |
if (!$wp_query->is_admin | |
&& $wp_query->is_search | |
&& isset($post_type) | |
&& $post_type === 'faq') { |
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
# Source: https://wordpress.org/support/topic/success-mapping-multiple-domains-to-different-folders-with-htaccess | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
# --------------------------------------- | |
# BEGIN Domain to folder mapping | |
# pointing domain_1.com to folder_1 |
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 | |
/* | |
Template Name: Login/Logout Page | |
*/ | |
//* Remove our default page content | |
remove_action( 'genesis_entry_content', 'genesis_do_post_content' ); | |
//* Add custom login form to our page content | |
add_action( 'genesis_entry_content', 'ck_do_login_form' ); |
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
<div id="scrollUp"><img src="http://s014.radikal.ru/i328/1512/c1/1c1585b88ebc.png" alt="Up" title="Scroll window up"></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 | |
$ip = $_SERVER['REMOTE_ADDR']; | |
$browser = $_SERVER['HTTP_USER_AGENT']; | |
$referrer = $_SERVER['HTTP_REFERER']; | |
if ($referred == "") { | |
$referrer = "This page was accessed directly"; | |
} | |
echo "<b>Visitor IP address:</b><br/>" . $ip . "<br/>"; | |
echo "<b>Browser (User Agent) Info:</b><br/>" . $browser . "<br/>"; | |
echo "<b>Referrer:</b><br/>" . $referrer . "<br/>"; |