Wordpress - common fields for posts

I added a new custom post in Wordpress and named it Products.
In admin menu in Products I have two links - All Products and New Product.

Everything works perfectly, each product has it's own permalink, fields and so on.

Question:
What shall I do to have a few editable fields to be common for all products?
I mean, I wish to edit a field just a single time in admin and it shall display on all product pages.

Solutions

Use the Settings API. There is no built-in way to do it at a custom post type level.

You could also define a secondary custom post type ("All Products Details") and attach it to every Product you create as a custom field on it, but then you also have to implement an automated way of setting defaults for custom fields (Here's a way to do this.).

Similar questions

How to display Common posts from specific Tag & Category with Shortcode
How to display posts that are common in Category A and Tag A, and I want to display posts by shortcode so that the Shortcode can be used on multiple locations with different category Ids and Tags. I found the below code by google but don't know how to implement it in functions.php and not sure how to use it in the shortcode. I want to display Post ...
Common template for Joomla + Wordpress + phpBB or Drupal + Wordpress + phpBB
I'm struggling to try and find an answer to this question and was hoping someone might be able to help me. Are there any common/easy editable themes that I can use across Joomla (or Drupal), Wordpress and phpBB? I know that you can find decent forum and blogging modules in both Joomla and Drupal but I want to stay with Wordpress and phpBB (mainly b...
Common user login for two different wordpress installation and bbpress
I have situation, that i need common user login for I found the solution Single use login for two wordpress installation from Justin Tadlock Blog. Installing two WordPress blogs with the same users But What for bbPress ? Is there any plugin can work for me ? Should i use wordpress multisite (i am using it)? Thanks In Advance !
Is there a common structure for a wordpress formular?
I am working on a plugin for wordpress and was wondering if there is any common standard for the html and css structure and naming which I should use if I create a html form? so is there a definition how the DOM of a WP form shell look like, and if so: what is the proposed syntax? sorry for my english ;)
Vagrant script to setup all the common PHP / WordPress version combinations
I am looking for a way to quickly and repeatedly set up testing / debugging environment for our plugin, most probably using Vagrant. Projects like VVV focus on a single-environment setup (or, a couple of environments like stable / trunk) while what I'm looking for is a script that would setup environments like: Is there such thing? The closest I fo...
How to prevent hotlinking with htaccess in Wordpress and why most common use about it doesn't work?
I started with this .htaccess configuration: and to protect the website from theft with hotlinking, I searched the best solution adding this code on the bottom of the code: The code above is the most common solution to prevent hotlinking, it's very clear, but it doesn't work: when I paste the URL of image, for example https://www.mywebsite.com/wp-c...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.