رفتن به مطلب

حذف سایدبار از کنار یکی از ساختارهای نوشته


پست های پیشنهاد شده

سلام

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

میشه؟

فایل content-audio.php

<?php

/**

* The template for displaying posts in the Audio Post Format on index and archive pages

*

* Learn more: http://codex.wordpress.org/Post_Formats

*

*/

?>

<div id="post-<?php the_ID(); ?>" <?php post_class('article'); ?>>

<div class="head">

<div class="date-mw" title="<?php the_date(); ?>">

<?php the_time('j'); ?><br /><?php the_time('M'); ?>

<span class="post-format-icon"></span>

</div>

<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'bloxy' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>

</div>

<div class="content cf">

<?php if ( is_search() ) : // Only display Excerpts for Search ?>

<div class="entry-summary">

<?php the_excerpt(); ?>

</div><!-- .entry-summary -->

<?php else : ?>

<div class="entry-content">

<?php the_content( __( '<span class="readmore">Continue reading</span>', 'bloxy' ) ); ?>

<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'bloxy' ) . '</span>', 'after' => '</div>' ) ); ?>

</div><!-- .entry-content -->

<?php endif; ?>

</div>

<div class="meta cf">

<div class="top"></div>

<div class="left">

<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>

<?php

/* translators: used between list items, there is a space after the comma */

$tags_list = get_the_tag_list( '', __( ', ', 'bloxy' ) );

if ( $tags_list ): ?>

<div class="tags">

<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'bloxy' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>

</div>

<?php endif; // End if $tags_list ?>

<?php

/* translators: used between list items, there is a space after the comma */

$categories_list = get_the_category_list( __( ', ', 'bloxy' ) );

if ( $categories_list ):

?>

<div class="cats">

<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'bloxy' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );

$show_sep = true; ?>

</div>

<?php endif; // End if categories ?>

<?php endif; // End if 'post' == get_post_type() ?>

</div>

<div class="right">

<div class="author"><?php the_author() ?><?php edit_post_link(__(' · Edit This', 'bloxy')); ?></div>

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

<div class="coms"><?php comments_popup_link( __( 'Leave a reply', 'bloxy' ), __( '<b>1</b> Reply', 'bloxy' ), __( '<b>%</b> Replies', 'bloxy' ) ); ?></div>

<?php endif; // End if comments_open() ?>

</div>

</div>

</div>

ممنون

لینک به ارسال

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

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

چون الان نمیشه گفت چیزی رو بردارید

  • امتیاز 4
لینک به ارسال

ممنون

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


http://lajevardisc.com/%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87-%D8%A2%D9%85%D9%88%D8%B2%D8%B4-%D9%BE%DB%8C%D8%B4%DA%AF%DB%8C%D8%B1%D8%A7%D9%86%D9%87-%DB%8C-%D8%A7%D9%88%D9%84%DB%8C%D8%A7/

لینک به ارسال

به این شکل بررسی کنید


if ( has_post_format( 'aside' )) {
}

نام ساختار را جایگزین aside کنید

http://www.wpbeginner.com/wp-themes/what-whys-and-how-tos-of-post-formats-in-wordpress-3-1/

  • امتیاز 3
لینک به ارسال

ممنونم

نشد ساختار حاشیه هم فقط عنوان رو حذف میکنه

aside – Typically styled without a title. Similar to a Facebook status update.

میشه یا برم سراغ برگه بدون سایدبار؟

ممنون

لینک به ارسال

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

aside فقط برای نمونه بود

شرط رو میشه قبل از کد نمایش سایدبار قرار داد

  • امتیاز 2
لینک به ارسال

لطفا برای ارسال دیدگاه وارد شوید

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



ورود به حساب کاربری
×
×
  • اضافه کردن...