رفتن به مطلب

reza-m

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

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

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

نوشته‌ها ارسال شده توسط reza-m

  1. سلام خدمت دوستان

    سایت من ابتدای راه اندازی سرعت لودش 11.1 ثانیه بود و تقریبا قابل قبول بود

    ولی الان لود کامل طبق gtmetrix تقریبا 35 الی 40 و خورده ای ثانیه میشه.

    باید چیکار کنم؟؟؟

     

  2. در در 8/14/2017 at 16:39، behi76 گفته است :

    سلام دوست عزیز

    این سوال من هم هست ، من دانش php  در حد عالی نیست و با اطلاعات ابتدایی خودم وقتی اضاف میکنم سایت ارور میده:(

    اگه یکی از دوستان برنامه نویس کمکمون کنه خوبه

    سلام من یاد گرفتم 

    از قسمت ویرایش قالب برید بخش 

    frontend-menu.php 

    بعد این کد رو جایگزین کنید درست میشه

    <?php
    
    global $kiwi_theme_option; 
    
    $task       = ! empty( $_GET['task'] ) ? $_GET['task'] : 'dashboard';
    $icon_css   = apply_filters( "fes_vendor_dashboard_menu_icon_css", "icon-white" ); //else icon-black/dark
    $menu_items = EDD_FES()->dashboard->get_vendor_dashboard_menu();
    
    $x = 0;
    
    $url_id_vendor = $kiwi_theme_option['marketplace-enablelinks-dashboard'];
    $vendor_link = get_page_link ($url_id_vendor);
    ?>
    
    <div class="container-fluid mp-fes-vendor-menu">
    
    <div class="container align-center"> 
    <div class="row">
    
    <?php foreach ( $menu_items as $item => $values ) : $values["task"] = isset( $values["task"] ) ? $values["task"] : ''; ?>
    <?php $x++; endforeach; ?>
    		
    <?php 
    	 if ( $x >= '9' ) {
    		$div_number = 'mp-dashboard-links-limit'; 
    	} else {
    		$div_number = 'mp-dashboard-links'; 
    	} 	
    ?>
    
    
    <nav class="fes-vendor-menu">
    	<ul class="<?php echo esc_attr( $div_number ); ?>">
    		<?php foreach ( $menu_items as $item => $values ) : $values["task"] = isset( $values["task"] ) ? $values["task"] : ''; ?>		
    			<li class="<?php if ( $task === $values["task"]  ) { echo "active"; } ?>">				
    				<a href='<?php echo esc_url( add_query_arg( 'task', $values["task"], $vendor_link ) ); ?>'>
    					<i class="icon icon-<?php echo esc_attr( $values["icon"] ); ?> <?php echo esc_attr( $icon_css ); ?>"></i> <span class="hidden-phone hidden-tablet"><?php echo isset( $values["name"] ) ? $values["name"] : $item; ?></span>
    				</a>
    			</li>
    		<?php 
    		endforeach; ?>
    			<li class="checkout-dashboard">				
    				<a href="لینک تسویه حساب">
    					<i class="icon icon-gift icon-white"></i> <span class="hidden-phone hidden-tablet">تسویه حساب</span>
    				</a>
    			</li>
    	</ul>
    </nav>
    
    
    </div>
    </div>
    
    </div>
    
    <div class="container mp-full-dashboard">

     

  3. سلام 

    همونطور که میدونید در افزونه edd بخشی به عنوان درخواست برداشت وجه وجود نداره

    حالا چطور میشه در قسمت زیر که عکسش رو گذاشتم یه عنوان دیگه ای اضافه کرد با نام برداشت وجه که به یک برگه بشه متصلش کرد و اونجا فرم تماسی چیزی گذاشت

     

    111.JPG

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

    من از افزونه wp-sms میخوام استفاده کنم و برای استفاده از اون باید در قسمت تنظیمات افزونه تیک افزودن شماره موبایل به فیلد رو حتما فعال کنم.

    حالا از قبل این فیلد هست و درواقع 2 تا فیلد شماره موبایل ایجاد میشه.

    از کجا باید فیلد موبایلی که تو قالب از ابتدا بوده حذفش کنم؟؟؟ (داخل فایل function.php گشتم چیزی نبود از شماره موبایل)

    ممنون

  5. کدهای single.php:

    <?php get_header(); ?>

    <div id="main">

    <?php while(have_posts()): the_post(); ?>

    <?php if(get_option('pyre_posts_navigation') == 'On'): ?>

    <div class="post-navigation">

    <div class="alignright"><?php previous_post_link('%link', __('نوشته قبلی', 'pyre') . ' →', 'no'); ?></div>

    <div class="alignleft"><?php next_post_link('%link', '← ' . __('نوشته بعدی', 'pyre'), 'no'); ?></div>

    <div class="clear"></div>

    </div>

    <?php endif; ?>

    <div id="post-wrapper" <?php post_class(); ?>>

    <div id="post-header">

    <h1><?php the_title(); ?></h1>

    <span class="post-comment-box"><?php comments_popup_link('0', '1', '%'); ?></span>

    <div class="post-meta">

    <span class="author"><?php the_author_posts_link() ?></span>

    <span class="date"><?php the_date('F d, Y'); ?></span>

    <?php if(get_option('pyre_categories') == 'On'): ?>

    <span class="category"><?php the_category(', '); ?></span>

    <?php endif; ?>

    </div>

    </div>

    <div id="post">

    <?php if(has_post_thumbnail() && get_option('pyre_posts_featured') == 'On'): ?>

    <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'featured-image'); ?>

    <img src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>" class="featured-image" width="600" />

    <?php endif; ?>

    <div class="post-content">

    <?php if(

    (

    get_post_meta($post->ID, 'pyre_overall_score', true) ||

    (get_post_meta($post->ID, 'pyre_critera_1', true) && get_post_meta($post->ID, 'pyre_critera_1_score', true)) ||

    (get_post_meta($post->ID, 'pyre_critera_2', true) && get_post_meta($post->ID, 'pyre_critera_2_score', true)) ||

    (get_post_meta($post->ID, 'pyre_critera_3', true) && get_post_meta($post->ID, 'pyre_critera_3_score', true)) ||

    (get_post_meta($post->ID, 'pyre_critera_4', true) && get_post_meta($post->ID, 'pyre_critera_4_score', true)) ||

    (get_post_meta($post->ID, 'pyre_critera_5', true) && get_post_meta($post->ID, 'pyre_critera_5_score', true))

    )

    ): ?>

    <div class="post-review">

    <?php if(get_post_meta($post->ID, 'pyre_overall_score', true)): ?>

    <div class="overall-score"><img src="<?php bloginfo('template_directory'); ?>/images/stars/big_<?php echo get_post_meta($post->ID, 'pyre_overall_score', true); ?>.png" alt="" /></div>

    <?php endif; ?>

    <ul>

    <?php if(get_post_meta($post->ID, 'pyre_critera_1', true)): ?>

    <li><?php echo get_post_meta($post->ID, 'pyre_critera_1', true); ?> <span class="score"><img src="<?php bloginfo('template_directory'); ?>/images/stars/<?php echo get_post_meta($post->ID, 'pyre_critera_1_score', true); ?>.png" alt="" /></span></li>

    <?php endif; ?>

    <?php if(get_post_meta($post->ID, 'pyre_critera_2', true)): ?>

    <li><?php echo get_post_meta($post->ID, 'pyre_critera_2', true); ?> <span class="score"><img src="<?php bloginfo('template_directory'); ?>/images/stars/<?php echo get_post_meta($post->ID, 'pyre_critera_2_score', true); ?>.png" alt="" /></span></li>

    <?php endif; ?>

    <?php if(get_post_meta($post->ID, 'pyre_critera_3', true)): ?>

    <li><?php echo get_post_meta($post->ID, 'pyre_critera_3', true); ?> <span class="score"><img src="<?php bloginfo('template_directory'); ?>/images/stars/<?php echo get_post_meta($post->ID, 'pyre_critera_3_score', true); ?>.png" alt="" /></span></li>

    <?php endif; ?>

    <?php if(get_post_meta($post->ID, 'pyre_critera_4', true)): ?>

    <li><?php echo get_post_meta($post->ID, 'pyre_critera_4', true); ?> <span class="score"><img src="<?php bloginfo('template_directory'); ?>/images/stars/<?php echo get_post_meta($post->ID, 'pyre_critera_4_score', true); ?>.png" alt="" /></span></li>

    <?php endif; ?>

    <?php if(get_post_meta($post->ID, 'pyre_critera_5', true)): ?>

    <li><?php echo get_post_meta($post->ID, 'pyre_critera_5', true); ?> <span class="score"><img src="<?php bloginfo('template_directory'); ?>/images/stars/<?php echo get_post_meta($post->ID, 'pyre_critera_5_score', true); ?>.png" alt="" /></span></li>

    <?php endif; ?>

    </ul>

    </div>

    <?php endif; ?>

    <?php the_content(); ?>

    <div class="clear"></div>

    <?php wp_link_pages(); ?>

    </div>

    <?php if(get_option('pyre_tags') == 'On'): ?>

    <div class="post-tags">

    <?php the_tags('', ''); ?>

    </div>

    <?php endif; ?>

    </div>

    <div class="rokesh-social-buttons">

    <ul>

    <li class="fb"><a href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>" target="_blank" rel="nofollow">اشتراک گذاری در فیسبوک</a></li>

    <li class="tw"><a href="http://twitter.com/intent/tweet?text=<?php the_title(); ?>&url=<?php the_permalink(); ?>" target="_blank" rel="nofollow">اشتراک گذاری در توییتر</a></li>

    <li class="pl"><a href="https://plus.google.com/share?url=<?php the_permalink(); ?>" target="_blank" rel="nofollow">اشتراک گذاری در گوگل پلاس</a></li>

    <li class="li"><a href="http://www.linkedin.com/sharearticle?mini=true&url=<?php the_permalink(); ?>&title=<?php the_title(); ?>" target="_blank" rel="nofollow">اشتراک گذاری در لینکداین</a></li>

    <h4>به اشتراک بگذارید </h4>

    </ul>

    </div>

    <?php if(get_option('pyre_author') == 'On'): ?>

    <div class="post-box-wrapper first">

    <div class="post-box">

    <h5>درباره نویسنده</h5>

    <?php echo get_avatar(get_the_author_meta('email'), '75'); ?>

    <p><?php the_author_meta("description"); ?></p>

    <?php if(get_the_author_meta('twitter') || get_the_author_meta('facebook')): ?>

    <p>

    <?php if(get_the_author_meta('twitter')): ?>

    <a href='http://twitter.com/<?php echo get_the_author_meta('twitter'); ?>'>توئیتر</a>

    <?php endif; ?>

    <?php if(get_the_author_meta('twitter') || get_the_author_meta('facebook')): ?>

    -

    <?php endif; ?>

    <?php if(get_the_author_meta('facebook')): ?>

    <a href='http://facebook.com/<?php echo get_the_author_meta('facebook'); ?>'>فیسبوک</a>

    <?php endif; ?>

    </p>

    <?php endif; ?>

    </div>

    </div>

    <?php endif; ?>

    <?php $tags = get_the_tags(); ?>

    <?php if($tags): ?>

    <?php $related = get_related_posts($post->ID, $tags); ?>

    <?php if($related->have_posts() && get_option('pyre_related') == 'On'): ?>

    <?php $count = 1; ?>

    <div class="post-box-wrapper">

    <div class="post-box">

    <h5>نوشته‌های مرتبط</h5>

    <?php while($related->have_posts()): $related->the_post(); ?>

    <?php if($count == 4): $count = 1; endif; if($count == 3): $class = 'last'; else: $class = ''; endif; ?>

    <?php if(has_post_thumbnail()): ?>

    <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'related-posts-image'); ?>

    <div class="related-item <?php echo $class; ?>">

    <h1> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>" /></a><h1>

    </div>

    <?php endif; ?>

    <?php $count++; endwhile; ?>

    </div>

    </div>

    <?php endif; ?>

    <?php endif; ?>

    <?php wp_reset_query(); ?>

    <?php if(

    get_option('pyre_twitter') == 'On' ||

    get_option('pyre_facebook') == 'On' ||

    get_option('pyre_digg') == 'On' ||

    get_option('pyre_stumbleupon') == 'On' ||

    get_option('pyre_reddit') == 'On' ||

    get_option('pyre_tumblr') == 'On' ||

    get_option('pyre_email') == 'On' ||

    get_option('pyre_google') == 'On'

    ): ?>

    <div class='post-share'>

    <?php if(get_option('pyre_twitter') == 'On'): ?>

    <div class='twitter-share share-widget'>

    <a href="http://twitter.com/share" class="twitter-share-button" data-text='<?php the_title(); ?>' data-count="vertical">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

    </div>

    <?php endif; ?>

    <?php if(get_option('pyre_facebook') == 'On'): ?>

    <div class='facebook-share share-widget'>

    <iframe src="//www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&send=false&layout=box_count&width=46&show_faces=true&action=like&colorscheme=light&font=arial&height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:46px; height:65px;" allowTransparency="true"></iframe>

    </div>

    <?php endif; ?>

    <?php if(get_option('pyre_digg') == 'On'): ?>

    <div class='digg-share share-widget'>

    <script type="text/javascript">

    (function() {

    var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];

    s.type = 'text/javascript';

    s.async = true;

    s.src = 'http://widgets.digg.com/buttons.js';

    s1.parentNode.insertBefore(s, s1);

    })();

    </script>

    <a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=<?php echo urlencode(get_permalink($post->ID)); ?>&title=<?php echo urlencode(get_the_title()); ?>"></a>

    </div>

    <?php endif; ?>

    <?php if(get_option('pyre_stumbleupon') == 'On'): ?>

    <div class='stumbleupon-share share-widget'>

    <script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script>

    </div>

    <?php endif; ?>

    <?php if(get_option('pyre_reddit') == 'On'): ?>

    <div class='reddit-share share-widget'>

    <script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>

    </div>

    <?php endif; ?>

    <?php if(get_option('pyre_tumblr') == 'On'): ?>

    <div class='tumblr-share share-widget'>

    <a href="http://www.tumblr.com/share" title="Share on Tumblr" style="display:inline-block; text-indent:-9999px; overflow:hidden; width:62px; height:20px; background:url('http://platform.tumblr.com/v1/share_2.png') top left no-repeat transparent;">Share on Tumblr</a>

    </div>

    <?php endif; ?>

    <?php if(get_option('pyre_email') == 'On'): ?>

    <div class='email-share share-widget'>

    <a href="mailto:?subject=<?php the_title(); ?>&body=<?php the_permalink(); ?>"><img src='<?php bloginfo('template_url'); ?>/images/email-share.png' alt='Email Share' /></a>

    </div>

    <?php endif; ?>

    <?php if(get_option('pyre_google') == 'On'): ?>

    <div class='google-share share-widget'>

    <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>

    <g:plusone size="tall"></g:plusone>

    </div>

    <?php endif; ?>

    </div>

    <?php endif; ?>

    <div id="comments" class="post-box-wrapper">

    <div class="post-box">

    <?php comments_template(); ?>

    </div>

    </div>

    </div>

    <?php endwhile; ?>

    </div>

    <?php get_sidebar('post'); ?>

    <?php get_footer(); ?>

    کدهای index:

    <?php get_header(); ?>

    <div id="main">

    <?php if(get_option('pyre_featured_slider') == 'On' && get_option('pyre_featured_tag')): ?>

    <?php

    $featured_posts = new WP_Query(array(

    'showposts' => get_option('pyre_featured_posts'),

    'tag' => get_option('pyre_featured_tag')

    ));

    ?>

    <div id="featured-wrapper">

    <div class="slider-item">

    <?php while($featured_posts->have_posts()): $featured_posts->the_post(); ?>

    <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'slider-image'); ?>

    <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>" title="#htmlcaption_<?php echo $post->ID; ?>" /></a>

    <?php endwhile; ?>

    </div>

    <?php while($featured_posts->have_posts()): $featured_posts->the_post(); ?>

    <div id="htmlcaption_<?php echo $post->ID; ?>" class="slider-text nivo-html-caption">

    <span class="category"><?php the_category(', '); ?></span>

    <span class="date"><?php the_time('d F، Y'); ?></span>

    <div class="slider-heading">

    <h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>

    <p><?php echo string_limit_words(get_the_excerpt(), 40); ?></p>

    </div>

    </div>

    <?php endwhile; ?>

    </div>

    <?php endif; ?>

    <div id="items-wrapper">

    <?php $count = 1; ?>

    <?php while(have_posts()): the_post(); ?>

    <?php if($count == 3): $count = 1; endif; if($count == 2): $class = 'last'; else: $class = ''; endif; ?>

    <div class="item <?php echo $class; ?>">

    <?php if(has_post_thumbnail()): ?>

    <div class="item-thumb">

    <?php

    if(has_post_format('video') || has_post_format('audio') || has_post_format('gallery')) {

    $icon = '<span class="thumb-icon ' . get_post_format($post->ID) . '"></span>';

    } else {

    $icon = '';

    }

    echo $icon;

    ?>

    <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail('archive-image'); ?></a>

    <span class="comments"><?php comments_popup_link('0', '1', '%'); ?></span>

    <?php if(get_post_meta($post->ID, 'pyre_overall_score', true)): ?>

    <span class="item-review"><img src="<?php echo get_template_directory_uri(); ?>/images/stars/<?php echo get_post_meta($post->ID, 'pyre_overall_score', true); ?>.png" alt="<?php the_title(); ?> Overall Score" /></span>

    <?php endif; ?>

    </div>

    <?php endif; ?>

    <h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>

    <p><?php echo string_limit_words(get_the_excerpt(), 25); ?></p>

    <div class="item-meta">

    <span class="date"><?php the_time('d F، Y'); ?></span>

    <span class="category"><?php the_category(', '); ?></span>

    </div>

    </div>

    <?php $count++; endwhile; ?>

    </div>

    <?php skyali_pagination(); ?>

    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    اگه لطف کنید ممنون میشم.

  6. نمیدونم باید چیکار کنم؟

    این کدهای functions.php قالب سایتم هست:

    <?php
    // Adds RSS feeds link
    if(!get_option('pyre_feedburner')) {
    add_theme_support('automatic-feed-links');
    }[/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif]// Register Navigations
    register_nav_menu('top_navigation', 'Top Navigation');
    register_nav_menu('main_navigation', 'Main Navigation');[/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif]// Add post thumbnail functionality
    add_theme_support('post-thumbnails', array('post'));
    add_image_size('archive-image', 293, 150, true);
    add_image_size('recent-posts-image', 50, 50, true);
    add_image_size('featured-image', 600, 0, true);
    add_image_size('related-posts-image', 180, 110, true);
    add_image_size('slider-image', 650, 400, true);[/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif]// Register Widgetized Areas
    if(function_exists('register_sidebar')) {
    register_sidebar(array(
    'name' => 'Sidebar',
    'before_widget' => '<div class="widget">',
    'after_widget' => '</div>',
    'before_title' => '<h4>',
    'after_title' => '</h4>',
    ));

    register_sidebar(array(
    'name' => 'Footer Widget 1',
    'before_widget' => '<div class="widget">',
    'after_widget' => '</div>',
    'before_title' => '<h4>',
    'after_title' => '</h4>',
    ));

    register_sidebar(array(
    'name' => 'Footer Widget 2',
    'before_widget' => '<div class="widget">',
    'after_widget' => '</div>',
    'before_title' => '<h4>',
    'after_title' => '</h4>',
    ));

    register_sidebar(array(
    'name' => 'Footer Widget 3',
    'before_widget' => '<div class="widget">',
    'after_widget' => '</div>',
    'before_title' => '<h4>',
    'after_title' => '</h4>',
    ));

    register_sidebar(array(
    'name' => 'Footer Widget 4',
    'before_widget' => '<div class="widget last">',
    'after_widget' => '</div>',
    'before_title' => '<h4>',
    'after_title' => '</h4>',
    ));
    }[/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif]// Include boostrap file for the pyre theme framework
    include_once('framework/bootstrap.php');[/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif]// Shortcodes
    include_once('shortcodes.php');[/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif]// Custom Functions
    include_once('framework/functions.php');[/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif]// Profile Metaboxes
    include_once('framework/profile.php');[/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif]// Translation
    load_theme_textdomain('pyre', get_template_directory() . '/languages');
    $locale = get_locale();
    $locale_file = TEMPLATEPATH . '/languages/' . $locale . '.php';
    if(is_readable($locale_file)) {
    require_once($locale_file);
    }

    // How comments are displayed
    function boulevard_comment($comment, $args, $depth) {
    $GLOBALS['comment'] = $comment; ?>
    <li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>">

    <div class="the-comment">

    <?php echo get_avatar($comment,$size='60'); ?>

    <div class="comment-arrow"></div>

    <div class="comment-box">

    <div class="comment-author">
    <strong><?php echo get_comment_author_link() ?></strong>
    <small><?php printf(__('%1$s در %2$s', 'pyre'), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link(__('ویرایش', 'pyre'),' ','') ?> - <?php comment_reply_link(array_merge( $args, array('reply_text' => __('پاسخ', 'pyre'), 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?></small>
    </div>

    <div class="comment-text">
    <?php if ($comment->comment_approved == '0') : ?>
    <em><?php _e('دیدگاه شما در دست بررسی است.', 'pyre') ?></em>
    <br />
    <?php endif; ?>
    <?php comment_text() ?>
    </div>

    </div>

    </div>[/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif]<?php }[/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif]function skyali_pagination($pages = '', $range = 2)
    {
    $showitems = ($range * 2)+1; [/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif] global $paged;
    if(empty($paged)) $paged = 1;[/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif] if($pages == '')
    {
    global $wp_query;
    $pages = $wp_query->max_num_pages;
    if(!$pages)
    {
    $pages = 1;
    }
    } [/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif] if(1 != $pages)

    //<div class="pagination"><a href="#" class="active">1</a><a href="#" class="link imgf">2</a><a href="#" class="link imgf">3</a></div><!-- #pagination -->
    {
    echo "<div class=\"pagging\">";
    echo "<div class=\"pagging_inside\">";
    //if($paged > 2 && $paged > $range+1 && $showitems < $pages)echo "<a href='".get_pagenum_link(1)."'>&laquo;</a>";
    //if($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>&lsaquo;</a>";[/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif] for ($i=1; $i <= $pages; $i++)
    {
    if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
    {
    echo ($paged == $i)? "<a href=\"#\" class=\"active imgf\">".$i."</a>":"<a href='".get_pagenum_link($i)."' class=\"imgf\" >".$i."</a>";
    }
    }[/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif] // if ($paged < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($paged + 1)."'>&rsaquo;</a>";
    // if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>&raquo;</a>";
    echo "</div><!-- pagging_inside -->";
    echo "</div><!-- #pagging -->\n";
    }
    }[/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif]// Trim end of excerpt
    function pyre_trim_excerpt($text) {
    return rtrim($text, '[...]');
    }
    add_filter('get_the_excerpt', 'pyre_trim_excerpt');[/font][/color]
    [color=#333333][font=Tahoma, Arial, sans-serif]function insert_image_src_rel_in_head() {
    global $post;
    if ( !is_singular()) //if it is not a post or a page
    return;
    if(has_post_thumbnail( $post->ID )) { //the post does not have featured image, use a default image
    $thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'medium' );
    echo '<meta property="og:image" content="' . esc_attr( $thumbnail_src[0] ) . '"/>';
    }
    echo "\n";
    }
    add_action( 'wp_head', 'insert_image_src_rel_in_head', 5 );[/font][/color]


    [color=#333333][font=Tahoma, Arial, sans-serif]

    زحمتشو بکشید ممنون میشم

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