Hide featured image не работает

Как скрыть изображения миниатюры записи для отдельных постов в WordPress

Опубликовано: ADv Дата 30.06.2016 в рубрике Плагины WP 2 комментария

Недавно один из наших читателей спросил, возможно ли скрыть миниатюру записи в определенных записях WordPress? Возможны ситуации, когда у вас задана миниатюра для записи, но вместо того, чтобы удалить ее, вам просто необходимо ее спрятать. В сегодняшней статье мы покажем вам как скрыть изображения миниатюры записи для отдельных постов в WordPress.

Зачем и когда полезно скрывать миниатюры в WordPress?

Миниатюры записей — это функция темы в WordPress, и это означает, что ваша тема WordPress контролирует вывод миниатюр изображения на вашем сайте.

У некоторых пользователей темы могут автоматически брать первую картинку в записи в качестве миниатюры, если таковая не была указана. Это означает, что тема все равно будет отображать картинку, даже если вы не указали ее в админке.

Некоторые пользователи используют плагины для автоматической установки дефолтной миниатюры.

Можно представить множество других ситуаций, когда вам придется скрыть миниатюру записи.

Давайте же посмотрим как можно легко скрыть миниатюру записи из поста WordPress без необходимости лезть в код.

Скрываем миниатюру изображения в отдельных записях WordPress

Первым делом вам необходимо установить и активировать плагин Hide Featured Image. Он работает «из коробки» и не нуждается в дополнительной настройке.

Просто перейдите в редактирование записи, в которой вы хотите скрыть миниатюру. В окне редактирования записи немного прокрутите страницу, и вы увидите блок под названием ‘Show/Hide Featured Image’.

Нужно отметить галочку рядом с опцией ‘Hide Featured Image’. Теперь можно сохранить запись и просмотреть на действие плагина на сайте.

Обратите внимание, что даже не смотря на то, что мы не убирали миниатюру у записи, плагин справился с работой и скрыл ее на сайте. Этот плагин НЕ удаляет или убирает в настройках миниатюру, он просто прячет ее на фронтенде вашего сайта. Если же вам понадобиться вернуть миниатюру снова, просто отредактируйте запись и снимите галочку у опции ‘Hide Featured Image’.

Плагин также умеет работать с произвольными типами записей, которые поддерживают миниатюры.

Мы надеемся, что эта статья помогла вам научиться скрывать изображения миниатюры записи для отдельных постов в WordPress.

Источник

It is 2021, and almost every WordPress theme provides an option to add a featured image on WordPress posts. However, not all the themes allow you to hide the featured image. So, if you want to know how to hide a featured image in WordPress posts, this write-up will come in handy for you.

Читайте также:  Sata разъем не работает

Below, we will discuss three easy methods to hide a featured image in a WordPress post.

Table of Contents

1. Check if the WordPress theme you have has the option to hide a featured image.

Featured image is one of the features of the WordPress themes. So the first thing you should do is check if your theme has the option to hide featured images.

Follow the steps to check this feature on your WordPress theme:

  • Go to your WordPress theme dashboard.
  • Go to Post and then click on All Posts.
  • Now click on the Edit option below your WordPress posts.

Under the preview button, you will see options as shown in the screenshot below:

You should now find the option to remove featured images under ‘Featured Image.’

If you can’t find it, navigate every tab, and you should be able to locate it. If you still can’t, your WordPress theme probably does not have the option to hide featured images on its own.

We recommend using a theme that gives you control over the featured image, such as Rara Business Pro, Astra, and Divi. These themes are SEO-friendly, lightweight, and fully customizable.

2. Using a WordPress plugin to hide features image

If your current theme does not support hiding a featured image and you also don’t want to use a new theme, you can use a WordPress plugin to get the job done. However, be aware that this plugin has not been updated for a long time and has not been tested on the latest WordPress versions. So, do your research beforehand. A study shows that 52% of WordPress vulnerabilities are due to plugins. So think twice before installing this plugin.

Here are some plugins you can use:

Hide Featured Image

Search for the “Hide Featured Image” plugin. Most of the bloggers also recommend this plugin. It has also received a considerable number of active installations.

Here are the steps:

  • Activate and install the ‘Hide featured image’ plugin.

  • Go to ‘Settings’ on your WordPress dashboard.
  • Look for ‘Hide Featured Image’ and click on it.

  • Under ‘General Settings’ you can find the option to hide images on posts and pages.
  • Click on the option and click on the ‘Submit’ button below.

Conditionally Display Featured Images

There is another alternative plugin called “Conditionally display featured images on singular posts and pages.” This plugin does the same job of displaying or hiding the featured images in WordPress posts. Moreover, it is compatible with the current WordPress version.

Here is a video tutorial to help you install and use the “Conditionally display featured image” plugin.

In case you prefer texts, follow the step below:

  • Login to your WordPress dashboard.
  • Go to Plugin and then click on Add New.
  • You will find a search bar on the top right. Type “Conditionally display the featured image.”
  • Click on ‘Install’ to install the plugin.
  • Click on ‘Activate’ to activate the plugin.

  • Go to ‘Posts’ and click on ‘All Post.’
  • Now select the post with the featured image that you want to hide. Click on ‘Edit.’
  • Go to ‘Featured Image’ on the right side below the preview button.
  • Check the option that says “Display featured image in post lists only, hide on singular views.”
Читайте также:  Как настроить вид почты аутлук

