WordPress is a flexible content manager, which allows you to publish content on your website and specify what type of content it is, be it a video, extract, gallery, among others, which allows you to give a special presentation to each type of content. format, depending on the design and stylization of your current theme. But in many cases the uaurios only use the standard format, therefore, today we demonstrate how to eliminate support for WordPress input formats.
What are Entry Formats?
The input formats are a feature that has been introduced in WordPress since version 3.1 and that is basically a specific information of each format that is used by the theme to customize the view and presentation of a certain type of input .
WordPress by default has 8 input formats that can be stylized by themes, and these 8 types appear by default in official WordPress themes, as is the case with the current Twentyseventeen theme.
It is not possible to add custom input formats by themes or plugins, but you can change the name of each one that includes WordPress, editing some codes by the functions.php file in the theme.
Types of Input Leaves
Module of input formats supported by the theme in WordPress
As we mentioned above, WordPress brings presetting to types of input formats, each of which is oriented to specify a certain type of content. The types of input formats are:
As its name says, it is the type of entry that does not have special features, and has a general format and stylization of most of the content of the site.
You will always post images on your website, especially if you are a photographer or photo lover, this is the default format that stylizes the content highlighting the presentation of the image.
It highlights the video player, when you include a URL this must be the video for example from Youtube, or when the first tag in the input is <video /> which is considered a signal for WordPress of what it is about content.
The quote as it says the name of this format, is used for extracts taken from a book, a quote or proverb of a popular character, presented in quotation marks or according to the stylization of the subject.
Share a link on your site of a book, product or article of interest through this format, and the active topic will use the first link of the <a> tag in your post to highlight that link. You can simply paste just the link as content and the entry title as his name.
An entry consisting of a photo gallery. WordPress uses the shortcode [galley] to get information about the gallery you want to show.
A format dedicated to Podcating, which allows to include audio file and present it according to a certain stylization.
Input format to include a transcript of a conversation, in a presentable and readable form.
Add Input Formats
Now that you know what are the different input formats that WordPress allows you to use to customize the appearance of your site’s content in an orderly and stylized way, let’s see how to support the entry formats in your theme if you do not have it.
add_theme_support( 'post-formats' );
With this simple code that you include in the functions.php file in your current theme, you add support to all the default WordPress input formats, and as a result a module appears in the input editor.
If this is the first time you are going to work with editing files in WordPress, we recommend you visit our article on how to edit WordPress files correctly.
If you are a bit more demanding, and you want only certain input formats to be shown from what we have mentioned above, you simply specify the name of the format that WordPress establishes by default in English, which are:
An example. We only want to use the gallery and video entry formats, what you do is use the following code where you specify the type of format in a matrix.
add_theme_support( 'post-formats', array( 'gallery', 'video' ) );
You return to the input editor to find only three input formats in your current theme, the standard, which comes by default, and can not be deleted, plus the two that you have specified in this example that are gallery and video.
It is advisable to use a child theme when adding or deleting these formats to preserve the changes when the parent theme is updated. If you do not know what this is, we invite you to read our previous article on how to create son theme in WordPress.