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="sidebar-menu"> | |
<h2>Categories</h2> | |
<ul class="footer-menu-list"> | |
{% for link in linklists.collection-menu.links %} | |
<li class="custom-menu-item {{ link.title }}"><a href="{{ link.url }}">{{ link.title }}</a></li> | |
{% endfor %} | |
<li class="vieW_more"><a href="/collections/all">View More</a></li> | |
</ul> | |
</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 | |
// Add meta box to Products post type | |
function add_product_user_role_meta_box() { | |
add_meta_box( | |
'product_user_role_meta_box', | |
'User Role', | |
'render_product_user_role_meta_box', | |
'product', | |
'side', |
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
jQuery( document ).ready(function($) { | |
var sections = $('.animateiT'), | |
nav = $('.jump-left'), | |
nav_height = nav.outerHeight(); | |
$(window).on('scroll', function() { | |
var cur_pos = $(this).scrollTop(); | |
sections.each(function() { | |
var top = $(this).offset().top - 300; | |
var bottom = top + $(this).outerHeight(); | |
if (cur_pos >= top && cur_pos <= bottom) { |
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 | |
// Update OFF | |
// Remove WP Updates | |
function remove_core_updates(){ | |
global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,); | |
} | |
//add_filter('pre_site_transient_update_core','remove_core_updates'); | |
add_filter('pre_site_transient_update_plugins','remove_core_updates'); | |
add_filter('pre_site_transient_update_themes','remove_core_updates'); |
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 | |
/* redirect after form submit */ | |
add_action('template_redirect', function() { | |
// ID of the redirect page | |
if (!is_page(2904)) { | |
return; | |
} | |
// coming from the checkout, so all is fine |
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 scroll_scripts() { | |
if ( is_page_template( 'template-projects.php' ) ) { ?> | |
<script> | |
jQuery( document ).ready(function($) { | |
jQuery(this).scrollTop(0); | |
jQuery( "html" ).addClass( "noScroll" ); | |
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 image field in taxonomy page | |
add_action( 'our_portfolio_category_add_form_fields', 'add_custom_taxonomy_image', 10, 2 ); | |
function add_custom_taxonomy_image ( $taxonomy ) { | |
?> | |
<div class="form-field term-group"> | |
<label for="image_id"><?php _e('Image', 'taxt-domain'); ?></label> | |
<input type="hidden" id="image_id" name="image_id" class="custom_media_url" value=""> |
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 | |
// http://lifeonlars.com/wordpress/how-to-add-multiple-featured-images-in-wordpress/ | |
// https://wp-qa.com/how-to-add-multiple-featured-image-upload-button-without-plugin-for-wordpress | |
// add these code in functions.php after add_theme_support( 'post-thumbnails' ); | |
add_theme_support( 'post-thumbnails' ); | |
add_image_size( 'case-image', 1371, 893, true ); | |
add_image_size( 'ipad-image', 2383, 1867, true ); | |
add_image_size( 'feature-image', 960, 500, true ); |
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
<style> | |
/* FAQs Schema Styling */ | |
.accordion__item { | |
margin: 0px auto 15px; | |
} | |
.accordion__item .accordion__title { | |
position: relative; | |
display: block; |
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 | |
/* FAQs Shortcode */ | |
add_shortcode( 'faqs', 'faqs_shortcode' ); | |
function faqs_shortcode() { | |
ob_start(); | |
global $post; | |
NewerOlder