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
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
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
<div class="indent"> | |
<?php include_once('homepage-gallery.php') | |
$id = '222'; | |
$existing_attachments = attachments_get_attachments($id); | |
if( is_array($existing_attachments) && !empty($existing_attachments) ) { | |
$attachment_index = 0; | |
echo '<ul>'; | |
foreach ($existing_attachments as $attachment) { | |
$attachment_index++; | |
?> |
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
<div id="my-folio-of-works" class="prev_img svwp"> | |
<ul> | |
<ul> | |
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); | |
$args = array( | |
'post_parent' => 222, | |
'post_type' => 'attachment' | |
); |
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 | |
function my_force_ssl() { | |
return true; | |
} | |
add_filter('force_ssl', 'my_force_ssl', 10, 3); | |
================================================================== | |
// Remove WooCommerce Updater |
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 $user; | |
if ( ! $user->uid) { | |
$dest = drupal_get_destination(); | |
drupal_goto('user/login', array('query' => $dest)); | |
}?> |
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
<script> | |
jQuery(function(){ | |
jQuery("a").each(function(){ | |
if (jQuery(this).attr("href") == window.location.pathname){ | |
jQuery(this).addClass("youarehere"); | |
} | |
}); | |
}); | |
</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
/ Redirect all traffic to non-www. For example yoursite.com | |
if (isset($_SERVER['PANTHEON_ENVIRONMENT']) && | |
($_SERVER['PANTHEON_ENVIRONMENT'] === 'live') && | |
// Check if Drupal or WordPress is running via command line | |
(php_sapi_name() != "cli")) { | |
if ($_SERVER['HTTP_HOST'] == 'www.youwebsite.com') { | |
header('HTTP/1.0 301 Moved Permanently'); | |
header('Location: https://yourwebsite.com'. $_SERVER['REQUEST_URI']); | |
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 | |
/** | |
* Add Continue Shopping Button on Cart Page | |
* Add to theme functions.php file or Code Snippets plugin | |
*/ | |
add_action( 'woocommerce_before_cart_table', 'woo_add_continue_shopping_button_to_cart' ); | |
function woo_add_continue_shopping_button_to_cart() { |
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
remove_action( 'woocommerce_order_details_after_order_table', 'woocommerce_order_again_button' ); |
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 /** | |
* @Title: WooCommerce Edit Checkout Billing Address fields | |
*/ | |
add_filter( 'woocommerce_checkout_fields' , 'dfh_woo_mod_woo_billing_address_fields' ); | |
function dfh_woo_mod_woo_billing_address_fields( $fields ) { | |
// Remove Billing Company Field | |
unset($fields['billing']['billing_company']); |
OlderNewer