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 ( get_field( 'featured_post' ) ): ?> | |
<li class="grid-item grid-item-half"> | |
<?php | |
get_template_part('project-archive-content'); | |
?> | |
</li> | |
<?php else: // field_name returned false ?> |
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
/** | |
* Hide editor for specific page templates. | |
* | |
*/ | |
add_action( 'admin_init', 'hide_editor' ); | |
function hide_editor() { | |
// Get the Post 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
#################### | |
###HTTPS REDIRECT### | |
#################### | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
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
<!-- ENSURE BELOW PASTES DIRECTLY INTO THE HEAD OF THE PAGE --> | |
<!-- SMOOTH SCROLL --> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script> | |
$(function() { | |
$('a[href*=#]:not([href=#])').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); |
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
.menu-header-menu-container li, | |
div.menu li { | |
float: left; | |
position: relative; | |
} | |
.menu-header-menu-container ul ul { | |
display: none; | |
position: absolute; | |
top: 38px; |
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
<!-- BELOW IS THE CONTAIN THAT HOLDS THE MAP, YOU CAN DICTATE THE SIZE HERE --> | |
<div class="mapcontainer"><div id="map-canvas" style="height:400px; width:100%;"></div></div> | |
<script> | |
function initialize() { | |
// THE myLatlng VARIABLE DEFINES WHERE THE RADIUS IS GOING TO LAND | |
var myLatlng = new google.maps.LatLng(52.487600, -1.892821); | |
// THE myHome VARIABLE DEFINES WHERE THE PIN IS GOING TO LAND | |
var myHome = new google.maps.LatLng(52.699866, -1.991307); | |
var mapOptions = { |
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
Get the skin folder | |
<?php echo $this->getSkinUrl('FOLDERNAME/FILENAME.png');?> | |
This can be used in lots of different contexts, here is an example: | |
<link rel="apple-touch-icon" sizes="144x144" href="<?php echo $this->getSkinUrl('images/apple-touch.png');?>"> |
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 src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<style> | |
.container { | |
width: 100%; | |
max-width: 500px; | |
max-height: 700px; | |
height: 700px; | |
position: relative; | |
border: 1px solid #ccc; |
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
The if statement targets the URL | |
Add an ID to the target you want to add the class to, | |
Then enter it into the following line, alongside the name of the class you want: | |
"jQuery('#ID-NAME').addClass('CLASS-NAME');" | |
<!-- CODE TO USE IS BELOW --> | |
jQuery(function() { | |
var loc = window.location.href; // returns the full URL |
NewerOlder