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
| jQuery(document).ready(function($) { | |
| if (window.location.href.indexOf("?enqiury=completed") > -1) { | |
| $("#modal").addClass("is-active"); | |
| $(".modal-close").click(function() { | |
| $("#modal").removeClass("is-active"); | |
| }); | |
| } | |
| }); | |
| PHP VERSION |
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 | |
| /* | |
| Plugin Name: Testimonial Custom Post Type | |
| Plugin URI: http://wpbeaches.com/create-custom-post-types-in-genesis-child-theme-in-wordpress/ | |
| Description: Testimonial Custom Post Types | |
| Author: Neil Gowran | |
| Version:1.0.0 | |
| Author URI:http://wpbeaches.com | |
| */ |
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
| $terms = get_terms('should be your taxomony'); | |
| echo '<ul>'; | |
| foreach ($terms as $term) { | |
| echo '<li><a href="'.get_term_link($term).'">'.$term->name.'</a></li>'; | |
| } | |
| echo '</ul>'; |
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 | |
| /* | |
| * Loop through Categories and Display Posts within | |
| */ | |
| $post_type = 'features'; | |
| // Get all the taxonomies for this post type | |
| $taxonomies = get_object_taxonomies( array( 'post_type' => $post_type ) ); | |
| foreach( $taxonomies as $taxonomy ) : |
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 ------- | |
| // Custom pagination | |
| function pagination($pages = '', $range = 4) | |
| { | |
| $showitems = ($range * 2)+1; | |
| global $paged; | |
| if(empty($paged)) $paged = 1; | |
| if($pages == '') |
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 ------- | |
| // Custom pagination | |
| function pagination($pages = '', $range = 4) | |
| { | |
| $showitems = ($range * 2)+1; | |
| global $paged; | |
| if(empty($paged)) $paged = 1; | |
| if($pages == '') |
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
| git rm -r --cached <folder> |
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 $args = array( | |
| 'echo' => true, | |
| 'redirect' => 'http://wpsnipp.com', | |
| 'form_id' => 'loginform', | |
| 'label_username' => __( 'Username' ), | |
| 'label_password' => __( 'Password' ), | |
| 'label_remember' => __( 'Remember Me' ), | |
| 'label_log_in' => __( 'Log In' ), | |
| 'id_username' => 'user_login', | |
| 'id_password' => 'user_pass', |
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 | |
| $loop = new WP_Query( array( | |
| 'post_type' => 'Property', | |
| 'posts_per_page' => -1 | |
| ) | |
| ); | |
| ?> | |
| <?php while ( $loop->have_posts() ) : $loop->the_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
| var $src = $('#loggedout-user'), | |
| $dst = $('#user-name'); | |
| $src.on('input', function() { | |
| $dst.val($src.val()); | |
| }); | |
| // OR | |
| $('#loggedout-user').on('change', function() { | |
| $('#user-name').val($(this).val()); |