Skocz do zawartości

Usunięcie obrazka wyróżniającego ze strony głównej i kategorii


Rekomendowane odpowiedzi

Mam problem z usunięciem obrazka wyróżniającego ze strony głównej i w kategoriach. Nie chcę po prostu go nie dodawać we wpisie bo chcę mieć wpływ na wygląd linku w social mediach. Czy ktoś mógłby mi wskazać kod za to odpowiedzialny który trzeba usunąć? Niżej podaje kod z index stylu.

<?php 

get_header();

if ( is_home() ) {

	if ( bard_options( 'featured_slider_label' ) === true || bard_options( 'featured_links_label' ) === true ) {
		// Featured Slider, Carousel
		if ( bard_options( 'featured_slider_label' ) === true && bard_options( 'general_slider_width' ) !== 'inner' ) {
			get_template_part( 'templates/header/featured', 'slider' );
		}

		// Featured Links, Banners
		if ( bard_options( 'featured_links_label' ) === true ) {
			get_template_part( 'templates/header/featured', 'links' ); 
		}
	}
}

?>

<div class="main-content clear-fix<?php echo bard_options( 'general_content_width' ) === 'boxed' ? ' boxed-wrapper': ''; ?>" data-layout="<?php echo esc_attr( bard_page_layout() ); ?>" data-sidebar-sticky="<?php echo esc_attr( bard_options( 'general_sidebar_sticky' ) ); ?>" data-sidebar-width="<?php echo esc_attr( bard_options( 'general_sidebar_width' ) ); ?>">
	
	<?php get_template_part( 'templates/sidebars/sidebar', 'left' ); ?>

	<div class="main-container">
		
		<?php 
		
		
				// Featured Slider, Carousel
		if ( bard_options( 'featured_slider_label' ) === true && bard_options( 'general_slider_width' ) === 'inner' ) {
			get_template_part( 'templates/header/featured', 'slider' );
		}

		// Author Description
		if ( is_author() && bard_options( 'blog_page_show_author_description' ) ) {
			get_template_part( 'templates/single/author', 'description' );
		}

		// Category Description
		if ( is_category() ) {
			get_template_part( 'templates/grid/category', 'description' );
		}

		?>

		<ul class="blog-grid">

		<?php

		// Loop Start
		if ( have_posts() ) : while ( have_posts() ) : the_post();

		// Grid Class
		$custom_post_class = 'blog-grid-style';

		// List Class
		if (  strpos( bard_page_layout(), 'list' ) === 0 ) {
			$custom_post_class	= 'blog-list-style';
		}
		
		// Classic Class
		if ( ( is_home() && ! is_paged() && $wp_query->current_post == 0 && bard_full_width_post() ) || strpos( bard_page_layout(), 'col1' ) === 0 ) {
			$custom_post_class	= 'blog-classic-style';
		}
		
		echo '<li class="'. $custom_post_class .'">';

		// Blog Feed Wrapper
		if ( is_home() && ! is_paged() && $wp_query->current_post == 0 && bard_full_width_post() ) {
			get_template_part( 'templates/grid/blog', 'full' );
		} else if ( strpos( bard_page_layout(), 'col1' ) === 0 ) {
			get_template_part( 'templates/grid/blog', 'classic' );
		} else if ( strpos( bard_page_layout(), 'list' ) === 0 ) {
			get_template_part( 'templates/grid/blog', 'list' );
		} else {
			get_template_part( 'templates/grid/blog', 'grid' );
		}

		echo '</li>';

		endwhile; // Loop End

		else:

	 	?>

		<div class="no-result-found">
			<h1><?php esc_html_e( 'Nothing Found!', 'bard-pro' ); ?></h1>
			<p>
				<?php esc_html_e( 'It seems we can\'t find what you\'re looking for. Perhaps searching can help or go back to ', 'bard-pro' ); ?>
				<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php esc_html_e( 'Homepage', 'bard-pro' ); ?></a>
			</p>
			<div class="bard-widget widget_search">
				<?php get_search_form(); ?>
			</div> 	
		</div>

		<?php endif; ?>

		</ul>

		<?php get_template_part( 'templates/grid/blog', 'pagination' ); ?>

	</div><!-- .main-container -->

	<?php get_template_part( 'templates/sidebars/sidebar', 'right' ); ?>

</div>

<?php get_footer(); ?>

 

Odnośnik do komentarza

Dołącz do nas za darmo i naucz się zarabiać!

  • Dostęp do darmowych poradników pokazujących krok po kroku jak zarabiać w Internecie
  • Sposoby zarabiania niepublikowane nigdzie indziej
  • Aktywna społeczność, która pomoże Ci rozwiązać problemy i doradzi
  • Profesjonalne treści na temat SEO, social media, afiliacji, kryptowalut, sztucznej inteligencji i wiele więcej!

 

 

Cześć @RedShadow

Za wygląd linków w socialmedia jak mniemam chodzi o obrazy. Za ich wyświetlanie odpowiada protokół OpenGraph. Więcej na stronie https://ogp.me

W powyższym kodzie nie widzę obrazów wyróżniających. Prawdopodobnie znajdziesz je w linii 107, 109, 111, 113 czyli:

		// Blog Feed Wrapper
		if ( is_home() && ! is_paged() && $wp_query->current_post == 0 && bard_full_width_post() ) {
			get_template_part( 'templates/grid/blog', 'full' );
		} else if ( strpos( bard_page_layout(), 'col1' ) === 0 ) {
			get_template_part( 'templates/grid/blog', 'classic' );
		} else if ( strpos( bard_page_layout(), 'list' ) === 0 ) {
			get_template_part( 'templates/grid/blog', 'list' );
		} else {
			get_template_part( 'templates/grid/blog', 'grid' );
		}

Będąc bardziej szczegółowym chodzi o ścieżkę

templates/grid/blog

Pozdrawiam

  • Dzięki! 1
Odnośnik do komentarza

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Ta strona korzysta z ciasteczek, aby świadczyć usługi na najwyższym poziomie. Dalsze korzystanie z witryny oznacza zgodę na ich wykorzystanie. Polityka prywatności .