You can use the custom fields included in wordpress
Add a new post and do the following steps:
1. Go to the Options page
2. Select “custom fields” and hit the reload button
3. you now have a custom field in your post edit page at the bottom.
now you can use this custom field in your theme inside the post-loop
<?php while ( have_posts() ) : the post(); ?>
<?php echo get_post_meta($post->ID, 'featured', true); ?>
<?php endwhile; ?>
You have to replace ‘featured’ with the name of your custom field.
Once you created a custom field, you can use it in your others post as well.
Hope this is helpful.
Related Posts:
- Add a checkbox to post screen that adds a class to the title
- Prevent duplicate posts in wp_insert_post using custom fields
- Add a custom meta box in the post options that loads some html code in the header
- Customize rel=canonical tag for single blog post
- Edit multiple custom post types while saving a new or edited post
- if in category but only with post meta
- Adding an option to post editor to show a site disclaimer or message
- How to only allow post to be deleted if custom field doesn’t exist
- First Custom Post Custom Fields Empty After New Custom Post
- How to Do Custom Fields to Output a Definition List
- Setting Custom Sort Order of Posts within a Category
- Custom Field in Featured image for A particular post
- Custom permalink structure only for default posts
- Exclude drafts in all() view of edit.php
- How to change the layout and styling of posts according to their category in WordPress?
- adding a custom css class to post
- Add default content to post (for specific category)
- Pagination not working on Custom Page Template
- Adding a Nav menu to post admin
- get_post_custom stripping styling issue
- Display custom post types by date field
- How to hook a function only when I need to delete permanently a post?
- How to change what the post creation page looks like?
- display order of connections
- user contributed content as custom post types
- Remove custom posts that match taxonomy value
- Custom Theme Want To Remove One Category From All Displays
- Is there any WordPress alternative to Book module of Drupal?
- Post Type Label Name
- wp_query ‘s’ parameter does not work with custom post type
- How to start with post number x?
- Best way of deletion of old posts [closed]
- Sidebar links for different pages
- Duplicating Table of Contents for Paginated Post
- Deleted category by mistake, all posts now have categorized category. Can i revert that?
- Blog Posts in Custom Menu
- How to display data in archive page?
- Delete post by giving its link
- How to make classes for posts?
- CPT archive redirects to single post
- Getting Custom Post Loop to display in Bootstrap 3 column grid
- ERROR: Your feed is invalid (after update WP4.7) in custom types
- Automatically add date to the auto generation of post slug
- Duplicate Custom Post Type and Taxonomy Slug
- How could I change my Permalink from blog to custom structure? [closed]
- WP Admin register taxonomy and post type performance
- WordPress Multisite – Create Default Post and New Category On New Site Install
- How to allow visitors to filter posts by multiple taxonomies
- Query Posts by Custom Field
- How to I retrieve the ID from the Posts page?
- a little direction on custom post type
- Format latest/newest post differently
- relating business and products with custom taxonomy?
- WordPress Query Posts From Category Post on Static Page
- Create a custom posts page
- How to allow multiple thumbnail upload for Posts?
- add external project to web site wordpress on production
- Output Post with ACF Fields into other Post
- Deleted a user with administrator rights. Now all the data/content/images are lost. how to recover them back
- Custom Post Limit for homepage only without plugin?
- Static pages not working
- saving/reading custom field value does not work – no value gets POSTed
- Change default post style to columns
- Custom Post Type, post-formats associated to custom post type > 404 archives
- Adding a custom post type meta field to rss
- Help with listing current users submitted custom post type in template file
- Delete post from admin but not from database
- Adding external field to my post form (admin side) and to post show (frontend side)
- How To Use Custom Fields With .mp3 Links
- how can display a post on home screen without images
- Custom Select Query – Selecting the Year?
- Deleting old posts
- What would causes search to return incorrect results?
- get posts, run a custom query, and join the results
- search form for custom fields
- Saving canvas generated image when saving post causes 404 error
- Some custom post types did not return an object
- Display Post from Custom Post Type with Shortcode
- Tag for custom post type
- Modified core/image rendering not showing in posts – only on pages
- Not display an image of category of custom post
- Is there a way to save different data when USER interacts with the same POST?
- Post relationships/nesting
- Manual Scheduler For Custom Post Type
- Dev and prod on the same database- dev version active for IOS
- How to delete/customize imported demo content from a theme or add my own?
- single- and archive- templates not being applied to custom post types, not even after flushing permalinks
- How to show content of specific item on the same page?
- How to list all names and descriptions of a custom taxonomy
- get_the_ID() fails the first time, returns a value the second time it’s called
- How can I have the posts from one word press blog show on the presentation page of another word press site
- Show a Category Specific Info Box
- Make a custom URL and link to custom Template
- Special Query: Title, Terms, Content – %LIKE%
- WordPress 3.2 – Problem with WYSIWYG editors in a custom post type?
- How to show only the date, the title and a little “summary” of my WordPress post in my custom theme?
- How enter custom post meta or custom field on box post list archive page?
- Dynamic Menu Item
- Read more opens attachment
- I have a website issue I am trying to resolve