If this plugin does not work, there is another plugin to edit featured images. It is called Quick Featured Images. This plugin does not allow you to ‘Hide’ the featured images. But you can add and remove featured images conveniently.

  • Login to your WordPress dashboard.
  • Go to Plugin and click on Add New.
  • You will find a search bar on the top right. Type “Quick Featured Images.”
  • Click on ‘Install’ to install the plugin.
  • Click on ‘Activate’ to activate the plugin.

  • Go to ‘Posts’ and click on ‘All Post.’
  • Click on ‘Remove Featured Image’ to remove the image or click on ‘Set Featured Image’ to instantly add an image.

Frequently Asked Questions

You can hide featured images using a simple line of code on WordPress CSS. Follow the steps below:

  • Go to your WordPress admin panel.
  • Go to Appearance > Customize > Additional CSS.
  • Now type in the following code.

You need to replace 1234 with your actual post ID.

A study shows that 38% of the visitors leave the website if they find it captivating. From this, we can anticipate the importance of visual impression to retain the visitors.

Appropriate featured images provide a visual introduction of your overall content. Moreover, they enhance the overall appearance of your page and compel your visitors to read your content.

Yes, you can use multiple featured images for your blog or post. I recommend downloading the Dynamic Featured Image plugin for this purpose.

This plugin enables you to add multiple featured images on your page or custom posts. You can easily set the number of featured images you want to add without writing a single line of code.

Were you able to hide the featured image in your WordPress theme after reading our content? Also, check out our article on How to add alt tags to images in WordPress.

Let me know in the comment section below.

How to fix error establishing a database connection in WordPress?

Imagine you’re having a nice cup of morning coffee, and you open up your laptop to browse your WordPress site. Suddenly, you see this disappointing message that says, “error establishing…

How to Change the Font Size in WordPress?

When you create a WordPress website, changing font size becomes an essential feature. You might want to change your header’s font size, overall paragraph, or just a selected element. Either…

Источник

Как предотвратить двойной вывод миниатюр в записях WordPress

Создание записей в WordPress – довольно простой процесс для пользователей. Однако те, кто только начинает работать с данной системой, могут столкнуться с некоторыми непонятными вещами. Обычно проблемы появляются с функциональностью миниатюр. Недавно один из наших читателей обратился к нам с вопросом, как избежать двойного вывода миниатюр в записях. Это достаточно общая проблема с изображениями, которая может быть легко решена. В этой статье мы покажем вам, как избежать двойного отображения миниатюр в записях WordPress.

Почему миниатюры выводятся дважды?

Самая распространенная причина, по которой миниатюры могут выводиться два раза в записях WordPress, заключается в том, что иногда новички задают миниатюру и вставляют ее в контент записи.

Читайте также:  Razer не работают макросы

Это действие кажется осмысленным для новичков, поскольку, когда они устанавливают миниатюру, они ждут, что она отобразится в визуальном редакторе WordPress. Когда ее там нет, они думают, что, возможно, что-то пропустили, поэтому вставляют то же самое изображение в редактор записей. На сей раз они видят изображение в визуальном редакторе и понимают, что вроде как все сделали правильно. Однако при публикации они замечают, что изображение выводится два раза в записях.

Как исправить это?

Достаточно всего лишь удалить изображение в редакторе записей и убедиться в том, что вы используете специальное поле для задания миниатюры.

Миниатюры – возможность тем WordPress. Это означает, что поддержка данной возможности обрабатывается вашей темой WordPress, поэтому вы не видите, как выглядит изображение в вашем редакторе записей.

Когда вы задаете миниатюру для записи, база данных связывается с вашей темой, чтобы получить эту миниатюру. Она выводится на экран автоматически. Это позволяет разработчикам тем использовать общие стили для миниатюр записей повсюду на своем сайте.

Данный подход способен помочь решить проблему с двойными миниатюрами, однако вы можете столкнуться и с некоторыми другими проблемами. Скажем, если вы изменили тему, ваши миниатюры могут выглядеть растянутыми, скошенными или непропорциональными. Чтобы исправить это, вы можете воспользоваться плагином Regenerate Thumbnails.

Если решение не помогло вам, то в таком случае проблема связана с базовым кодом вашей темы. В этом случае вам понадобится связаться с разработчиком темы, чтобы получить всю необходимую информацию.

Источник

WordPress.org

Support » Theme: OceanWP » Hide Featured Image

I have learndash and need each course to have a featured image for my course grid. However, the image also pops up at the top of the course page. I want the image to not be shown on the course page. I have tried using plugins to do this but they do not work.

Please share a snapshot that which image you want to hide and page URL to check it.

It’s the featured image of that page. Why do you need the url just to see that? Don’t you know what that is?

And I removed the image because of this issue so it’s not there

  • This reply was modified 6 months, 2 weeks ago by kalebweeter14 .

When we ask additional questions it’s because we need more information and also to inspect website codes to see where that “image” is coming from – theme, plugin, etc.

Unfortunately, your description is not enough and we would have probably asked the same even if you shared screenshots which you did not.

There are too many options that could mean one and the same, and in order for us to be certain and provide the support needed, there are things we need to inspect on our own.

You of course can work with us on this or you do not have to because we cannot force you to collaborate, the choice is entirely yours. This is a public forum and per WordPress rules, everything except personal information needs to be shared here.
If this is not suitable for you, perhaps hiring a web designer would be a better option.

In case you do want our help or advice, then allow us to help you by helping us and providing the necessary information.

Источник

Оцените статью