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
<IfModule mod_rewrite.c> | |
# BEGIN Force https to http | |
RewriteEngine On | |
RewriteCond %{HTTPS} =on | |
RewriteRule ^(.*) http://%{HTTP_HOST}/$1 [R=301,L] | |
# END Force https to http | |
</IfModule> |
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 | |
global $post; | |
if ( isset ($post) ){ | |
$post_parent = $post->ID; | |
if ( !empty($post->post_parent) ){ | |
$post_parent = $post->post_parent; | |
} | |
$args = array( 'posts_per_page' => -1, 'post_parent' => $post->post_parent, 'post_type'=> 'custom-post-name' ); | |
$myposts = get_posts( $args ); | |
foreach ( $myposts as $post ) : setup_postdata( $post ); ?> |
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
@for $index from 1 through 6 { | |
h#{$index} { | |
// style code | |
} | |
} |
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
function clean(node) | |
{ | |
for(var n = 0; n < node.childNodes.length; n ++) | |
{ | |
var child = node.childNodes[n]; | |
if | |
( | |
child.nodeType === 8 || (child.nodeType === 3 && !/\S/.test(child.nodeValue)) | |
) | |
{ |
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 global $wp_query @endphp | |
@if ($wp_query->max_num_pages > 1) | |
<nav class="post-nav"> | |
<div class="pager"> | |
@php | |
$big = 999999999; // need an unlikely integer | |
echo paginate_links( array( | |
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
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
add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' ); | |
function custom_woocommerce_auto_complete_order( $order_id ) { | |
if ( ! $order_id ) { | |
return; | |
} | |
$order = wc_get_order( $order_id ); | |
$order->update_status( 'processing' ); | |
} |
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
<img src="<?php echo get_the_post_thumbnail_url(); ?>" alt="" onerror="this.onerror=null;this.src='<?= get_template_directory_uri(); ?>/dist/images/example.jpg';"> |
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
// loop code | |
<?php wp_reset_query(); ?> |
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
// Add lost password link to login form | |
add_action( 'login_form_middle', 'add_lost_password_link' ); | |
function add_lost_password_link() { | |
return '<p class="forgot-password">Forgot Password? <a href="/wp-login.php?action=lostpassword">Click Here</a></p>'; | |
} |
OlderNewer