رفتن به مطلب

sir1

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

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

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

  • روز های برد

    20

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

  1. در 7 ساعت قبل، ilya20 گفته است :

    سلام و درود 

    دوستان عزیز برای بازکردن یک سایتی دیگر در یک صفحه ما از iframe استفاده میکنیم اما این از ترافیک یوزر استفاده میکنه 

    به کدهایی نیاز داریم که بتونه از ترافیک خود سرور استفاده کنه ، کاربر با ترافیک سرور ما صفحات رو باز کنه ، مثلا ممکنه سرور ما به صفحاتی دسترسی داشته باشه که اینترنت کاربر نداره بنابر این میخوایم یوزر توسط صفحه ما به سرور مبدا دسترسی داشته باشه

     

    راهنمایی لطفا

    سلام

    این مورد فکر کنم امکان پذیر نیست چون وظفیه کد ایفرم نشان دادن بخشی از سایت دیکر در سایت ما است و اگر سرور اون سایت از کار بیافته طبیعا اون صفحه ای که در سایت شما هم از طریق ایفرم نشان میده از کار میافته.

  2. سلام

    یک سوال که ذهنمو مشکل کرده اینه که سایت های ما که در المان پشتیبانی میشه و در ایران الان بهش دسترسی نداریم باید چیکار کنیم؟ گوگل چه رفتاری با این سایت ها داره.

    به نظرم فقط ما این مشکل را داریم و گوگل و سایر کاربران خارج از ایران سایت ها را بدون مشکل میبینند و مشکلی پیش نمیاد.

  3. سلام

    این خط کد زیر در سایت برای تصاویر شاخص مطالب تعریف شده است و در حالت مبایل هم همین عکس بارگزاری میشه و باعث کاهش سرعت سایت شده است. از برنامه نویس های عزیز کسی میتونه که این کد را طوری تغییر دهد که در حالت مبایل تصویری در اندازه 256x103 بارگزاری کنه؟

    $avia_config['imgSize']['entry_with_sidebar'] 	= array('width'=>845, 'height'=>321);		            	// big images for blog and page entries

     

  4. در 9 ساعت قبل، meysam.trick گفته است :

    سلام خدمت شما عزیزان من امروز در سرچ کنسول ارور عجیبی دادم که تا حالا ندیده بودم اگه کسی سر درمیاره راهنمایی کنه و بگه چجوری رفعش کنم :huh:

     

    8653.JPG

    سلام مشکلی وجود نداره

    هر صفحه ای که سرعت بارگزاریش از 3 ثانیه بیشتر باشه در بخش speed (experimental لیست میشه.

    اگر سرعت بارگزاری مطالب را طوری بهینه کنی که در حالت مبایل و دسکتاپ کمتر از 3 ثانیه لود بشه این ارورها رفع میشه.

    • امتیاز 3
  5. Plugin-VIP.jpg.0f61311f166c9d327faf285215446355.jpg

    در این بخش می خواهیم که یک افزونه فوق العاده را برای شما کاربران قرار دهیم که نسبت به افزونه های مشابه دارای امکانات ویژه ای است.

    با یکی از افزونه های VIP شما می توانید یک سایت حرفه ای و با کیفیت را در اختیار داشته باشید و به راحتی می توانید کاربران خود را مدیریت و کنترل کنید این افزونه VIP & File Download می باشد. این افزونه در زمینه ی فروش محتوا و دانلود به ازای اشتراک های زماندار و همچنین فورش محصولات دیجیتال به صورت کاملا مجزا فعالیت می کند. این افزونه جذاب با انواع قالب وردپرس سازگاری داشته و بدون کند کردن لود صفحات و سنگین کردن دیتابیس و … قادر است تخصصی ترین و قابل سفارشی سازی ترین پلن ها و طرح های ایجاد سطح دسترسی ها و عضویت های مختلف را ایجاد کرده است .

    نحوه ی کار کرد این افزونه به این صورت است که شما از تنظیمات افزونه یک سری سطوح با بازه های زمانی با هزینه و تاریخ استفاده معین تعریف می کنید و سپس محتوایی را برای آن قرار داده که تنها کاربران با عضویت ویژه می توانند آن را مشاهده فرمایند و آنها هستند که قادر به استفاده از این محتوا هستند. شما در این افزونه می توانید بسته های ویژه کاربری (اشتراک یک ماهه ، دو ماهه و …) ایجاد کنید و از طریق محتوا و دانلودهای خود را فقط به کاربرانی که اشتراک تهیه کرده اند نشان دهید. این افزونه از سیستم امنیت بسیار قوی برخوردار است به گونه ای که لینک مستقیم فایل را به کاربر نمی دهند و یک لینک مجازی که توسط خود افزونه ایجاد می شود برای دانلود به کاربر نشان داده می شود و در صورتی که کاربر لینک مستقیم فایل را هم داشته باشد قادر به دانلود فایل نیست و ارور 403 دریافت می کند.

    امکانات کامل افزونه

    • امکان تعریف پلن های مدت دار با تعداد دانلود مشخص (روزانه، ماهانه، سالانه و …)
    • دارای درگاه پرداخت PAY.IR
    • حذف و اضافه کردن دستی کاربران ویژه با یک کلیک
    • نمایش آخرین کاربران ویژه در هر جای سایت به صورت اسکرول (کاربرانی که با افزونه upme ثبت نام کردند)
    • ویژه کردن بخشی از متن یا لینک دانلود با قرار دادن آن در شورت کد
    • راه اندازی فروشگاه دیجیتال برای محصولاتی که می خواهید به صورت تکی بفروشید
    • سازگاری با افزونه ووکامرس
    • امکان جستجو در بین کاربران ویژه
    • پنل گزارش خرید محصولات دیجیتال
    • پشتیبانی کامل افزونه
    • این افزونه کاملا فارسی می باشد

    اطلاعات تکمیلی به همراه عکس ها از پنل مدیریت را در لینک زیر مشاهده کنید:

     

    https://zip98.ir/افزونه-اشتراک-ویژه-کاربران-vip-با-امکانا/

  6. در 15 ساعت قبل، aryatehran3 گفته است :

    سلام. 

    ببخشید من یک سایتی دارم که روی اون افزونه افزایش سرعت wp-rocket نصب شده 

    از حدود یک ماه پیش منوی سایت هر روز یکی دور با می پره و نشون داده نمی شه و حتما باید یک بار کش این افزونه رو پاک کنم تا منو دوباره ظاهر بشه. خواهشمند هستم که اگر کسی می دونه کمک کند.

    سلام

    این افزونه در اکثر سایت های وردپرسی نصب شده و استفاده میکنند و معمولا مشکلی نداره. این مشکل شما مربوط به ناسازگاری قالب سایت است که بهتره با یک برنامه نویس بدید تا اوکی کنه

  7. در 15 ساعت قبل، نگار صادقی گفته است :

    سلام وقت بخیر.

    دوستا یه سوال! وقتی که پستی رو توی تویتر به اشتراک میزاریم برخی از سایتهای خارجی هست که توییت های تویتر رو بازنشر میدن و به لینک سایت هم فالو میدن

    نمونش: https://www.twipu.com/

     

    این بک لینکهایی که اینجور سایتها میدن مخربه یا مفید؟

    سلام

    بک لینک خوبی هست چون دامین اتوریتی و پیج اتوریتی خوبی داره و اسپم اسکورش پایین است

    اگه اسپم سکورش هم بالا باشه باز برای سایت شما ضرری نداره چون لینک شما مستقیم نیست.

    • امتیاز 1
  8. در 6 ساعت قبل، sajad گفته است :

    کدی که براتون پیوست کردم از روی همین رفرنس الگو برداری شده.

    این کد رو تست کنید:

    
    add_filter( 'wpseo_breadcrumb_links', 'wpseo_breadcrumb_add_woo_shop_link' );
    function wpseo_breadcrumb_add_woo_shop_link( $links ) {
        global $post;
        if ( is_woocommerce() ) {
            $breadcrumb[] = array(
                'url' => get_permalink( woocommerce_get_page_id( 'shop' ) ),
                'text' => 'Shop',
            );
            array_splice( $links, 1, -2, $breadcrumb );
        }
        return $links;
    }

     

    این کد هم قرار دادم و بریدکرامپ در قالب نشان داده نمیشه

  9. در 4 دقیقه قبل، sajad گفته است :

    میتونید یه شرط دیگه هم اضافه کنید که اگه صفحه‌ای که داره لود میشه پست یا پیج بود تابع فالس برگردونه.

    اینطوری تغییری تو سایر بردکرامب ها انجام نمیشه.

    این کدایی که در لینک زیر داده چیه؟

    https://gist.github.com/amboutwe/ea0791e184668a5c7bd7bbe357c598e9

  10. در 5 ساعت قبل، sajad گفته است :

    سلام 

    نیازی به ساخت فایل نیست.

    اگه اشتباه نکنم این کد باید روی سایتون جواب بده. لطفا تستش کنید:

    
    add_filter( 'wpseo_breadcrumb_links', 'wpseo_breadcrumb_remove_limited' );
    
    function wpseo_breadcrumb_remove_limited( $breadcrumbs ) {
    
        if ( is_product() )
    
          return $breadcrumbs;    
    
        return false;
    	  
    }

     

    این کد رو تو فایل functions.php قرار بدید.

    با این کد برید کرامپی که برای پست های وبلاگ هم ساخته بودم حذف شد

  11. سلام

    برای افزودن برید کرامپ به محصولات فروشگاه، سایت yoast برای راهنمایی لینک زیر را قرار داده است:

    https://gist.github.com/amboutwe/ea0791e184668a5c7bd7bbe357c598e9

    ولی من فایل yoast_seo_breadcrumb_add_woo_shop.php را پیدا نمیکنم یا باید خودمون این فایل را ایجاد کنیم؟

    اگر خودمون بایستی این فایل را درست کنیم در کدوم فولدر فایل را ایجاد کنیم؟

  12. در 3 دقیقه قبل، sajad گفته است :

    سلام 

    بریدکرامب شما با یه تگ p که آیدی breadcrumbs داره تو خروجی ارسال میشه.

    شما هم میتونید به همین آیدی تو css بیاید و خصوصیتهای موردنظرتونو تخصیص بدید و هم میتونید به همین تگ p یه کلاس با اسم دلخواه اضافه کنید و بعد استایل نویسی رو براش انجام بدین.

    ممنون از راهنمایی

    میخام در همون فایل php که کد را قرار دادم استایلشم بنویسم. اگر امکان داره یک نمونه قرار دهید تا منم طبق نمونه عمل کنم

  13. سلام

    کدی که افزونه یواست میده برای نشان دادن برید کرامپ در سایت به صورت زیر است:

    <?php
    if ( function_exists('yoast_breadcrumb') ) {
      yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );
    }
    ?>

     

    برای اضافه کردن چند کد css باید به چه شکلی کد را تغییر داد؟

     

     

  14. در 1 ساعت قبل، Morteza گفته است :

    خودتون هم میدونید که توی انجمن از محصولات پرمیوم پشتیبانی نمیشه.

    تاپیک قبلی هم که بابت بریدکرامب بود من دیر متوجه شدم که مربوط به پوسته پرمیوم هست.

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

    درسته

    میرم پونیشا یکی برام کد نویسی کنه

  15. با سلام

    در گوگل استراکچر وقتی لینک پست های سایتمو بهش میدم با وجود اینکه برید کرامپ ها در سایت تعریف شده اند ولی ربات های گوگل آنها را شناسایی نمی کنند چون براساس ریچ اسنیپ rdf در قالب کد نویسی شده است.

    کد نویسی برید کرامپ ها در فایل class-breadcrumb.php است. لطفا  اگر کسی کد نویسی میدونه اون را از rdf به id+json تغییر دهید. ممنون

    <?php
    
    if(!class_exists('avia_breadcrumb'))
    {
    	class avia_breadcrumb
    	{
    		var $options;
    
    	function __construct($options = ""){
    
    		$this->options = array( 	//change this array if you want another output scheme
    		'before' => '<span class="arrow"> ',
    		'after' => ' </span>',
    		'delimiter' => '&raquo;'
    		);
    
    		if(is_array($options))
    		{
    			$this->options = array_merge($this->options, $options);
    		}
    
    
    		$markup = $this->options['before'].$this->options['delimiter'].$this->options['after'];
    
    		global $post;
    		echo '<p class="breadcrumb"><span class="breadcrumb_info">'.__('You are here:','avia_framework').'</span> <a href="'.get_bloginfo('url').'">';
    			bloginfo('name');
    			echo "</a>";
    			if(!is_front_page()){echo $markup;}
    
    			$output = $this->simple_breadcrumb_case($post);
    
    			echo "<span class='current_crumb'>";
    			if ( is_page() || is_single()) {
    			the_title();
    			}else{
    			echo $output;
    			}
    			echo " </span></p>";
    		}
    
    		function simple_breadcrumb_case($der_post)
    		{
    			global $post;
    
    			$markup = $this->options['before'].$this->options['delimiter'].$this->options['after'];
    			if (is_page()){
    				 if($der_post->post_parent) {
    					 $my_query = get_post($der_post->post_parent);
    					 $this->simple_breadcrumb_case($my_query);
    					 $link = '<a href="';
    					 $link .= get_permalink($my_query->ID);
    					 $link .= '">';
    					 $link .= ''. get_the_title($my_query->ID) . '</a>'. $markup;
    					 echo $link;
    				  }
    			return;
    			}
    
    		if(is_single())
    		{
    			$category = get_the_category();
    			if (is_attachment()){
    
    				$my_query = get_post($der_post->post_parent);
    				$category = get_the_category($my_query->ID);
    
    				if(isset($category[0]))
    				{
    					$ID = $category[0]->cat_ID;
    					$parents = get_category_parents( $ID, true, $markup, false );
    					if(!is_object($parents)) echo $parents;
    					previous_post_link("%link $markup");
    				}
    
    			}else{
    
    				$postType = get_post_type();
    
    				if($postType == 'post')
    				{
    					$ID = $category[0]->cat_ID;
    					echo get_category_parents( $ID, true, $markup, false );
    				}
    				else if($postType == 'portfolio')
    				{
    					$terms = get_the_term_list( $post->ID, 'portfolio_entries', '', '$$$', '' );
    					$terms = explode('$$$',$terms);
    					echo $terms[0].$markup;
    
    				}
    			}
    		return;
    		}
    
    		if(is_tax()){
    			  $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
    			  return $term->name;
    
    		}
    
    
    		if(is_category()){
    			$category = get_the_category();
    			$i = $category[0]->cat_ID;
    			$parent = $category[0]-> category_parent;
    
    			if($parent > 0 && $category[0]->cat_name == single_cat_title( "", false ) ){
    				echo get_category_parents( $parent, true, $markup, false );
    			}
    		return single_cat_title( '', false );
    		}
    
    
    		if(is_author()){
    			$curauth = get_userdatabylogin(get_query_var('author_name'));
    			return "Author: ".$curauth->nickname;
    		}
    		if(is_tag()){ return "Tag: " . single_tag_title( '', false ); }
    
    		if(is_404()){ return __("404 - Page not Found",'avia_framework'); }
    
    		if(is_search()){ return __("Search",'avia_framework');}
    
    		if(is_year()){ return get_the_time('Y'); }
    
    		if(is_month()){
    		$k_year = get_the_time('Y');
    		echo "<a href='".get_year_link($k_year)."'>".$k_year."</a>".$markup;
    		return get_the_time('F'); }
    
    		if(is_day() || is_time()){
    		$k_year = get_the_time('Y');
    		$k_month = get_the_time('m');
    		$k_month_display = get_the_time('F');
    		echo "<a href='".get_year_link($k_year)."'>".$k_year."</a>".$markup;
    		echo "<a href='".get_month_link($k_year, $k_month)."'>".$k_month_display."</a>".$markup;
    
    		return get_the_time('jS (l)'); }
    
    		}
    
    	}
    }
    
    
    
    
    /*-----------------------------------------------------------------------------------*/
    /* avia_breadcrumbs() - Custom breadcrumb generator function  */
    /*
    /* Params:
    /*
    /* Arguments Array:
    /*
    /* 'separator' 			- The character to display between the breadcrumbs.
    /* 'before' 			- HTML to display before the breadcrumbs.
    /* 'after' 				- HTML to display after the breadcrumbs.
    /* 'front_page' 		- Include the front page at the beginning of the breadcrumbs.
    /* 'show_home' 			- If $show_home is set and we're not on the front page of the site, link to the home page.
    /* 'echo' 				- Specify whether or not to echo the breadcrumbs. Alternative is "return".
    /* 'show_posts_page'	- If a static front page is set and there is a posts page, toggle whether or not to display that page's tree.
    /*
    /*-----------------------------------------------------------------------------------*/
    
    
    
    /**
     * The code below is an inspired/modified version by woothemes breadcrumb function which in turn is inspired by Justin Tadlock's Hybrid Core :)
     */
    
    
    function avia_breadcrumbs( $args = array() ) {
    	global $wp_query, $wp_rewrite;
    
    	/* Create an empty variable for the breadcrumb. */
    	$breadcrumb = '';
    
    	/* Create an empty array for the trail. */
    	$trail = array();
    	$path = '';
    
    	/* Set up the default arguments for the breadcrumb. */
    	$defaults = array(
    		'separator' => '&raquo;',
    		'before' => '<span class="breadcrumb-title">' . __( 'You are here:', 'avia_framework' ) . '</span>',
    		'after' => false,
    		'front_page' => true,
    		'show_home' => __( 'Home', 'avia_framework' ),
    		'echo' => false,
    		'show_categories' => true,
    		'show_posts_page' => true,
    		'truncate' => 70,
    		'richsnippet' => false
    	);
    
    
    	/* Allow singular post views to have a taxonomy's terms prefixing the trail. */
    	if ( is_singular() )
    		$defaults["singular_{$wp_query->post->post_type}_taxonomy"] = false;
    
    	/* Apply filters to the arguments. */
    	$args = apply_filters( 'avia_breadcrumbs_args', $args );
    
    	/* Parse the arguments and extract them for easy variable naming. */
    	extract( wp_parse_args( $args, $defaults ) );
    
    	/* If $show_home is set and we're not on the front page of the site, link to the home page. */
    	if ( !is_front_page() && $show_home )
    		$trail[] = '<a href="' . home_url() . '" title="' . esc_attr( get_bloginfo( 'name' ) ) . '" rel="home" class="trail-begin">' . $show_home . '</a>';
    
    	/* If viewing the front page of the site. */
    	if ( is_front_page() ) {
    		if ( !$front_page )
    			$trail = false;
    		elseif ( $show_home )
    			$trail['trail_end'] = "{$show_home}";
    	}
    
    	/* If viewing the "home"/posts page. */
    	elseif ( is_home() ) {
    		$home_page = get_post( $wp_query->get_queried_object_id() );
    		$trail = array_merge( $trail, avia_breadcrumbs_get_parents( $home_page->post_parent, '' ) );
    		$trail['trail_end'] = get_the_title( $home_page->ID );
    	}
    
    	/* If viewing a singular post (page, attachment, etc.). */
    	elseif ( is_singular() ) {
    
    		/* Get singular post variables needed. */
    		$post = $wp_query->get_queried_object();
    		$post_id = absint( $wp_query->get_queried_object_id() );
    		$post_type = $post->post_type;
    		$parent = $post->post_parent;
    
    
    		/* If a custom post type, check if there are any pages in its hierarchy based on the slug. */
    		if ( 'page' !== $post_type && 'post' !== $post_type ) {
    
    			$post_type_object = get_post_type_object( $post_type );
    
    			/* If $front has been set, add it to the $path. */
    			if ( 'post' == $post_type || 'attachment' == $post_type || ( $post_type_object->rewrite['with_front'] && $wp_rewrite->front ) )
    				$path .= trailingslashit( $wp_rewrite->front );
    
    			/* If there's a slug, add it to the $path. */
    			if ( !empty( $post_type_object->rewrite['slug'] ) )
    				$path .= $post_type_object->rewrite['slug'];
    
    			/* If there's a path, check for parents. */
    			if ( !empty( $path ) )
    				$trail = array_merge( $trail, avia_breadcrumbs_get_parents( '', $path ) );
    
    			/* If there's an archive page, add it to the trail. */
    			if ( !empty( $post_type_object->has_archive ) && function_exists( 'get_post_type_archive_link' ) )
    				$trail[] = '<a href="' . get_post_type_archive_link( $post_type ) . '" title="' . esc_attr( $post_type_object->labels->name ) . '">' . $post_type_object->labels->name . '</a>';
    		}
    
    		/* try to build a generic taxonomy trail no matter the post type and taxonomy and terms
    		$currentTax = "";
    		foreach(get_taxonomies() as $tax)
    		{
    			$terms = get_the_term_list( $post_id, $tax, '', '$$$', '' );
    			echo"<pre>";
    			print_r($tax.$terms);
    			echo"</pre>";
    		}
    		*/
    
    		/* If the post type path returns nothing and there is a parent, get its parents. */
    		if ( empty( $path ) && 0 !== $parent || 'attachment' == $post_type )
    			$trail = array_merge( $trail, avia_breadcrumbs_get_parents( $parent, '' ) );
    
    		/* Toggle the display of the posts page on single blog posts. */
    		if ( 'post' == $post_type && $show_posts_page == true && 'page' == get_option( 'show_on_front' ) ) {
    			$posts_page = get_option( 'page_for_posts' );
    			if ( $posts_page != '' && is_numeric( $posts_page ) ) {
    				$trail = array_merge( $trail, avia_breadcrumbs_get_parents( $posts_page, '' ) );
    			}
    		}
    
            if('post' == $post_type && $show_categories)
            {
                    $category = get_the_category();
    				
                    foreach($category as $cat)
                    {
                        if(!empty($cat->parent))
                        {
                            $parents = get_category_parents( $cat->cat_ID, true, '$$$', false );
                            $parents = explode("$$$", $parents);
                            foreach ($parents as $parent_item)
                            {
                                if($parent_item) $trail[] = $parent_item;
                            }
                            break;
                        }
                    }
                    
                    if(isset($category[0]) && empty($parents))
                    {
                    	$trail[] = '<a href="'.get_category_link($category[0]->term_id ).'">'.$category[0]->cat_name.'</a>';
                    }
                    
            }
    
    		if($post_type == 'portfolio')
    		{
    			$parents = get_the_term_list( $post_id, 'portfolio_entries', '', '$$$', '' );
    			$parents = explode('$$$',$parents);
    			foreach ($parents as $parent_item)
    			{
    				if($parent_item) $trail[] = $parent_item;
    			}
    		}
    
    		/* Display terms for specific post type taxonomy if requested. */
    		if ( isset( $args["singular_{$post_type}_taxonomy"] ) && $terms = get_the_term_list( $post_id, $args["singular_{$post_type}_taxonomy"], '', ', ', '' ) )
    			$trail[] = $terms;
    
    		/* End with the post title. */
    		$post_title = get_the_title( $post_id ); // Force the post_id to make sure we get the correct page title.
    		if ( !empty( $post_title ) )
    			$trail['trail_end'] = $post_title;
    
    	}
    
    	/* If we're viewing any type of archive. */
    	elseif ( is_archive() ) {
    
    		/* If viewing a taxonomy term archive. */
    		if ( is_tax() || is_category() || is_tag() ) {
    
    			/* Get some taxonomy and term variables. */
    			$term = $wp_query->get_queried_object();
    			$taxonomy = get_taxonomy( $term->taxonomy );
    
    			/* Get the path to the term archive. Use this to determine if a page is present with it. */
    			if ( is_category() )
    				$path = get_option( 'category_base' );
    			elseif ( is_tag() )
    				$path = get_option( 'tag_base' );
    			else {
    				if ( $taxonomy->rewrite['with_front'] && $wp_rewrite->front )
    					$path = trailingslashit( $wp_rewrite->front );
    				$path .= $taxonomy->rewrite['slug'];
    			}
    
    			/* Get parent pages by path if they exist. */
    			if ( $path )
    				$trail = array_merge( $trail, avia_breadcrumbs_get_parents( '', $path ) );
    
    			/* If the taxonomy is hierarchical, list its parent terms. */
    			if ( is_taxonomy_hierarchical( $term->taxonomy ) && $term->parent )
    				$trail = array_merge( $trail, avia_breadcrumbs_get_term_parents( $term->parent, $term->taxonomy ) );
    
    			/* Add the term name to the trail end. */
    			$trail['trail_end'] = $term->name;
    		}
    
    		/* If viewing a post type archive. */
    		elseif ( function_exists( 'is_post_type_archive' ) && is_post_type_archive() ) {
    
    			/* Get the post type object. */
    			$post_type_object = get_post_type_object( get_query_var( 'post_type' ) );
    
    			/* If $front has been set, add it to the $path. */
    			if ( $post_type_object->rewrite['with_front'] && $wp_rewrite->front )
    				$path .= trailingslashit( $wp_rewrite->front );
    
    			/* If there's a slug, add it to the $path. */
    			if ( !empty( $post_type_object->rewrite['archive'] ) )
    				$path .= $post_type_object->rewrite['archive'];
    
    			/* If there's a path, check for parents. */
    			if ( !empty( $path ) )
    				$trail = array_merge( $trail, avia_breadcrumbs_get_parents( '', $path ) );
    
    			/* Add the post type [plural] name to the trail end. */
    			$trail['trail_end'] = $post_type_object->labels->name;
    		}
    
    		/* If viewing an author archive. */
    		elseif ( is_author() ) {
    
    			/* If $front has been set, add it to $path. */
    			if ( !empty( $wp_rewrite->front ) )
    				$path .= trailingslashit( $wp_rewrite->front );
    
    			/* If an $author_base exists, add it to $path. */
    			if ( !empty( $wp_rewrite->author_base ) )
    				$path .= $wp_rewrite->author_base;
    
    			/* If $path exists, check for parent pages. */
    			if ( !empty( $path ) )
    				$trail = array_merge( $trail, avia_breadcrumbs_get_parents( '', $path ) );
    
    			/* Add the author's display name to the trail end. */
    			$trail['trail_end'] =  apply_filters('avf_author_name', get_the_author_meta('display_name', get_query_var('author')), get_query_var('author'));
    		}
    
    		/* If viewing a time-based archive. */
    		elseif ( is_time() ) {
    
    			if ( get_query_var( 'minute' ) && get_query_var( 'hour' ) )
    				$trail['trail_end'] = get_the_time( __( 'g:i a', 'avia_framework' ) );
    
    			elseif ( get_query_var( 'minute' ) )
    				$trail['trail_end'] = sprintf( __( 'Minute %1$s', 'avia_framework' ), get_the_time( __( 'i', 'avia_framework' ) ) );
    
    			elseif ( get_query_var( 'hour' ) )
    				$trail['trail_end'] = get_the_time( __( 'g a', 'avia_framework' ) );
    		}
    
    		/* If viewing a date-based archive. */
    		elseif ( is_date() ) {
    
    			/* If $front has been set, check for parent pages. */
    			if ( $wp_rewrite->front )
    				$trail = array_merge( $trail, avia_breadcrumbs_get_parents( '', $wp_rewrite->front ) );
    
    			if ( is_day() ) {
    				$trail[] = '<a href="' . get_year_link( get_the_time( 'Y' ) ) . '" title="' . get_the_time( esc_attr__( 'Y', 'avia_framework' ) ) . '">' . get_the_time( __( 'Y', 'avia_framework' ) ) . '</a>';
    				$trail[] = '<a href="' . get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) . '" title="' . get_the_time( esc_attr__( 'F', 'avia_framework' ) ) . '">' . get_the_time( __( 'F', 'avia_framework' ) ) . '</a>';
    				$trail['trail_end'] = get_the_time( __( 'j', 'avia_framework' ) );
    			}
    
    			elseif ( get_query_var( 'w' ) ) {
    				$trail[] = '<a href="' . get_year_link( get_the_time( 'Y' ) ) . '" title="' . get_the_time( esc_attr__( 'Y', 'avia_framework' ) ) . '">' . get_the_time( __( 'Y', 'avia_framework' ) ) . '</a>';
    				$trail['trail_end'] = sprintf( __( 'Week %1$s', 'avia_framework' ), get_the_time( esc_attr__( 'W', 'avia_framework' ) ) );
    			}
    
    			elseif ( is_month() ) {
    				$trail[] = '<a href="' . get_year_link( get_the_time( 'Y' ) ) . '" title="' . get_the_time( esc_attr__( 'Y', 'avia_framework' ) ) . '">' . get_the_time( __( 'Y', 'avia_framework' ) ) . '</a>';
    				$trail['trail_end'] = get_the_time( __( 'F', 'avia_framework' ) );
    			}
    
    			elseif ( is_year() ) {
    				$trail['trail_end'] = get_the_time( __( 'Y', 'avia_framework' ) );
    			}
    		}
    	}
    
    	/* If viewing search results. */
    	elseif ( is_search() )
    		$trail['trail_end'] = sprintf( __( 'Search results for &quot;%1$s&quot;', 'avia_framework' ), esc_attr( get_search_query() ) );
    
    	/* If viewing a 404 error page. */
    	elseif ( is_404() )
    		$trail['trail_end'] = __( '404 Not Found', 'avia_framework' );
    
    	/* Allow child themes/plugins to filter the trail array. */
    	$trail = apply_filters( 'avia_breadcrumbs_trail', $trail, $args );
    	
    	/**
    	 * Allow to filter trail to return unique links only (href and text)
    	 * 
    	 * @since 4.3.2
    	 * @param boolean
    	 * @param mixed|array $trail
    	 * @return mixed|true
    	 */
    	if( true === apply_filters( 'avf_breadcrumb_trail_unique', true, $trail ) )
    	{
    		$trail = avia_make_unique_breadcrumbs( $trail );
    	}
    
    	/* Connect the breadcrumb trail if there are items in the trail. */
    	if ( is_array( $trail ) ) {
    
    		$el_tag = "span";
    		$vocabulary = "";
    
    		//google rich snippets
    		if($richsnippet === true)
    		{
                		if(is_ssl()){
                    		$vocabulary = 'xmlns:v="https://rdf.data-vocabulary.org/#"';    
                		}
    			else{
    				$vocabulary = 'xmlns:v="http://rdf.data-vocabulary.org/#"';
    			}
    		}
    
    		/* Open the breadcrumb trail containers. */
    		$breadcrumb = '<div class="breadcrumb breadcrumbs avia-breadcrumbs"><div class="breadcrumb-trail" '.$vocabulary.'>';
    
    		/* If $before was set, wrap it in a container. */
    		if ( !empty( $before ) )
    			$breadcrumb .= '<'.$el_tag.' class="trail-before">' . $before . '</'.$el_tag.'> ';
    
    		/* Wrap the $trail['trail_end'] value in a container. */
    		if ( !empty( $trail['trail_end'] ) )
    		{
    			if(!is_search())
    			{
    				$trail['trail_end'] =  avia_backend_truncate($trail['trail_end'], $truncate, " ", $pad="...", false, '<strong><em><span>', true);
    			}
    			$trail['trail_end'] = '<'.$el_tag.' class="trail-end">' . $trail['trail_end'] . '</'.$el_tag.'>';
    		}
    
    		if($richsnippet === true)
    		{
    			foreach($trail as $key => &$link)
    			{
    				if("trail_end" === $key) continue;
    
    				$link = preg_replace('!rel=".+?"|rel=\'.+?\'|!',"", $link);
    				$link = str_replace('<a ', '<a rel="v:url" property="v:title" ', $link);
    				//$link = '<span typeof="v:Breadcrumb">'.$link.'</span>'; //removed due to data testing error
    				$link = '<span>'.$link.'</span>';
    			}
    		}
    
    
    		/* Format the separator. */
    		if ( !empty( $separator ) )
    			$separator = '<span class="sep">' . $separator . '</span>';
    
    		/* Join the individual trail items into a single string. */
    		$breadcrumb .= join( " {$separator} ", $trail );
    
    		/* If $after was set, wrap it in a container. */
    		if ( !empty( $after ) )
    			$breadcrumb .= ' <span class="trail-after">' . $after . '</span>';
    
    		/* Close the breadcrumb trail containers. */
    		$breadcrumb .= '</div></div>';
    	}
    
    	/* Allow developers to filter the breadcrumb trail HTML. */
    	$breadcrumb = apply_filters( 'avia_breadcrumbs', $breadcrumb );
    
    	/* Output the breadcrumb. */
    	if ( $echo )
    		echo $breadcrumb;
    	else
    		return $breadcrumb;
    
    } // End avia_breadcrumbs()
    
    /*-----------------------------------------------------------------------------------*/
    /* avia_breadcrumbs_get_parents() - Retrieve the parents of the current page/post */
    /*-----------------------------------------------------------------------------------*/
    /**
     * Gets parent pages of any post type or taxonomy by the ID or Path.  The goal of this function is to create
     * a clear path back to home given what would normally be a "ghost" directory.  If any page matches the given
     * path, it'll be added.  But, it's also just a way to check for a hierarchy with hierarchical post types.
     *
     * @since 3.7.0
     * @param int $post_id ID of the post whose parents we want.
     * @param string $path Path of a potential parent page.
     * @return array $trail Array of parent page links.
     */
    function avia_breadcrumbs_get_parents( $post_id = '', $path = '' ) {
    
    	/* Set up an empty trail array. */
    	$trail = array();
    
    	/* If neither a post ID nor path set, return an empty array. */
    	if ( empty( $post_id ) && empty( $path ) )
    		return $trail;
    
    	/* If the post ID is empty, use the path to get the ID. */
    	if ( empty( $post_id ) ) {
    
    		/* Get parent post by the path. */
    		$parent_page = get_page_by_path( $path );
    
    		/* ********************************************************************
    		Modification: The above line won't get the parent page if
    		the post type slug or parent page path is not the full path as required
    		by get_page_by_path. By using get_page_with_title, the full parent
    		trail can be obtained. This may still be buggy for page names that use
    		characters or long concatenated names.
    		Author: Byron Rode
    		Date: 06 June 2011
    		******************************************************************* */
    
    		if( empty( $parent_page ) )
    		        // search on page name (single word)
    			$parent_page = get_page_by_title ( $path );
    
    		if( empty( $parent_page ) )
    			// search on page title (multiple words)
    			$parent_page = get_page_by_title ( str_replace( array('-', '_'), ' ', $path ) );
    
    		/* End Modification */
    
    		/* If a parent post is found, set the $post_id variable to it. */
    		if ( !empty( $parent_page ) )
    			$post_id = $parent_page->ID;
    	}
    
    	/* If a post ID and path is set, search for a post by the given path. */
    	if ( $post_id == 0 && !empty( $path ) ) {
    
    		/* Separate post names into separate paths by '/'. */
    		$path = trim( $path, '/' );
    		preg_match_all( "/\/.*?\z/", $path, $matches );
    
    		/* If matches are found for the path. */
    		if ( isset( $matches ) ) {
    
    			/* Reverse the array of matches to search for posts in the proper order. */
    			$matches = array_reverse( $matches );
    
    			/* Loop through each of the path matches. */
    			foreach ( $matches as $match ) {
    
    				/* If a match is found. */
    				if ( isset( $match[0] ) ) {
    
    					/* Get the parent post by the given path. */
    					$path = str_replace( $match[0], '', $path );
    					$parent_page = get_page_by_path( trim( $path, '/' ) );
    
    					/* If a parent post is found, set the $post_id and break out of the loop. */
    					if ( !empty( $parent_page ) && $parent_page->ID > 0 ) {
    						$post_id = $parent_page->ID;
    						break;
    					}
    				}
    			}
    		}
    	}
    
    	$parents = array();
    	
    	/* While there's a post ID, add the post link to the $parents array. */
    	while ( $post_id ) {
    
    		/* Get the post by ID. */
    		$page = get_post( $post_id );
    		
    		/**
    		 * Allow to translate breadcrumb trail - fixes a problem with parent page for portfolio
    		 * https://kriesi.at/support/topic/parent-page-link-works-correct-but-translation-doesnt/
    		 * 
    		 * @used_by				config-wpml\config.php						10
    		 * @since 4.5.1
    		 * @param int $post_id
    		 * @return int
    		 */
    		$translated_id = apply_filters( 'avf_breadcrumbs_get_parents', $post_id );
    
    		/* Add the formatted post link to the array of parents. */
    		$parents[]  = '<a href="' . get_permalink( $translated_id ) . '" title="' . esc_attr( get_the_title( $translated_id ) ) . '">' . get_the_title( $translated_id ) . '</a>';
    
    		/* Set the parent post's parent to the post ID. */
    		if(is_object($page))
    		{
    			$post_id = $page->post_parent;
    		}
    		else
    		{
    			$post_id = "";
    		}
    	}
    
    	/* If we have parent posts, reverse the array to put them in the proper order for the trail. */
    	if ( ! empty( $parents ) )
    	{
    		$trail = array_reverse( $parents );
    	}
    
    	/* Return the trail of parent posts. */
    	return $trail;
    
    } // End avia_breadcrumbs_get_parents()
    
    /*-----------------------------------------------------------------------------------*/
    /* avia_breadcrumbs_get_term_parents() - Retrieve the parents of the current term */
    /*-----------------------------------------------------------------------------------*/
    /**
     * Searches for term parents of hierarchical taxonomies.  This function is similar to the WordPress
     * function get_category_parents() but handles any type of taxonomy.
     *
     * @since 3.7.0
     * @param int $parent_id The ID of the first parent.
     * @param object|string $taxonomy The taxonomy of the term whose parents we want.
     * @return array $trail Array of links to parent terms.
     */
    function avia_breadcrumbs_get_term_parents( $parent_id = '', $taxonomy = '' ) {
    
    	/* Set up some default arrays. */
    	$trail = array();
    	$parents = array();
    
    	/* If no term parent ID or taxonomy is given, return an empty array. */
    	if ( empty( $parent_id ) || empty( $taxonomy ) )
    		return $trail;
    
    	/* While there is a parent ID, add the parent term link to the $parents array. */
    	while ( $parent_id ) {
    
    		/* Get the parent term. */
    		$parent = get_term( $parent_id, $taxonomy );
    
    		/* Add the formatted term link to the array of parent terms. */
    		$parents[] = '<a href="' . get_term_link( $parent, $taxonomy ) . '" title="' . esc_attr( $parent->name ) . '">' . $parent->name . '</a>';
    
    		/* Set the parent term's parent as the parent ID. */
    		$parent_id = $parent->parent;
    	}
    
    	/* If we have parent terms, reverse the array to put them in the proper order for the trail. */
    	if ( !empty( $parents ) )
    		$trail = array_reverse( $parents );
    
    	/* Return the trail of parent terms. */
    	return $trail;
    
    } // End avia_breadcrumbs_get_term_parents()
    
    
    /**
     * Filters the trail and removes the first entries that have the same href's and link text
     * Trail must be an array
     * 
     * @since 4.3.2
     * @param mixed|array $trail
     * @return mixed|array
     */
    function avia_make_unique_breadcrumbs( $trail )
    {
    	if( ! is_array( $trail ) || empty( $trail ) )
    	{
    		return $trail;
    	}
    	
    	$splitted = array();
    	
    	foreach( $trail as $key => $link ) 
    	{
    		$url = array();
    		$text = array();
    		preg_match( '/href=["\']?([^"\'>]+)["\']?/', $link, $url );
    		preg_match( '/<\s*a[^>]*>([^<]*)<\s*\/\s*a\s*>/', $link, $text );
    		
    		$splitted[] = array( 
    						'url'	=> isset( $url[1] ) ? $url[1] : '',
    						'text'	=> isset( $text[1] ) ? $text[1] : $link
    				);
    	}
    	
    	$last_index = count( $trail );
    	foreach( $splitted as $key => $current ) 
    	{
    		for( $i = $key + 1; $i < $last_index; $i++ )
    		{
    			$check = $splitted[ $i ];
    			
    			//	entry without url we do not remove - normally the last entry
    			if( empty( $check['url'] ) )
    			{
    				continue;
    			}
    			
    			if( ( strcasecmp( $current['url'], $check['url'] ) == 0 ) && ( strcasecmp( $current['text'], $check['text'] ) == 0 ) )
    			{
    				$splitted[ $key ]['delete'] = true;
    				break;
    			}
    		}
    	}
    	
    	$deleted = false;
    	foreach( $splitted as $key => $current )
    	{
    		if( ! empty( $current['delete'] ) && ( true === $current['delete'] ) )
    		{
    			unset( $trail[ $key ] );
    			$deleted = true;
    		}
    	}
    	
    	if( $deleted )
    	{
    		$trail = array_merge( $trail );
    	}
    	
    	return $trail;
    }

     

  16. در 3 ساعت قبل، Morteza گفته است :

    کدهای بریدکرامب عموما در زیر هدر، بالای بخش متن ها باید قرار بگیره.

    شما باید براساس پوسته تون این بخش رو پیدا کنید.(خروجی پوسته)

     

    قالب خودش دارای  قابلیت بریدکرامب است به صورت زیر:

    1.thumb.png.0fa8c92652cb1fdd16671ac5f9916a62.png

     

    در قسمت سورس سایت هم کدهای برید کرامب است به صورت زیر:

    <div class='stretch_full container_wrap alternate_color light_bg_color title_container'><div class='container'><strong class='main-title entry-title '><a href='https://acgih.ir/' rel='bookmark' title='لینک به: وبلاگ - آخرین اخبار'  itemprop="headline" >وبلاگ - آخرین اخبار</a></strong><div class="breadcrumb breadcrumbs avia-breadcrumbs"><div class="breadcrumb-trail" xmlns:v="https://rdf.data-vocabulary.org/#"><span class="trail-before"><span class="breadcrumb-title">مکان شما:</span></span> <span><a rel="v:url" property="v:title" href="https://acgih.ir" title="سایت تخصصی دانشجویان بهداشت حرفه ای"  class="trail-begin">صفحه اصلی</a></span> <span class="sep">/</span> <span><a rel="v:url" property="v:title" href="https://acgih.ir/category/%da%a9%d9%86%da%a9%d9%88%d8%b1-%d9%88-%d8%aa%d8%ad%d8%b5%db%8c%d9%84%d8%a7%d8%aa-%d8%aa%da%a9%d9%85%db%8c%d9%84%db%8c/">کنکور و تحصیلات تکمیلی</a></span> <span class="sep">/</span> <span class="trail-end">کلیه گرایش های ارشد مهندسی بهداشت حرفه ای...</span></div></div></div></div>
    <p id="breadcrumbs"><span><span><a href="https://acgih.ir/" >خانه</a> » <strong class="breadcrumb_last" aria-current="page">کلیه گرایش های ارشد مهندسی بهداشت حرفه ای</strong></span></span></p>

     

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

    خانه » عنوان مطلب است و دسته بندی ها رو نشان نمی دهد.

    2.thumb.png.2c9aaa099f58e0567f2ab4d4e3a6f2e8.png

     

    نمونه برید کرامب در گوگل استراکچر که در قسمت article است:

    https://search.google.com/structured-data/testing-tool/u/0/#url=https%3A%2F%2Facgih.ir%2F%d9%86%da%a9%d8%a7%d8%aa-%d8%a7%db%8c%d9%85%d9%86%db%8c-%d9%85%d9%82%d8%a7%d9%88%d9%85%d8%aa-%d8%b3%d8%a7%d8%b2%d9%87-%d9%87%d8%a7-%d9%88-%d8%b9%d9%85%d9%84%db%8c%d8%a7%d8%aa-%d8%a7%d8%b7%d9%81%d8%a7%2F

  17. در ۱ ساعت قبل، Morteza گفته است :

    سلام

    من سایت رو نمیشناسم ولی این ها عموما به عنوان عکسهای فریم هستن که بخش اسکرین رو خالی میزارن تا بشه توش هر چیزی گذاشت.

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

    سایت های زیادی هستند ولی اسمشونو یادم رفته

  18. سلام
    قابلیت Breadcrumbs را در افزونه یواست فعال کردم ولی بایستی کد زیر را در header.php یا single.php در جای مناسب قرار دهم تا Breadcrumbs ها در نتایج گوگل نشان داده شود.
    لطفا در یکی از این فایل ها کد را جایگذاری کنید تا در هاست هم تغییر بدم.
    کد Breadcrumbs

    <?php
    if ( function_exists('yoast_breadcrumb') ) {
    yoast_breadcrumb('
    <p id="breadcrumbs">','</p>
    ');
    }
    ?>

     

     

    کد فایل header.php

    <?php
        if ( ! defined('ABSPATH') ){ die(); }
        
        global $avia_config;
        
        $lightbox_option = avia_get_option( 'lightbox_active' );
        $avia_config['use_standard_lightbox'] = empty( $lightbox_option ) || ( 'lightbox_active' == $lightbox_option ) ? 'lightbox_active' : 'disabled';
        /**
         * Allow to overwrite the option setting for using the standard lightbox
         * Make sure to return 'disabled' to deactivate the standard lightbox - all checks are done against this string
         *
         * @added_by G端nter
         * @since 4.2.6
         * @param string $use_standard_lightbox                'lightbox_active' | 'disabled'
         * @return string                                    'lightbox_active' | 'disabled'
         */
        $avia_config['use_standard_lightbox'] = apply_filters( 'avf_use_standard_lightbox', $avia_config['use_standard_lightbox'] );
    
        $style                     = $avia_config['box_class'];
        $responsive                = avia_get_option('responsive_active') != "disabled" ? "responsive" : "fixed_layout";
        $blank                     = isset($avia_config['template']) ? $avia_config['template'] : "";   
        $av_lightbox            = $avia_config['use_standard_lightbox'] != "disabled" ? 'av-default-lightbox' : 'av-custom-lightbox';
        $preloader                = avia_get_option('preloader') == "preloader" ? 'av-preloader-active av-preloader-enabled' : 'av-preloader-disabled';
        $sidebar_styling         = avia_get_option('sidebar_styling');
        $filterable_classes     = avia_header_class_filter( avia_header_class_string() );
        $av_classes_manually    = "av-no-preview"; /*required for live previews*/
    
        /**
         * Allows to alter default settings Enfold-> Main Menu -> General -> Menu Items for Desktop
         * @since 4.4.2
         */
        $is_burger_menu = apply_filters( 'avf_burger_menu_active', avia_is_burger_menu(), 'header' );
        $av_classes_manually   .= $is_burger_menu ? " html_burger_menu_active" : " html_text_menu_active";
    
        /**
         * Add additional custom body classes
         * e.g. to disable default image hover effect add av-disable-avia-hover-effect
         *
         * @since 4.4.2
         */
        $custom_body_classes = apply_filters( 'avf_custom_body_classes', '' );
    
        /**
         * @since 4.2.3 we support columns in rtl order (before they were ltr only). To be backward comp. with old sites use this filter.
         */
        $rtl_support            = 'yes' == apply_filters( 'avf_rtl_column_support', 'yes' ) ? ' rtl_columns ' : '';
        
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?> class="<?php echo "html_{$style} ".$responsive." ".$preloader." ".$av_lightbox." ".$filterable_classes." ".$av_classes_manually ?> ">
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <?php
    /*
     * outputs a rel=follow or nofollow tag to circumvent google duplicate content for archives
     * located in framework/php/function-set-avia-frontend.php
     */
     if (function_exists('avia_set_follow')) { echo avia_set_follow(); }
    
    ?>
    
    
    <!-- mobile setting -->
    <?php
    
    if( strpos($responsive, 'responsive') !== false ) { echo '<meta name="viewport" content="width=device-width, initial-scale=1">';  }
    ?>
    
    
    <!-- Scripts/CSS and wp_head hook -->
    <?php
    /* Always have wp_head() just before the closing </head>
     * tag of your theme, or you will break many plugins, which
     * generally use this hook to add elements to <head> such
     * as styles, scripts, and meta tags.
     */
    
    wp_head();
    
    ?>
    
    </head>
    
    
    
    
    <body id="top" <?php body_class( $custom_body_classes . ' ' . $rtl_support . $style." ".$avia_config['font_stack']." ".$blank." ".$sidebar_styling); avia_markup_helper(array('context' => 'body')); ?>>
    
        <?php
        
        /**
         * WP 5.2 add a new function - stay backwards compatible with older WP versions and support plugins that use this hook
         * https://make.wordpress.org/themes/2019/03/29/addition-of-new-wp_body_open-hook/
         *
         * @since 4.5.6
         */
        if( function_exists( 'wp_body_open' ) )
        {
            wp_body_open();
        }
        else
        {
            do_action( 'wp_body_open' );
        }
        
        do_action( 'ava_after_body_opening_tag' );
            
        if("av-preloader-active av-preloader-enabled" === $preloader)
        {
            echo avia_preload_screen();
        }
            
        ?>
    
        <div id='wrap_all'>
    
        <?php
        if(!$blank) //blank templates dont display header nor footer
        {
             //fetch the template file that holds the main menu, located in includes/helper-menu-main.php
             get_template_part( 'includes/helper', 'main-menu' );
    
        } ?>
            
        <div id='main' class='all_colors' data-scroll-offset='<?php echo avia_header_setting('header_scroll_offset'); ?>'>
    
        <?php
            
            if(isset($avia_config['temp_logo_container'])) echo $avia_config['temp_logo_container'];
            do_action('ava_after_main_container');

     

     

    کد فایل single.php

    <?php
        if ( !defined('ABSPATH') ){ die(); }
        
        global $avia_config;
    
        /*
         * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
         */
         get_header();
    
        $title  = __('Blog - Latest News', 'avia_framework'); //default blog title
        $t_link = home_url('/');
        $t_sub = "";
    
        if(avia_get_option('frontpage') && $new = avia_get_option('blogpage'))
        {
            $title     = get_the_title($new); //if the blog is attached to a page use this title
            $t_link = get_permalink($new);
            $t_sub =  avia_post_meta($new, 'subtitle');
        }
    
        if( get_post_meta(get_the_ID(), 'header', true) != 'no') echo avia_title(array('heading'=>'strong', 'title' => $title, 'link' => $t_link, 'subtitle' => $t_sub));
        
        do_action( 'ava_after_main_title' );
    
    ?>
    
            <div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'>
    
                <div class='container template-blog template-single-blog '>
    
                    <main class='content units <?php avia_layout_class( 'content' ); ?> <?php echo avia_blog_class_string(); ?>' <?php avia_markup_helper(array('context' => 'content','post_type'=>'post'));?>>
    
                        <?php
                        /* Run the loop to output the posts.
                        * If you want to overload this in a child theme then include a file
                        * called loop-index.php and that will be used instead.
                        *
                        */
                            get_template_part( 'includes/loop', 'index' );
                      
                            
                            $blog_disabled = ( avia_get_option('disable_blog') == 'disable_blog' ) ? true : false;
                            
                            if(!$blog_disabled)
                            {
                                //show related posts based on tags if there are any
                                get_template_part( 'includes/related-posts');
        
                                //wordpress function that loads the comments template "comments.php"
                                comments_template();
                            }
                        ?>
    
                    <!--end content-->
                    </main>
    
                    <?php
                    $avia_config['currently_viewing'] = "blog";
                    //get the sidebar
                    get_sidebar();
    
    
                    ?>
    
    
                </div><!--end container-->
    
            </div><!-- close default .container_wrap element -->
    
    
    <?php
            get_footer();

     

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