öne çıkarılan görseli kullanmaktaki tek amacım,sosyal medya paylaşımlarında bir görsel olması. onun dışında anasyafada blog içeriklerinde bu görsellerin görünmelerini istemiyorum. sade bir temam var.
bunu nasıl gizleyebilirim ?
kullandığım tema neve ücretsiz sürümü. gerekirse functions.php veya index.php kodlarını paylaşıyorum.
functions kodlarım
<?php
/**
* Neve functions.php file
*
* Author: Andrei Baicus <andrei@themeisle.com>
* Created on: 17/08/2018
*
* @package Neve
*/
define( 'NEVE_VERSION', '2.4.2' );
define( 'NEVE_INC_DIR', trailingslashit( get_template_directory() ) . 'inc/' );
define( 'NEVE_ASSETS_URL', trailingslashit( get_template_directory_uri() ) . 'assets/' );
if ( ! defined( 'NEVE_DEBUG' ) ) {
define( 'NEVE_DEBUG', false );
}
/**
* Themeisle SDK filter.
*
* @param array $products products array.
*
* @return array
*/
function neve_filter_sdk( $products ) {
$products[] = get_template_directory() . '/style.css';
return $products;
}
add_filter( 'themeisle_sdk_products', 'neve_filter_sdk' );
add_filter( 'themeisle_onboarding_phprequired_text', 'neve_get_php_notice_text' );
/**
* Get php version notice text.
*
* @return string
*/
function neve_get_php_notice_text() {
$message = sprintf(
/* translators: %s message to upgrade PHP to the latest version */
__( "Hey, we've noticed that you're running an outdated version of PHP which is no longer supported. Make sure your site is fast and secure, by %s. Neve's minimal requirement is PHP 5.4.0.", 'neve' ),
sprintf(
/* translators: %s message to upgrade PHP to the latest version */
'<a href="https://wordpress.org/support/upgrade-php/">%s</a>',
__( 'upgrading PHP to the latest version', 'neve' )
)
);
return wp_kses_post( $message );
}
/**
* Adds notice for PHP < 5.3.29 hosts.
*/
function neve_php_support() {
printf( '<div class="error"><p>%1$s</p></div>', neve_get_php_notice_text() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
if ( version_compare( PHP_VERSION, '5.3.29' ) <= 0 ) {
/**
* Add notice for PHP upgrade.
*/
add_filter( 'template_include', '__return_null', 99 );
switch_theme( WP_DEFAULT_THEME );
unset( $_GET['activated'] );
add_action( 'admin_notices', 'neve_php_support' );
return;
}
require_once get_template_directory() . '/start.php';
require_once 'globals/utilities.php';
require_once 'globals/hooks.php';
require_once 'globals/sanitize-functions.php';
require_once get_template_directory() . '/header-footer-grid/loader.php';index kodlarım
<?php
/**
* Index template.
*
* @package Neve
*/
$container_class = apply_filters( 'neve_container_class_filter', 'container', 'blog-archive' );
get_header();
?>
<div class="<?php echo esc_attr( $container_class ); ?> archive-container">
<div class="row">
<?php do_action( 'neve_do_sidebar', 'blog-archive', 'left' ); ?>
<div class="nv-index-posts blog col">
<?php
do_action( 'neve_before_loop' );
do_action( 'neve_page_header', 'index' );
do_action( 'neve_before_posts_loop' );
if ( have_posts() ) {
/* Start the Loop. */
echo '<div class="posts-wrapper row">';
$pagination_type = get_theme_mod( 'neve_pagination_type', 'number' );
if ( $pagination_type !== 'infinite' ) {
global $wp_query;
$posts_on_current_page = $wp_query->post_count;
$hook_after_post = -1;
if ( $posts_on_current_page >= 2 ) {
$hook_after_post = intval( ceil( $posts_on_current_page / 2 ) );
}
$post_index = 1;
}
while ( have_posts() ) {
the_post();
get_template_part( 'template-parts/content', get_post_type() );
if ( $pagination_type !== 'infinite' ) {
if ( $post_index === $hook_after_post && $hook_after_post !== - 1 ) {
do_action( 'neve_middle_posts_loop' );
}
$post_index ++;
}
}
echo '</div>';
if ( ! is_singular() ) {
do_action( 'neve_do_pagination', 'blog-archive' );
}
} else {
get_template_part( 'template-parts/content', 'none' );
}
?>
<div class="w-100"></div>
<?php do_action( 'neve_after_posts_loop' ); ?>
</div>
<?php do_action( 'neve_do_sidebar', 'blog-archive', 'right' ); ?>
</div>
</div>
<?php
get_footer();