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 | |
| include('cutom_loop_shortcode.php'); | |
| add_shortcode('loop_custom_shortcode', 'loop_custom_function'); |
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 | |
| include('cutom_loop_shortcode.php'); | |
| add_shortcode('loop_custom_shortcode', 'loop_custom_function'); |
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 | |
| function custom_loop_function( $atts ) { | |
| ob_start(); | |
| $opts = shortcode_atts( array( | |
| 'type' => 'post_type_option', | |
| ), $atts ); | |
| $output = ''; | |
| $args = array( | |
| 'post_type' => $opts['type'], | |
| 'posts_per_page' => '10', |
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(){ | |
| jQuery(".content_toggle").hide(); | |
| jQuery(".toggle_box").on("click", function(){ | |
| jQuery(this).prev('.content_toggle').slideToggle(200); | |
| jQuery(this).html(jQuery(this).html() == '<strong>Show More</strong>' ? '<strong>Show Less</strong>' : '<strong>Show More</strong>'); | |
| }); | |
| }); |
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 | |
| $id = get_the_ID (); | |
| // Add Thumbnail Theme Support | |
| add_theme_support('post-thumbnails'); | |
| add_image_size('large', 700, '', true); // Large Thumbnail | |
| add_image_size('medium', 250, '', true); // Medium Thumbnail | |
| add_image_size('small', 120, '', true); // Small Thumbnail | |
| add_image_size('custom-size', 700, 200, true); // Custom Thumbnail Size call using the_post_thumbnail('custom-size'); | |
| /* | |
| Get image with custom size: small, thumbnail, medium, large, full, array(custom_width,custom_height) |
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 | |
| jQuery(document).ready(function() { | |
| // Configure/customize these variables. | |
| var showChar = 160; // How many characters are shown by default | |
| var ellipsestext = "..."; | |
| var moretext = "Read more"; | |
| var lesstext = "Close"; | |
| jQuery('.more').each(function() { |
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 | |
| /*Get Latest Post New*/ | |
| add_shortcode('content_slider', 'getPostSlide'); | |
| /** | |
| * | |
| */ | |
| function getPostSlide($atts) | |
| { | |
| ob_start(); | |
| $args = array( |
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 | |
| function adddotstring($strNum) { | |
| $len = strlen($strNum); | |
| $counter = 3; | |
| $result = ""; | |
| while ($len - $counter >= 0) | |
| { | |
| $con = substr($strNum, $len - $counter , 3); | |
| $result = '.'.$con.$result; |
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> | |
| (function($) { | |
| $(document).on('facetwp-loaded', function() { | |
| $('html, body').animate({ | |
| scrollTop: $('.facetwp-template').offset().top | |
| }, 500); | |
| }); | |
| })(jQuery); | |
| </script> |
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 | |
| return array( | |
| "post_type" => "hotel", | |
| "post_status" => "publish", | |
| "meta_key" => "premium_listing", | |
| "orderby" => array( "meta_value_num" => "DESC", "title" => "ASC" ), | |
| "posts_per_page" => 10, | |
| ); |