رفتن به مطلب

goldenfont

عضو سایت
  • تعداد ارسال‌ها

    585
  • تاریخ عضویت

  • آخرین بازدید

نوشته‌ها ارسال شده توسط goldenfont

  1. ممنون

    دو تا سوال داشتم

    1- این کد رو چجوری باید بزارم ؟ چون همینو که میزارم صفحه سفید میاد ، نفهمیدم میگید باید چجوری بزارمش


    $terms = apply_filters( 'taxonomy-images-get-terms', '' );
    if ( ! empty( $terms ) ) {
    print '<ul>';
    foreach( (array) $terms as $term ) {
    print '<li><a href="' . esc_url( get_term_link( $term, $term->taxonomy ) ) . '">' . wp_get_attachment_image( $term->image_id, 'detail' ) . '</li>';
    }
    print '</ul>';
    }

    2- این کد رو چجوری تغییر بدم تا فقط یه زیر دسته خاص رو نشون بده ؟

    بسیار ممنون

    • امتیاز 1
  2. پس بزارید اینطوری بپرسم :

    این کد رو داریم :


    <ul class="dropdown_flyout_level">
    <li>
    <?php
    $args = array(
    'type' => 'product',
    'child_of' => 28,
    'orderby' => 'id',
    'order' => 'ASC',
    'hide_empty' => 1,
    'taxonomy' => 'product_cat' );
    $categories = get_categories( $args );
    echo '<ul>';
    foreach ($categories as $category) {
    $option = '<li>';
    $option .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( "نمایش تمام مطالب در %s", $category->name ) . '" ' . '>' . $category->name.'</a> ';
    $option .= "</li>\n";
    echo $option;
    }
    echo '</ul>';
    ?>
    </li>
    </ul><!-- End dropdown_flyout_level -->

    میخوایم اینو بهش اضافه کنیم :


    <?php
    $image_url = apply_filters( 'taxonomy-images-list-the-terms', '', array(
    'image_size' => 'medium'
    ) ); ?>
    <?php print $image_url; ?>

    نتیجه چجوری میشه ؟

    مرسی

  3. سلام

    میدونم تو کد زیر تو قسمت image مشکل داره

    ولی مشکلش رو نمیدونم از چیه ؟


    <?php
    $args = array(
    'type' => 'product',
    'child_of' => 28,
    'orderby' => 'id',
    'order' => 'ASC',
    'hide_empty' => 1,
    'taxonomy' => 'product_cat' );
    $categories = get_categories( $args );
    echo '<ul>';
    foreach ($categories as $category) {
    $option = '<li>';
    $option .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( "نمایش تمام مطالب در %s", $category->name ) . '" ' . '>' . $category->name.'</a> ';
    $option .= "</li>\n";
    echo $option;
    }
    echo '</ul>';
    ?>
    <?php
    $image_url = apply_filters( 'taxonomy-images-list-the-terms', '', array(
    'image_size' => 'medium'
    ) ); ?>

  4. دوستان من هم نتونستم

    اینطوری نوشتم ولی همه دسته هارو نشون میده :


    <?php $args = array(
    'orderby' => 'name',
    'order' => 'ASC',
    'limit' => -1,
    'category' => '32',
    'exclude_category' => ' ',
    'category_name' => 'فوتر-راست',
    'hide_invisible' => 1,
    'show_updated' => 0,
    'echo' => 1,
    'categorize' => 1,
    'title_li' => __('Bookmarks'),
    'title_before' => '<h3>',
    'title_after' => '</h3>',
    'category_orderby' => 'name',
    'category_order' => 'ASC',
    'class' => 'linkcat',
    'category_before' => '<li id=%id class=%class>',
    'category_after' => '</li>' ); ?>

  5. آقا همین افزونه رو نصب کردم

    کد زیر برای نمایش زیر دسته های یک دسته ی مادر هستش

    چطوری عکسی که با این افزونه گذاشتم رو به این کد اضافه کنم تا نمایش بده ؟

    ممنون


    <?php
    $args = array(
    'type' => 'product',
    'child_of' => 28,
    'orderby' => 'id',
    'order' => 'ASC',
    'hide_empty' => 1,
    'taxonomy' => 'product_cat' );
    $categories = get_categories( $args );
    echo '<ul>';
    foreach ($categories as $category) {
    $option = '<li>';
    $option .= '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( "نمایش تمام مطالب در %s", $category->name ) . '" ' . '>' . $category->name.'</a> ';
    $option .= "</li>\n";
    echo $option;
    }
    echo '</ul>';
    ?>

  6. خب اینم دقیقا همون کدیه که من منظورمه :


    <script type="text/javascript">
    //***************************************
    // Author: webkaran.com
    // Version: v2.0
    // Date: 2012-01-12
    // Description: displays the amount of time until the "dateFuture" entered below.
    // NOTE: the month entered must be one less than current month. ie; 0=January, 11=December
    // NOTE: the hour is in 24 hour format. 0=12am, 15=3pm etc
    // format: dateFuture1 = new Date(year,month-1,day,hour,min,sec)
    // example: dateFuture1 = new Date(2003,03,26,14,15,00) = April 26, 2003 - 2:15:00 pm
    dateFuture1 = new Date(2014,5,25,12,24,41);
    // TESTING: comment out the line below to print out the "dateFuture" for testing purposes
    //document.write(dateFuture +"<br />");

    //###################################
    //nothing beyond this point
    function GetCount(ddate,iid){
    dateNow = new Date(); //grab current date
    amount = ddate.getTime() - dateNow.getTime(); //calc milliseconds between dates
    delete dateNow;
    // if time is already past
    if(amount < 0){
    document.getElementById(iid).innerHTML="Now!";
    }
    // else date is still good
    else{
    hours=0;mins=0;out="";
    amount = Math.floor(amount/1000);//kill the "milliseconds" so just secs
    hours=Math.floor(amount/3600);//hours
    amount=amount%3600;
    mins=Math.floor(amount/60);//minutes
    amount=amount%60;
    if(hours != 0){out += hours +" "+((hours==1)?"ساعت":"ساعت")+", ";}
    out += mins +" "+((mins==1)?"دقیقه":"دقیقه")+", ";
    out = out.substr(0,out.length-2);
    document.getElementById(iid).innerHTML=out;
    setTimeout(function(){GetCount(ddate,iid)}, 1000);
    }
    }
    window.onload=function(){
    GetCount(dateFuture1, 'countbox1');
    //you can add additional countdowns here (just make sure you create dateFuture2 and countbox2 etc for each)
    };
    </script>
    <div id="countbox1"></div>

    این 24 ساعت رو معکوس میشماره

    چطوری میشه توش تغییر داد که مثلا 23 ساعت رو معکوس بشماره ؟

  7. بعد 4 روز آپ کردم

    این کدهای مربوط به تایمر :


    <div id="kol" style="line-height: 2" align="center">لطفاً <div id="countdown" style="font-size: 20px;font-weight: bold"></div> صبر کنيد</div>
    <div id="show_but" style="display: none">
    <!--End Download Buttons-->
    <ul id="download_buttons">
    <li class="right"><a href="http://picor.ir" class="button">دانلود<span>کليک کنيد</span></a></li>
    </ul>
    <!--End Download Buttons-->
    </div>
    <script type="text/javascript">
    var seconds = 15;setTimeout(updateCountdown, 1000);function updateCountdown() {seconds--;
    if (seconds > 0) { document.getElementById('countdown').innerHTML = seconds; setTimeout(updateCountdown, 1000);} else { document.getElementById('kol').style.display = "none";document.getElementById('show_but').style.display = "inline"; }}
    </script>
    </div>

    حالا چجوری باید تغییر بدم کدهارو تا به این شکل :

    24:00

    23:59

    23:58

    و . . .

    0:0

    تغییر کنه ؟

  8. آخرین توانم رو به کار انداختم و به این رسیدم :


    <div class="slides center">
    <div class="slideItem">
    <a href="/"><img src="LINK PIC"></a><div id="timer">5 ساعت</div></div>
    <div class="slideItem">
    <a href="/"><img src="LINK PIC"></a><div id="timer">10ساعت</div></div>

    و JS :


    /*!
    * jQuery Slider Plugin - v1.0
    */
    (function(a){a.fn.extend({dkSlider:function({var c={autoplay:false,speed:"slow",interval:5000,onTabClick:function(){}};var b=a.extend(c,;return this.each(function(){var l,q,o,p=true,f=b,k=a(this),g=a(".tabItem",k),n=a(".slideItem",k),s=a(".backward",k),m=a(".forward",k),r=a(".sep",k);a(".tabItem:eq(0)",k).addClass("current");a(".tabItem:eq(0)",k).parent().next(".sep").hide();a(".slideItem",k).hide();a(".slideItem:eq(0)",k).show();if(f.autoplay){l=a(".current",k).index()+1;o=a(".tabItem:eq("+l+")",k);q=setTimeout(e,f.interval)}g.click(function(i){if(!a(this).hasClass("current")){o=a(this);j();if(f.autoplay){clearTimeout(q);q=setTimeout(e,f.interval)}i.preventDefault()}});m.click(function(i){if(l==undefined){l=1}o=a(".tabItem:eq("+l+")",k);j();if(f.autoplay){clearTimeout(q);q=setTimeout(e,f.interval)}i.preventDefault()});s.click(function(i){if(l==1||l==undefined){l=g.length-1}else{if(l==0){l=g.length-2}else{l-=2}}o=a(".tabItem:eq("+l+")",k);j();if(f.autoplay){clearTimeout(q);q=setTimeout(e,f.interval)}i.preventDefault()});if(f.autoplay){n.mouseenter(function(){h()}).mouseleave(function(){d()})}function e(){j();clearTimeout(q);q=setTimeout(e,f.interval)}function j(){if(g.length>1){a(".current",k).removeClass("current");o.addClass("current");r.show();o.parent().prev(".sep").hide();o.parent().next(".sep").hide();l=a(".tabItem",k).index(o);a(".slideItem:visible",k).fadeOut(f.speed);a(".slideItem:eq("+a(".tabItem",k).index(o)+")",k).fadeIn(f.speed);l!=(g.length-1)?l+=1:l=0;o=a(".tabItem:eq("+l+")",k);f.onTabClick()}}function h(){clearTimeout(q);p=false}function d(){if(!p){p=false;q=setTimeout(e,f.interval)}}})}})})(jQuery);

    همچیش درست شد مشکل فقط اینه که تو استایل دوم نمیدونم چرا عکس رو نمایش نمیده !

×
×
  • اضافه کردن...