Jump to content

princesohrab

Members
  • Posts

    55
  • Joined

  • Last visited

Posts posted by princesohrab

  1. I've gone through it and I still can't figure it out. How do I add the specific query here?<?php $the_query = new WP_Query('showposts=6&post_type=listings') ?> Or si it here?<?php while ( $the_query->have_posts() ) : $the_query->the_post();?> All I need this query to do is list all the posted properties that have the taxonomy "Flats" only and leave the rest. I'm very novice to php.Thanks for your help

  2. Sorry guys I think this is the code that displays the thumbnails-------------------- <!-- lettings - Listings starts--> <div class="row"> <h3 id="latest-listings"><span>Properties To Let</span></h3> <?php $the_query = new WP_Query('showposts=6&post_type=listings') ?> <?php if($the_query->found_posts == 0){ for($i=1; $i<=6; $i++){echo dummy_listings();} }else{ ?> <?php while ( $the_query->have_posts() ) : $the_query->the_post();?> <div class="four columns listing"> <div class="post-container short"> <?php echo has_post_thumbnail() ? my_get_image(true) : my_get_image_blank(true);?> <h5><a href="<?php the_permalink();?>"><?php the_title();?> </a></h5> <p>added <?php the_time('F j, Y');?><a class="small button" href="<?php the_permalink();?>">→</a></p> </div> </div> <?php endwhile; wp_reset_postdata();?> <?php } ?> </div><!--end row--><!-- short term lets - Listings ends-->

  3. Hey all, I am creating a site for a realtor/estate agent and I am trying to search specific listings and display the relevant posts on a page as thumbnails item. Using the code below, how do I add a condition to display for example, only properties which has taxonomies (1 Bedroom only). The code below is checking for everypost and display them, but I want it to be specific to taxonomies. The taxonomies I have for the listings are as follows:FlatsHouseApartmentStudio, etc........ All I want is a condition to dis play specific properties. I have the following lines which finds the posts and then display them.

    <div class="post-container short">   <?php if(have_posts()):?>   <?php while(have_posts()):the_post();?>   <div class="post-title">    <h1><a href="<?php the_permalink();?>"><?php the_title();?> </a></h1>       </div><!--post-title-->      <?php if($post->post_content != ''): ?>    <div class="post-content">	 <?php the_content();?>    </div><!--post-contetn-->    <?php endif; ?>   <?php endwhile;?>     <?php endif;?>   </div><!--post-container-->

    Thanks in advance.

  4. How do I use this script for multiple element which works independently on the same page, can anyone help please..

    <script type="text/javascript" >$(document).ready(function() {   $(".slideDiv").hide();   $(window).load(function () {    $(".toggle").click(function () {  				$(".slideDiv").slideToggle(800);<!----change to any amount or use presets "slow" "fast" etc----->    });});});</script>

    The html bit:

    <div class="toggle"> Click To Read More</div><div class="slideDiv">  <div class="p-text-wrap-box-1-left">   <p>We are a company providing tours, siteseeing, outing and contractual service to tourist industry and includes hotels and tourists related businesses. We run a pre-booked system and we are always ready to be on the move at any given time. <a href="about.html">Read more</a> about us.</p>  </div><!--ends p-text-wrap-box-1-left--></div><!--slideDiv-->

  5. should anything be changed here--------------------------------------------------------- /*Yetii - Yet (E)Another Tab Interface Implementation,version 1.5,http://www.kminek.pl/lab/yetii/,Copyright © Grzegorz Wojcik,Code licensed under the BSD License: http://www.kminek.pl/bsdlicense.txt*/function Yetii(){this.defaults={id:null,active:1,interval:null,wait:null,persist:null,tabclass:'tab',activeclass:'active',callback:null,leavecallback:null};this.activebackup=null;for(var h in arguments[0]){this.defaults[h]=arguments[0][h]};this.getTabs=function(){var b=[];var a=document.getElementById(this.defaults.id).getElementsByTagName('*');var c=new RegExp("(^|\\s)"+this.defaults.tabclass.replace(/\-/g,"\\-")+"(\\s|$)");for(var d=0;d<a.length;d++){if(c.test(a[d].className))b.push(a[d])}return b};this.links=document.getElementById(this.defaults.id+'-nav').getElementsByTagName('a');this.listitems=document.getElementById(this.defaults.id+'-nav').getElementsByTagName('li');this.show=function(B){for(var a=0;a<this.tabs.length;a++){this.tabs[a].style.display=((a+1)==B)?'block':'none';if((a+1)==B){this.addClass(this.links[a],this.defaults.activeclass);this.addClass(this.listitems[a],this.defaults.activeclass+'li')}else{this.removeClass(this.links[a],this.defaults.activeclass);this.removeClass(this.listitems[a],this.defaults.activeclass+'li')}}if(this.defaults.leavecallback&&(b!=this.activebackup))this.defaults.leavecallback(this.defaults.active);this.activebackup=b;this.defaults.active=b;if(this.defaults.callback)this.defaults.callback(B)};this.rotate=function(B){this.show(this.defaults.active);this.defaults.active++;if(this.defaults.active>this.tabs.length)this.defaults.active=1;var a=this;if(this.defaults.wait)clearTimeout(this.timer2);this.timer1=setTimeout(function(){a.rotate(B)},b*1000)};this.next=function(){this.defaults.active++;if(this.defaults.active>this.tabs.length)this.defaults.active=1;this.show(this.defaults.active)};this.previous=function(){this.defaults.active--;if(!this.defaults.active)this.defaults.active=this.tabs.length;this.show(this.defaults.active)};this.gup=function(B){b=b.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var a="[\\?&]"+b+"=([^]*)";var c=new RegExp(a);var d=c.exec(window.location.href);if(d==null)return null;else return d[1]};this.parseurl=function(B){var a=this.gup(B);if(a==null)return null;if(parseInt(a))return parseInt(a);if(document.getElementById(a)){for(var c=0;c<this.tabs.length;c++){if(this.tabs[c].id==a)return(c+1)}}return null};this.createCookie=function(b,a,c){if©{var d=new Date();d.setTime(d.getTime()+(c*24*60*60*1000));var f="; expires="+d.toGMTString()}else var f="";document.cookie=b+"="+a+f+"; path=/"};this.readCookie=function(B){var a=b+"=";var c=document.cookie.split(';');for(var d=0;d<c.length;d++){var f=c[d];while(f.charAt(0)==' ')f=f.substring(1,f.length);if(f.indexOf(a)==0)return f.substring(a.length,f.length)}return null};this.contains=function(b,a,c){return b.indexOf(a,c)!=-1};this.hasClass=function(b,a){return this.contains(b.className,a,' ')};this.addClass=function(b,a){if(!this.hasClass(b,a))b.className=(b.className+' '+a).replace(/\s{2,}/g,' ').replace(/^\s+|\s+$/g,'')};this.removeClass=function(b,a){b.className=b.className.replace(new RegExp('(^|\\s)'+a+'(?:\\s|$)'),'$1');b.className.replace(/\s{2,}/g,' ').replace(/^\s+|\s+$/g,'')};this.tabs=this.getTabs();this.defaults.active=(this.parseurl(this.defaults.id))?this.parseurl(this.defaults.id):this.defaults.active;if(this.defaults.persist&&this.readCookie(this.defaults.id))this.defaults.active=this.readCookie(this.defaults.id);this.activebackup=this.defaults.active;this.show(this.defaults.active);var e=this;for(var g=0;g<this.links.length;g++){this.links[g].customindex=g+1;this.links[g].onclick=function(){if(e.timer1)clearTimeout(e.timer1);if(e.timer2)clearTimeout(e.timer2);e.show(this.customindex);if(e.defaults.persist)e.createCookie(e.defaults.id,this.customindex,0);if(e.defaults.wait)e.timer2=setTimeout(function(){e.rotate(e.defaults.interval)},e.defaults.wait*1000);return false}}if(this.defaults.interval)this.rotate(this.defaults.interval)};

  6. Hi all, I am using this product rotator and I am trying to make it work with various product on the same page. Is it possible to have multiple image rotators on a page? I'm doing a site that I would love to use this on, but when I add the second one, only the first one works, the rest doesn't.. Is there a way around it? I have tried adding different: id:'productImages, productImages-2, productImages-3',But still only the first one works. Can anyone please help with the re-writing of this script.Your help would be greatly appreciatedThank You -----------------------------------------------------------------------<script type="text/javascript"> $(document).ready(function(){ }); var tabber1 = new Yetii({ id: 'productImages', interval:3 }); </script>--------------------------------------------------------------------------Example can be seen and downloaded at http://www.dreamweavertutorial.co.uk/dreamweaver/video/product-image-rotator-zoomer-dreamweaver-part2.htm I have also tried using ----var $IR = jQuery.noConflict();------ but in vain

×
×
  • Create New...