Skip to content

Instantly share code, notes, and snippets.

@nixonmedia
nixonmedia / idxwidget.php
Last active April 5, 2018 12:39
IDXwidget
<?php
$agent_id = get_field('idx_ID');
echo do_shortcode('[impress_property_showcase property_type="featured" agent_id="'.$agent_id.'" show_image="1" use_rows="1" num_per_row="3" max="12" order="low-high" styles="1" new_window="0" ]');
?>
function showBeforeMore($fullText){
$more = '<!--more-->';
if(strpos($fullText, $more)!==false){
$morePos = strpos($fullText, $more);
$rest = str_replace($more, '', $morePos);
//only show the text before the <!--more-->
<script>
// LISTING DETAIL PAGE TABS
var tabs = $j('.cd-tabs');
tabs.each(function(){
var tab = $j(this),
tabItems = tab.find('ul.cd-tabs-navigation'),
tabContentWrapper = tab.children('ul.cd-tabs-content'),
tabNavigation = tab.find('nav');
tabItems.on('click', 'a', function(event){
<style type="text/css">#IDX-quicksearch-8393 {text-align:right;}#IDX-quicksearchForm-8393 .IDX-qsLabel {margin: 0;padding-top: 3px;}#IDX-quicksearchForm-8393 .IDX-qsSelectInput {width: 180px;}#IDX-quicksearchForm-8393 .IDX-qsInput {margin: 0 2px;}#IDX-quicksearchForm-8393 > .IDX-qsFieldWrap {display: inline-block; text-align: left;}#IDX-quicksearchForm-8393 {display: inline-block;}#IDX-quicksearch-8393 { border-radius: 10px; -webkit-border-radius: 10px; border: 1px solid #ccc; box-shadow: 1px 1px 5px #777; -webkit-box-shadow: 1px 1px 5px #777; } #IDX-quicksearch-8393 label { margin: 0 5px;} #IDX-qsIdxIDWrap-8393 { margin-top: 10px; } #IDX-quicksearch-8393 select { width: 100% } .IDX-qsTextInput { width: 120px } .IDX-qsFieldWrap { padding: 5px 10px; text-align: right; } #IDX-qsMinPriceLabel-8393 { float: left; } #IDX-qsMaxPriceLabel-8393 { float: left; } #IDX-qsMinBedLabel-8393 { float:left; } #IDX-qsMinSqFtLabel-8393 { float: left; } #IDX-qsMinBathLabel-8393 { float: left; } #IDX-qsCityListLabel-8393 { float
<div class="container">
<script src="//kingswayrealty.idxbroker.com/idx/customshowcasejs.php?widgetid=8396"></script><style type="text/css"> #IDX-showcaseGallery-8396 { } #IDX-showcaseGallery-8396 .IDX-showcaseCell {width: 33.333333%; min-width: 33.333333%; padding:3px !important; vertical-align:top; display: inline-block !important; margin-bottom: 5px;} #IDX-showcaseGallery-8396 .IDX-showcaseRow {display: inline-block !important; width:100%; margin-bottom:10px;} #IDX-showcaseGallery-8396 .IDX-showcaseContainer a {height: auto !important} #IDX-showcaseGallery-8396 .IDX-showcaseLink:before{height: auto; content: none !important} #IDX-showcaseGallery-8396 .IDX-showcaseLink {display: block;position: relative; padding-top: 66%;} #IDX-showcaseGallery-8396 .IDX-showcasePhoto {max-height: 100%;margin: auto; height: auto; position: abso
<div id="IDX-main" class="IDX-notLoggedIn IDX-page-listing IDX-category-details IDX-type-default IDX-wrapper-standard IDX-widgetReferer " data-pageid="8406">
<div id="IDX-Subheader"><div id="IDX-Subheader-Global" class="IDX-Subheader-type"><p>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous" />
</p></div>
</div>
<script>
$ = jQuery;
$(document).ready(function(e) {
// when you click and element that has the attribute data-toggle="offcanvas"
// open the sidebar
$('[data-toggle="offcanvas"]').click(function () {
//add an active class to the button
<?php
function custom_posts_per_page( $query ) {
if ( $query->is_archive('success-story') ) {
set_query_var('posts_per_page', 9);
}
}
add_action( 'pre_get_posts', 'custom_posts_per_page' );
<?php
add_filter("gform_address_types", "us_address", 10, 2);
function us_address($address_types, $form_id){
$address_types["us"] = array(
"label" => "United States",
"country" => "USAB",
"zip_label" => "Zip Code",
"state_label" => "State",
"states" => array(
"" => "",
<?php
/*
Template Name: Orders
*/
get_header();
?>
<div class="container">
<h1 class="title"><?php the_title(); ?></h1>