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
<!-- Load CSS --> | |
<script> | |
function loadCSS(hf) { | |
var ms = document.createElement("link"); | |
ms.rel = "stylesheet"; | |
ms.href = hf; | |
document.getElementsByTagName("head")[0].appendChild(ms); | |
} | |
loadCSS("css/fonts.css"); //User Styles: Fonts | |
loadCSS("css/style.css"); //User Styles: Main |
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 if( have_rows('slider') ): ?> | |
<?php while( have_rows('slider') ): the_row(); | |
// vars | |
$image = get_sub_field('image'); | |
$heading = get_sub_field('heading'); | |
$disclaimer = get_sub_field('title'); | |
?> |
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="tables"> | |
<div class="tables-col ac"> | |
<?php if ( have_posts() ) : query_posts( 'cat=4'); while (have_posts()) : the_post(); ?> | |
<div class="table <?php $tag = get_field('tag'); | |
echo $tag?>"> | |
<div class="swiper-container gallery-top"> | |
<div class="swiper-wrapper"> | |
<?php if (have_rows('imgs')): ?> |
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
//insert this code after #END WordPress | |
<FilesMatch "^.*(error_log|wp-config\.php|php.ini|\.[hH][tT][aApP].*)$"> | |
Order allow,deny | |
Deny from all | |
</FilesMatch> | |
OR | |
<Files wp-config.php> |
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
show_admin_bar(false); | |
add_theme_support('post-thumbnails'); | |
remove_action( 'wp_head', 'feed_links_extra', 3 ); | |
remove_action( 'wp_head', 'feed_links', 2 ); | |
remove_action( 'wp_head', 'rsd_link' ); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
remove_action('wp_head', 'wp_generator'); |
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
//Active menu | |
$("li a").each(function() { | |
if (this.href == window.location.href) { | |
$(this).addClass("active"); | |
} | |
}); |
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
@mixin max-width($width) { | |
@media screen and (max-width: $width) { | |
@content; | |
} | |
} | |
.container { | |
position: relative; | |
display: flex; | |
flex-flow: row wrap; |
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
//destination file: functions.php | |
add_action('template_redirect', 'single_result'); | |
function single_result() { | |
if (is_search()) { | |
global $wp_query; | |
if ($wp_query->post_count == 1) { | |
wp_redirect( get_permalink( $wp_query->posts['0']->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
{% if collection %} | |
<ul> | |
{% assign typeList = '' %} | |
<!-- if we have a collection, then we don't need to access it through collections... --> | |
{% for product in collection.all_products %} | |
{% capture type %}{{product.type}}{% endcapture %} | |
<!-- using 'unless' instead of 'if () do nothing else do something' --> | |
{% unless typeList contains type %} | |
<li>{{ product.type | link_to_type }}</li> | |
{% capture temp %}{{typeList}}{{product.type}}{% endcapture %} |
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
$query = new WP_Query( $args ); | |
if ( $query->have_posts() ) { ?> | |
<table> | |
<?php $i = 0; | |
while( $query->have_posts() ) { | |
$query->the_post(); ?> | |
<?php if($i == 0){ echo "<tr>"; }?> | |
<td class="item_post_man"> | |
<a href="<?php echo get_permalink(); ?>"> | |
<?php if ( has_post_thumbnail() ) { |
OlderNewer