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_shortcode('portfolio-page-content','portfolioPageContent'); | |
function portfolioPageContent() { | |
$terms = get_terms( array( | |
'taxonomy' => 'city', | |
'hide_empty' => false, | |
) ); | |
?> | |
<?php |
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
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.min.js"></script> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
var author = "Please enter in your name"; | |
var mail = "Please enter a valid email address"; | |
var comment = "Message box can't be empty!"; | |
$('#commentform').validate({ |
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
$next_link = get_permalink(get_adjacent_post(false,'',false)); | |
$next_label = get_next_post()->post_title; | |
$prev_link = get_permalink(get_adjacent_post(false,'',true)); | |
$prev_label = get_previous_post()->post_title; | |
$prev_post = get_previous_post(); | |
$next_post = get_next_post(); | |
$prev_thumbnail = get_the_post_thumbnail($prev_post->ID, 'thumbnail', array('class' => 'prev_img_thumbnail') ); | |
$next_thumbnail = get_the_post_thumbnail($next_post->ID, 'thumbnail', array('class' => 'next_img_thumbnail')); | |
$blogpageID = get_option( 'page_for_posts' ); |
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 namespace_add_custom_types( $query ) { | |
if ( $query->is_search ) | |
$query->set( 'post_type', array( 'post','page','country','location','experience','trip-theme') ); | |
return $query; | |
} | |
add_filter( 'pre_get_posts', 'namespace_add_custom_types' ); |
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 my_hide_shipping_when_free_is_available( $rates, $available_methods ) { | |
/* echo "<pre>"; | |
print_r($rates); | |
echo "</pre>"; */ | |
$free = array(); | |
foreach ( $rates as $rate_id => $rate ) { | |
if ( 'extra_shipping' === $rate->method_id ) { | |
$free[ $rate_id ] = $rate; | |
break; |
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_shortcode('custom-form-script','customFormFunction'); | |
function customFormFunction($atts){ | |
$atts = shortcode_atts( | |
array( | |
'repeat' => '', | |
), $atts, 'repeatself' ); | |
ob_start(); | |
$contentSortcode = ob_get_contents( ); | |
ob_get_clean( ); |
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
/****************** Blog post load more **************************/ | |
add_shortcode('blog-post-load-more','blogpostloadmore'); | |
function blogpostloadmore(){ | |
ob_start(); | |
$postsPerPage =12; | |
$args = array( | |
'post_type' => '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
function namespace_add_custom_types( $query ) { | |
if ( $query->is_search ) | |
// example 'post','page','country','location','experience','trip-theme' | |
$query->set( 'post_type', array( 'post','page','country','location','experience','trip-theme') ); | |
return $query; | |
} | |
add_filter( 'pre_get_posts', 'namespace_add_custom_types' ); | |
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_shortcode('current-page-title', 'currentpagetitle'); | |
function currentpagetitle() { | |
$currentpagetitle = ''; | |
$currentpagetitle .= '<input name="currentpagetitle" hidden value="'.get_the_title().'">'; | |
return $currentpagetitle; | |
} | |
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
<video id="video1" autoplay width="420" poster="http://storesafe.resident360.com/wp-content/uploads/2017/07/Screenshot_1-1.png"><source src="http://storesafe.resident360.com/wp-content/uploads/2017/07/Store-Safe.mp4" type="video/mp4"><source src="mov_bbb.ogg" type="video/ogg">Your browser does not support HTML5 video.</video> | |
<div class="play_button"<button onclick="playPause()">Play/Pause</button></div> | |
<script> | |
function playPause() | |
{ | |
if (myVideo.paused) | |
myVideo.play(); | |
else | |
myVideo.pause(); |
OlderNewer