How To Show Hidden Custom Fields In WordPress
How To Show Hidden Custom Fields In WordPress

WordPress, as one of the most popular Content Management Systems (CMS), is well-known for its numerous functions and customization options.

Expanding metadata, which refers to key information about a page or post such as author names, titles, and descriptions, is one such option.

By enabling custom fields in WordPress, users can include additional metadata, extending the functionality of specific posts or pages. For example, collecting the author’s email address, including a disclaimer in a sponsored post, or attaching additional information to a product.

Custom fields, like most WordPress features, can be added manually or via a dedicated plugin to your posts and pages.

In this article, we’ll define custom fields and show you how to use both methods to add them to your WordPress content.

What Exactly Are WordPress Custom Fields?

So every WordPress page and post that you create has its own set of metadata. WordPress’s default metadata includes the author’s name, date, and time. For example, in the post below, the metadata is visible above the post title.

However, in some cases, you will need to add metadata that WordPress does not support out of the box – this is where custom fields come in handy. Custom fields in WordPress are a feature that allows you to add extra information to a post or page.

Custom fields allow you to enter that information and expand the information on your content:

It is adaptable and customizable. Custom fields are made up of code snippets that allow you to customise and control where they appear on your site’s front end.

Simpler input and updating. If you want to change the information displayed on your posts, simply edit the custom fields rather than editing each individual post.

Custom fields ensure that all of your posts display the same information and are formatted in the same way.

How does one show hidden custom fields in WordPress?

  1. Open your WordPress admin dashboard.
  2. Go ahead and hover onto your Appearance.
  3. Click on Theme Editor.
How To Show Hidden Custom Fields In WordPress
  1. Go and tap on Theme Function.
  2. Then, go and enter the code. 
How To Show Hidden Custom Fields In WordPress

Code:

add_action( 'admin_head', 'showhiddencustomfields' );
 
function showhiddencustomfields() {
    echo "<style type='text/css'>#postcustom .hidden { display: table-row; }</style>
";
}
  • After that, go and click on the Update File

So that’s all there is to it. We hope the above instructions mentioned above managed to help you figure out how to show the hidden custom fields in WordPress. 

In case you have any more queries or questions, feel free to check out our website Digital Suncity or even contact us.

Read More: How To Optimise Your WordPress Robots.txt For SEO

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Need Professional Help?

We can help you with website fixes and ongoing maintenance.