PDA

View Full Version : سوال: مشکل برچسب ها



omidcruise
سه شنبه 26 خرداد 1394, 21:57 عصر
سلام
من یک سایت وردپرسی دارم و برچسب های هر مطلب هم در پست صفحه اصلی زیر هر مطلب نشون میده و هم در ادامه مطلب(صفحه مخصوص اون پست) نشون میده. من میخواستم فقط در ادامه مطلب نشون بده چیکار کنم؟ اگه افزونه ای هم باشه لطفا معرفی کنید.

omidcruise
پنج شنبه 28 خرداد 1394, 01:13 صبح
یعنی کسی نیست که راه حلی بده؟

mohammad425
پنج شنبه 28 خرداد 1394, 01:18 صبح
در فایل index.php قالبتون کدی شبیه به این رو حذف کنید:


<?php the_tags( 'برچسب‌ها: ', ', ', ''); ?>

omidcruise
پنج شنبه 28 خرداد 1394, 16:15 عصر
خیلی ممنون در
index.php کدی شبیه به این وجود نداشت ولی در template-tags.php وجود داشت که اونو حذف کردم درست شد ولی کلا قسمت برچسب ها حذف شد ولی من فقط میخوام برچسب های توی پست صفحه اصلی زیر هر مطلب حذف بشه نه برچسب ها در ادامه مطلب(صفحه مخصوص اون پست). به نظرتون میشه؟

mohammad425
پنج شنبه 28 خرداد 1394, 20:48 عصر
شما محتویات فایل index.php رو قرار بدین تا دقیقا بگم چی رو حذف کنید

omidcruise
جمعه 29 خرداد 1394, 22:06 عصر
<?php/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* e.g., it puts together the home page when no home.php file exists.
*
* Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
*
* @package WordPress
* @subpackage Twenty_Fifteen
* @since Twenty Fifteen 1.0
*/


get_header(); ?>


<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">


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


<?php if ( is_home() && ! is_front_page() ) : ?>
<header>
<h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
</header>
<?php endif; ?>


<?php
// Start the loop.
while ( have_posts() ) : the_post();


/*
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );


// End the loop.
endwhile;


// Previous/next page navigation.
the_posts_pagination( array(
'prev_text' => __( 'Previous page', 'twentyfifteen' ),
'next_text' => __( 'Next page', 'twentyfifteen' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
) );


// If no content, include the "No posts found" template.
else :
get_template_part( 'content', 'none' );


endif;
?>


</main><!-- .site-main -->
</div><!-- .content-area -->


<?php get_footer(); ?>

mohammad425
جمعه 29 خرداد 1394, 23:14 عصر
قالب شما از یه کد کلی استفاده میکنه, برای همین اگه تغییری در کدها بدین روی همه ی بخشای قالب اعمال میشه
بهترین روش و بی دردسرش اینه که در فایل index.php قبل از <?php اینو قرار بدین:


<style>.tags-links{display:none}</style>

omidcruise
شنبه 30 خرداد 1394, 00:54 صبح
خیلی ممنون بابت کمکتون