Usunięcie informacji o liczbie komentarzy w poście w motywie Color ews Pro
-
Witajcie,
tak jak w temacie – chciałabym usunąć ze strony główne informację o autorze, dacie i ilości komentarzy we wpisie. Czy jest tu ktoś, kto jest w stanie mi pomóc? 🙂
-
Musisz podać jakieś namiary na siebie. Link do motywu lub twojej strony.
Chodzi mi o te chmurki z ilością komentarzy, informacją o autorze na stronie głównej przy tytule, np przy psychologu, douli, masażu…
Ok. Widzę, że motyw jest płatny i nie można go pobrać więc i dostępu do źrodeł brak. Jedyny sposób to nakierować Cię, w którym miejscu może się to znajdować i sama bedziesz musiała to znaleźć.
To jest Twoja strona główna. Domyślnie jest to plik
home.phplubindex.phpew. jakieś poskładane w całość części szablonu jak np.index.php + conten.php.To co ty musisz znaleźć to blok:
<div id="main-content-section clearfix">następnie masz:
<div id="primary">przeskakujemy na:
<div class="article-content">Głębiej masz
<div class="below-entry-meta">i właściwie co cały ten div możesz sobie usunąć, bo on odpowiada za te dymki i chmurki.Zrobiłam tak, jak napisałeś, ale nic się nie zmieniło 🙁
Wklejam więc Szablon strony głównej…<?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: http://codex.wordpress.org/Template_Hierarchy
*
* @package ThemeGrill
* @subpackage ColorNews
* @since ColorNews 1.0
*/
?><?php get_header(); ?>
<?php do_action( 'colornews_before_body_content’ ); ?>
<div id=”main” class=”clearfix”>
<div class=”tg-container”>
<div class=”tg-inner-wrap clearfix”>
<div id=”main-content-section clearfix”>
<div class=”article-content”><?php if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?><?php
/*
* 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( 'template-parts/content’, get_post_format() );
?><?php endwhile; ?>
<?php colornews_posts_navigation(); ?>
<?php else : ?>
<?php get_template_part( 'template-parts/content’, 'none’ ); ?>
<?php endif; ?>
</div><!– #primary end –>
<?php colornews_sidebar_select(); ?>
</div><!– #main-content-section end –>
</div><!– .tg-inner-wrap –>
</div><!– .tg-container –>
</div><!– #main –><?php do_action( 'colornews_after_body_content’ ); ?>
<?php get_footer(); ?>
Ok. Czyli jeszcze musisz poszukać w pliku
content.phpMasz tam taką linijkę:
get_template_part( 'template-parts/content', get_post_format() );Motyw pobiera sobie dodatkową część, której tu nie ma, według wybranego formatu (format wybierasz podczas edycji wpisu):
aside chat gallery link image quote status video audiolub okreslonego przez motyw. Jeżeli nie wybrano żanego, pobierze domyślny czyli
content.phpI co dalej?
Teraz nic nie działa…
Na stronie głównej nie chodzi slider. Niczego nie da się kliknąć.
a przy próbie edycji wpisu wszystko jest w html.
🙁I dalej, szukaj w pliku conten.php tych diwów, które wskazałem Ci wyżej.
Ew. wklej zawartość pliku conten.php np. do Pastebin
Grzebałam wczoraj w tych plikach.
single.phpMożesz zobaczyć, co jest w nim nie tak, że nie chodzi strona?
<?php
/**
* The template for displaying all single posts.
*
* @package ThemeGrill
* @subpackage ColorNews
* @since ColorNews 1.0
*/
?><?php get_header(); ?>
<?php do_action( 'colornews_before_body_content’ ); ?>
<div id=”main” class=”clearfix”>
<div class=”tg-container”>
<div class=”tg-inner-wrap clearfix”>
<div id=”main-content-section clearfix”>
<div id=”primary”><?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'template-parts/content’, 'single’ ); ?>
<?php colornews_post_navigation(); ?>
<?php if ( get_the_author_meta( 'description’ ) ) : ?>
<div class=”author-box”>
<div class=”author-img”><?php echo get_avatar( get_the_author_meta( 'user_email’ ), '100′ ); ?></div>
<h4 class=”author-name”><?php the_author_meta( 'display_name’ ); ?></h4>
<p class=”author-description”><?php the_author_meta( 'description’ ); ?></p>
<?php if ( get_theme_mod( 'colornews_author_bio_social_sites_show’, 0 ) == 1 )
colornews_author_social_link();
?>
</div>
<?php endif; ?><?php if ( get_theme_mod( 'colornews_related_posts_activate’, 0 ) == 1 )
get_template_part( '/inc/related-posts’ );
?><?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?><?php endwhile; // End of the loop. ?>
</div><!– #primary end –>
<?php colornews_sidebar_select(); ?>
</div><!– #main-content-section end –>
</div><!– .tg-inner-wrap –>
</div><!– .tg-container –>
</div><!– #main –><?php do_action( 'colornews_after_body_content’ ); ?>
<?php get_footer(); ?>
I tutaj też grzebałam page.php
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages’ on your WordPress site will use a
* different template.
*
* @package ThemeGrill
* @subpackage ColorNews
* @since ColorNews 1.0
*/
?><?php get_header(); ?>
<?php do_action( 'colornews_before_body_content’ ); ?>
<div id=”main” class=”clearfix”>
<div class=”tg-container”>
<div class=”tg-inner-wrap clearfix”>
<div id=”main-content-section clearfix”>
<div id=”primary”><?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'template-parts/content’, 'page’ ); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?><?php endwhile; // End of the loop. ?>
</div><!– #primary end –>
<?php colornews_sidebar_select(); ?>
</div><!– #main-content-section end –>
</div><!– .tg-inner-wrap –>
</div><!– .tg-container –>
</div><!– #main –><?php do_action( 'colornews_after_body_content’ ); ?>
<?php get_footer(); ?>
Nie mam tam tych divow
template-parts/content.php
<?php
/**
* Template part for displaying posts.
*
* @package ThemeGrill
* @subpackage ColorNews
* @since ColorNews 1.0
*/?>
<article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<?php do_action( 'colornews_before_post_content’ ); ?><?php
if ( has_post_thumbnail() ) {
$featured_image_class = 'featured-image-enable’;
} else {
$featured_image_class = ”;
}
?><div class=”figure-cat-wrap <?php echo $featured_image_class; ?>”>
<?php if ( has_post_thumbnail() ) { ?>
<div class=”featured-image”>
” title=”<?php the_title(); ?>”><?php the_post_thumbnail( 'colornews-featured-image’ ); ?>
</div>
<?php } ?><?php colornews_colored_category_return(1); ?>
</div><?php if( get_post_format() ) { get_template_part( '/inc/post-formats’ ); } ?>
<?php colornews_published_date(); ?>
<header class=”entry-header”>
<h2 class=”entry-title”>
” title=”<?php the_title_attribute();?>”><?php the_title(); ?>
</h2>
</header><?php colornews_entry_meta(); ?>
<div class=”entry-content”>
<?php
the_excerpt();
?><?php
wp_link_pages( array(
'before’ => '<div class=”page-links”>’ . esc_html__( 'Pages:’, 'colornews’ ),
'after’ => '</div>’,
) );
?>
</div><!– .entry-content –><div class=”entry-anchor-link”>
” href=”<?php the_permalink(); ?>”><span><?php _e( 'Read more’, 'colornews’ ); ?></span>
</div><?php do_action( 'colornews_after_post_content’ ); ?>
</article><!– #post-## –>Zrób jeszcze tak:.
Otwierając sobie Notepad++ kliknij na wyszukiwarkę (lornetka) CTRL + F.
Przejdź do zakładki: Szukaj w plikach
Wpisz słowo: below-entry-meta
i wybierz katalog ze swoim motywem.P.s. Jest jeszcze funkcja
<?php colornews_entry_meta(); ?>Nie wszystko może być od tak pokazane w szablonach. Niektóre części motywu mogą znajdować się w pliku function.php.
P.s.2.
Nie powinienem o to pytać tu na forum, bowiem jest to nie zgodne z jego zasadami, ale jeżeli sobie nie radzisz z tym, po prosu wyślij mi paczkę zip z tym motywem (o dostępie do FTP na razi nie bede wspominał).
Jaki Notepad++?
Temat ‘Usunięcie informacji o liczbie komentarzy w poście w motywie Color ews Pro’ jest zamknięty na nowe odpowiedzi.