رفتن به مطلب

justeducation

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

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

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

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

  1. با سلام؛

    در مورد لیست Exception موجود در افزونه WP-Parsidate؛ دقیقا چه نوع مواردی رو میشه به این لیست اضافه نمود؟

    برای مثال تابع get_the_modified_time رو که یک تابع وردپرسی هست به لیست اضافه کردم ولی بازم تغییرات بر روی این تابع اعمال میشود.

    اگر مقدور هست توضیحی بفرمایید.

    ضمن تشکر

  2. درود

    مشکلي در ارتباط با افزونه يوزر پرو به هنگام ثبت نام در سايت دارم. وقتي تمامي فيلدها رو کامل ميکنم و دکمه ثبت رو ميزنم بعد از چند ثانيه خطاي زير رو نمايش ميده:

    Error in jQuery.ajax while submitting a form: Internal Server Error

    ورژن افزونه 4.9.26 و نسخه اصلي هست.

    تمامي افزونه ها رو غيرفعال کردم و با پوسته twentyseventeen وردپرس بررسي کردم اما بازم تفاوتي نداره.

    ممنونم

  3. با سلام؛

    وقتی به صفحه آمار کلی وردپرس می روم، همانطور که می دانید تعدادی باکس موجود است که ابتدا در حالت لود شدن می باشد و سپس آمار مربوط به هر قسمت نمایش داده می شود. اما از چند روز پیش، هر بار به این صفحه می روم، بار سایت به شدت بالا می رود، به طوری که سرور از دسترس خارج می شود و در صفحات سایت، پیام Error establishing a database connection نمایان می شود. قسمت های مربوطه نیز در حالت لود می مانند و در آخر در هر باکس عدد صفر نمایش داده می شود. می خواستم ببینم این مشکل از چه چیزی است. ممنون می شوم آن را مطرح فرمایید.

    با تشکر فراوان

  4. با سلام و عرض تسلیت به مناسبت ایام سوگواری

    ببخشید مزاحم میشم.

    از پوسته Goodnews استفاده میکنم و میخواهم فونت پیش فرض آن را به فونت فارسی دلخواه تغییر بدم. از آموزش هایی که در سایتهای مختلف قرار داده شده کمک گرفتم ولی فونت تغییر نمیکند.

    فایل rtl.css قالب را ویرایش کردم و طبق آموزش ها عمل کردم. فونت ها نیز در پوشه قالب قرار دادم ولی فونت عوض نمیشه.

    (لازم به ذکر است اسم فونت پیش فرض را تغییر نداده ام و تنها لینک فونت رو به فونت دلخواه تغییر داده ام.)

    برای مثال:

    @font-face {
      font-family: 'Droid Arabic Kufi';
      font-style: normal;
      font-weight: 400;
      src: url('/fonts/Sahel/Sahel-Bold.eot');
      src: url('/fonts/Sahel/Sahel-Bold.eot?#iefix') format('embedded-opentype'),
           url('/fonts/Sahel/Sahel-Bold.woff2') format('woff2'),
           url('/fonts/Sahel/Sahel-Bold.woff') format('woff'),
           url('/fonts/Sahel/Sahel-Bold.ttf') format('truetype');

    فایل های style.css و rtl.css اصلی قالب رو پیوست میکنم. اگر امکانش هست نگاهی بیاندازید.

    اسم فونت نیز Sahel-Bold هست که در پوشه 'fonts/Sahel/' قرار داده شده.

     

    با تشکر فراوان

    rtl.css

    style.css

  5. داخل روت:

    /framework/functions/momizat_functions.php

    کد:

    // mom_post_meta
    function mom_posts_meta ($class = '', $display = null) {
    	$num_comments = get_comments_number(); // get_comments_number returns only a numeric value
    
    if ( comments_open() ) {
    	if ( $num_comments == 0 ) {
    		$comments = __('No Comments', 'theme');
    	} elseif ( $num_comments > 1 ) {
    		$comments = $num_comments .' '. __(' Comments', 'theme');
    	} else {
    		$comments = __('1 Comment', 'theme');
    	}
    	$write_comments = '<a href="' . get_comments_link() .'">'. $comments.'</a>';
    } else {
    	//$write_comments =  __('Comments off', 'theme');
    	$write_comments = '';
    }
    $author_link = esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) );
    if (class_exists('userpro_api')) {
    	global $userpro;
    $author_link = $userpro->permalink(get_the_author_meta( 'ID' ));
    }
    
    $categories = get_the_category();
    $separator = ', ';
    $cats = '';
    if($categories){
    	foreach($categories as $category) {
    		$cats.= '<a href="'.get_category_link( $category->term_id ).'" title="' . esc_attr( sprintf( __( "View all posts in %s", 'theme' ), $category->name ) ) . '">'.$category->cat_name.'</a>'.$separator;
    	}
    }
    	$output = '<div class="mom-post-meta '.$class.'">';
    	$author = mom_option('post_meta-author') == 1 ? '<span class="author vcard">'.__('Posted By:', 'theme').' <span class="fn"><a href="'.$author_link.'">'.get_the_author().'</a></span></span>': '';
    	$date = mom_option('post_meta-date') == 1 ? '<span>'.__('on:', 'theme').' <time datetime="'.get_the_time('c').'" itemprop="datePublished" class="updated">'.get_mom_date_format().'</time></span>': '';
    	//$date = mom_option('post_meta-date') == 1 ? '<span>'.__('The last Update:', 'theme').' <time datetime="'.get_the_time('c').'" itemprop="datePublished" class="updated">'. get_post_modified_time(mom_option('date_format')).'</time></span>': '';
    	$cat = mom_option('post_meta-cat') == 1 ? '<span>'.__('In', 'theme').': '.trim($cats, $separator).'</span>': '';
    	$comments = mom_option('post_meta-comments') == 1 ? '<span>'.$write_comments.'</span>': '';
    	if ($display == 'date_comments') {
    		$output .= $date.$comments;
    	} else {
    		$output .= $author.$date.$cat.$comments;
    	}
    	if(function_exists('the_views')) {
    		$output .= '<span>'.__('Views:', 'theme').' '.the_views(false).'</span>';
    	}
    	$output .= get_mom_show_review_score();
    	if (is_single()) {
    		if (mom_option('post_meta-tools') == true) {
    		$output .= '<div class="post-tools">';
    		$output .= '<a href="javascript:window.print()" rel="nofollow" class="print"><i class="fa-icon-print"> </i>'.__('Print').'</a>';
    		$output .= '<a href="mailto:?subject='.get_the_title().'&body='.get_the_title().' '.get_permalink().'" rel="nofollow" class="email"><i class="fa-icon-envelope"> </i>'.__('Email', 'theme').'</a>';
    		$output .= '</div>';
    		}
    	}
    
    	$output .= '</div>';
    	echo $output;
    }

    با تشکر

    momizat_functions.php

  6. چنین تابعی درون فایل functions وجود ندارد.

    ولی در یک فایل دیگه که در روت /framework/functions/goodnews.php بود، این تابع وجود داشت:

    function mom_single_post_content () {
        while ( have_posts() ) : the_post(); 
           $item_type = 'itemscope itemtype="http://schema.org/Article';
        ?>
    <div <?php post_class('base-box blog-post p-single bp-horizontal-share'); echo $item_type; ?>">
    <?php
        //post settings
            $DPS = get_post_meta(get_the_ID(), 'mom_blog_ps', true);
            if (mom_option('post_share') != 1) {
                    $DPS = 1;
            }
            $DPN = get_post_meta(get_the_ID(), 'mom_blog_np', true);
            if (mom_option('post_np') != 1) {
                    $DPN = 1;
            }
            $DAB = get_post_meta(get_the_ID(), 'mom_blog_ab', true);
            if (mom_option('post_ab') != 1) {
                    $DAB = 1;
            }
            $DRP = get_post_meta(get_the_ID(), 'mom_blog_rp', true);
            if (mom_option('post_rp') != 1) {
                    $DRP = 1;
            }
            $DPC = get_post_meta(get_the_ID(), 'mom_blog_pc', true);
            if (mom_option('post_dc') == 1) {
                    $DPC = 1;
            }
    
            $format = get_post_format();
    ?>
    <?php if (mom_option('post_feature_position') == 0) mom_single_post_format($format); ?>
    <h1 class="post-tile entry-title" itemprop="name"><?php the_title(); ?></h1>
    <?php mom_posts_meta('single-post-meta'); ?>
    <?php if (mom_option('post_feature_position') == 1) mom_single_post_format($format); ?>
    <div class="entry-content">
            <?php
            $chat_top_content = '';
            $chat_bottom_content = '';
                    if ($format == 'chat') { 
                            global $posts_st;
                            $extra = get_post_meta(get_the_ID(), $posts_st->get_the_id(), TRUE);
                            $chat_top_content = isset($extra['chat_post_top_content']) ? $extra['chat_post_top_content'] : '';
                            $chat_bottom_content = isset($extra['chat_post_bottom_content']) ? $extra['chat_post_bottom_content'] : '';
                    }
            ?>
    <?php echo $chat_top_content; ?>
        <?php the_content(); ?>
    <?php echo $chat_bottom_content; ?>
          <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'theme' ), 'after' => '</div>' ) ); ?>
        <?php
          if (mom_option('post_tags') == 1) {
    	if (has_tag()) { ?>
            <div class="post-tags">
                <span class="pt-title"><?php _e('Tags:','theme'); ?> </span> <?php the_tags('', ''); ?>
            </div> <!-- post tags -->
        <?php } } ?>
        
    <?php
    if (mom_option('post_bottom_content_ad') != '') {
        echo do_shortcode('[ad id="'.mom_option('post_bottom_content_ad').'"]');
                    //echo do_shortcode('[gap height="20"]');
    
    }
    if ($DPS != 1) {mom_posts_share(get_the_ID(), get_permalink());}
    ?>
    </div> <!-- entry content -->
    </div> <!-- base box -->
                
    <?php
    if ($DPN != 1) {mom_post_nav();}
    if (mom_option('post_bottom_ad') != '') {
        echo do_shortcode('[ad id="'.mom_option('post_bottom_ad').'"]');
                    //echo do_shortcode('[gap height="20"]');
    }
    if ($DAB != 1) {mom_author_box();}
    if ($DRP != 1) {mom_related_posts();}
    if ($DPC != 1) {comments_template();}
    endwhile;
    wp_reset_query(); 
    }

    با تشکر

    goodnews.php

    functions.php

  7. بله درست میفرمایید.

    کدهارو همینجا میگذارم.

    واقعا متشکرم از اینکه وقت میگذارید.

    کد فایل single.php:

    <?php
        //Page settings
        $d_breacrumb = get_post_meta(get_the_ID(), 'mom_disbale_breadcrumb', true);
        $PS = get_post_meta(get_the_ID(), 'mom_page_share', true);
        $PC = get_post_meta(get_the_ID(), 'mom_page_comments', true);
        //Page Layout
        $custom_page = get_post_meta(get_the_ID(), 'mom_custom_page', true);
        $layout = get_post_meta(get_the_ID(), 'mom_page_layout', true);
        if ($layout == '') { $layout = mom_option('posts_layout');}
        $right_sidebar = get_post_meta(get_the_ID(), 'mom_right_sidebar', true);
        $left_sidebars = get_post_meta(get_the_ID(), 'mom_left_sidebar', true);
    ?>
    <?php get_header(); ?>
        <div class="inner">
            <?php
                if (mom_option('post_top_ad') != '') {
                    echo do_shortcode('[ad id="'.mom_option('post_top_ad').'"]');
                    echo do_shortcode('[gap height="20"]');
                }
            ?>
            <?php if ($layout == 'fullwidth') { ?>
                    <?php if ($d_breacrumb != true) { ?>
                    <div class="category-title">
                            <?php mom_breadcrumb(); ?>
                    </div>
                    <?php } ?>
                    <?php if ($custom_page) { ?>
                            <?php mom_single_post_content(); ?>
                            <?php } else { ?>
                            <?php mom_single_post_content(); ?>
                    <?php } // end cutom page  ?>
            <?php } else { //if not full width ?>
                <div class="main_container">
               <div class="main-col">
                    <?php if ($d_breacrumb != true) { ?>
                    <div class="category-title">
                            <?php mom_breadcrumb(); ?>
                    </div>
                    <?php } ?>
    <?php if ($custom_page) { 
                            mom_single_post_content(); 
    } else { ?>
                            <?php mom_single_post_content(); ?>
    <?php } ?>
                </div> <!--main column-->
                <?php get_sidebar('secondary'); ?>
                <div class="clear"></div>
    </div> <!--main container-->            
    <?php get_sidebar(); ?>
    <?php }// end full width ?>
                </div> <!--main inner-->
    <?php get_footer(); ?>

     

    کد page.php:

    <?php if (function_exists('is_bbpress') && is_bbpress()) {
            if (function_exists('is_buddypress') && is_buddypress()) {
                get_template_part( 'buddypress', 'page' );
            } else {
                get_template_part( 'bbpress', 'page' );
            }
    } elseif (function_exists('is_buddypress') && is_buddypress()) {
                get_template_part( 'buddypress', 'page' );
     } else { ?>
    <?php
        //Page settings
        $d_breacrumb = get_post_meta(get_the_ID(), 'mom_disbale_breadcrumb', true);
        $hpt = get_post_meta(get_the_ID(), 'mom_hide_pagetitle', true);
        $PS = get_post_meta(get_the_ID(), 'mom_page_share', true);
        $PC = get_post_meta(get_the_ID(), 'mom_page_comments', true);
        //Page Layout
        $custom_page = get_post_meta(get_the_ID(), 'mom_custom_page', true);
        $layout = get_post_meta(get_the_ID(), 'mom_page_layout', true);
        $right_sidebar = get_post_meta(get_the_ID(), 'mom_right_sidebar', true);
        $left_sidebars = get_post_meta(get_the_ID(), 'mom_left_sidebar', true);
    /* ==========================================================================
     *                unique posts variable 
       ========================================================================== */
    $unique_posts = '';
    $unique_posts = get_post_meta(get_queried_object_id(), 'mom_unique_posts', true);
        
    ?>
    <?php get_header(); ?>
        <div class="inner">
            <?php if ($layout == 'fullwidth') { ?>
                    <?php if ($d_breacrumb != true) { ?>
                    <div class="category-title">
                            <?php mom_breadcrumb(); ?>
                    </div>
                    <?php } ?>
                    <?php if ($custom_page) { ?>
                        <?php while ( have_posts() ) : the_post(); ?>
                            <?php the_content(); ?>
                            <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'theme' ), 'after' => '</div>' ) ); ?>
                        <?php endwhile; // end of the loop. ?>
                        <?php wp_reset_query(); ?>
                    <?php } else { ?>
                            <div class="base-box page-wrap">
                            <?php if ($hpt != true) { ?><h1 class="page-title"><?php the_title(); ?></h1><?php } ?>
                            <div class="entry-content">
                        <?php while ( have_posts() ) : the_post(); ?>
                            <?php the_content(); ?>
                            <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'theme' ), 'after' => '</div>' ) ); ?>
                        <?php endwhile; // end of the loop. ?>
                        <?php wp_reset_query(); ?>
                            <?php if ($PS == true) mom_posts_share(get_the_ID(), get_permalink()); ?>
                            </div> <!-- entry content -->
                            </div> <!-- base box -->
                            <?php if ($PC == true) comments_template(); ?>        
                    <?php } // end cutom page  ?>
            <?php } else { //if not full width ?>
                <div class="main_container">
               <div class="main-col">
                    <?php if ($d_breacrumb != true) { ?>
                    <div class="category-title">
                            <?php mom_breadcrumb(); ?>
                    </div>
                    <?php } ?>
    <?php if ($custom_page) { ?>
                        <?php while ( have_posts() ) : the_post(); ?>
                            <?php the_content(); ?>
                            <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'theme' ), 'after' => '</div>' ) ); ?>
                        <?php endwhile; // end of the loop. ?>
                        <?php wp_reset_query(); ?>
    <?php } else { ?>
            <div class="base-box page-wrap">
               <?php if ($hpt != true) { ?><h1 class="page-title"><?php the_title(); ?></h1><?php } ?>
            <div class="entry-content">
                        <?php while ( have_posts() ) : the_post(); ?>
                            <?php the_content(); ?>
                            <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'theme' ), 'after' => '</div>' ) ); ?>
                        <?php endwhile; // end of the loop. ?>
                        <?php wp_reset_query(); ?>
            <?php if ($PS == true) mom_posts_share(get_the_ID(), get_permalink()); ?>
            </div> <!-- entry content -->
            </div> <!-- base box -->
            <?php if ($PC == true) comments_template(); ?>        
    <?php } ?>
                </div> <!--main column-->
                <?php get_sidebar('secondary'); ?>
                <div class="clear"></div>
    </div> <!--main container-->            
    <?php get_sidebar(); ?>
    <?php }// end full width ?>             
    </div> <!--main inner-->
                
    <?php get_footer(); ?>
    <?php } ?>

     

    page.php

    single.php

  8. فکر کنم منظورتون page.php هست. چون این کد رو داخل single.php پیدا نکردم.

    ببخشید مثل اینکه بنده واضح سوالمو مطرح نکردم. میخواهم در قسمتی که مشخصه های پست یا Meta قرار داده شده (همانطور که در تصویر زیر نشون دادم) نمایان بشه. نه داخل پست.

    59b90a7e95d3a_2017-09-1315_05_56.thumb.png.2acb1baeb5d7700d147bf7caf4c506cd.png

    ظاهرا این کدی رو که فرمودید فرق میکنه.

    ضمنا کد رو داخل page.php قرار دادم ولی چیزی نشون داده نشد.

    با تشکر فراوان

  9. با سلام

     

    میخواستم ببینم چطور میشود تعداد بازدیدهای هر پست که توسط افزونه WP-Statistics شمارش شده است رو به محتوای بالای پست ها اضافه کنم.

    به بعضی از سایت ها که مراجعه کردم، چنین کدی رو بدست آوردم:

    wp_statistics_pages('total', "", $post_id)

    ولی وقتی کد بالارو با استفاده از echo به فایل Single.php قالب اضافه میکنم، در بالای صفحه (نه پست) یک عدد ثابت نمایش داده میشه و روی هر پست همین مقدار هست و تغییری نمیکنه.

    ممنون میشم جواب بنده رو بدید.

     

    با تشکر

  10. سلام

    بنده چند روز هست که در سایتم پستهایی حاوی متن انگلیسی ارسال میشه و همه در زمانی خاص ایجاد میشه. با نام کاربری خودم این کار انجام میشه ولی بنده هیچ نقشی در ارسال آن ندارم. اسکرین شات هم به پیوست است. اگر بگید چجوری میتونم مانع این کار شوم، ممنون میشم.

    Screenshot (98).png

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