Do you want better
IT Services ?

Let our experts help you navigate the digital world with tailor-made IT Solutions!

Table of Contents

Introduction –> Adding Custom Fields –> Displaying Custom fields  –> Doing through Plugin


This is the third part of the tutorial and within next ten minuted you will be able to display custom fields in your post. We need to add a small piece of code in the wordpress loop. If you are a developer you must be knowing about the loop, and if you are not, try to find out wordpress loop in content.php or single.php or content-single.php. In most of the cases loop is present in one of the above mentioned files. So let us check the  code needed to display the fields which we added in last part.

 

<?php echo get_post_meta($post->ID,'key',true); ?>

We need to change the key to key name which he has entered while creating the field. The above code will display the value of the custom field added and not the key or Name. So I am doing a proper formatting to display the key name as well as the value.

 

<?php echo "Theme Code:".get_post_meta($post->ID,'ThemeCode',true). "<br>"; ?>

One need to repeat this code everytime he wants to display different fields. Below is the image of code we wrote to add the fields we created in previous part of this tutorial.

 

Below is the output on Post, after adding the Coding to display the custom fields.

 

Seems Nice na !!. You now know how to add custom fields to a wordpress blog. So if you need to add the same fields to different post, you dont need to do any step again. One just need to add new post and just add the field values. Below is an image describing the same.

 

In the next part of tutorial we are going to do this all in a easy way. We will be doing the stuff through a plugin. Well there are several free and premium plugins available, but we have chosen Wp-Types to do all these stuff via plugin. Details are provided in next part.

Introduction –> Adding Custom Fields –> Displaying Custom fields  –> Doing through Plugin


 

 

WordPress vs A Custom based php Website

WordPress and a custom PHP website are two different approaches to building a website. Here are some differences between the two: Ease of use: WordPress is generally easier to use than a custom PHP website, because it has a user-friendly interface and a large number of plugins and themes that allow you to easily add...

Read More

10 ways to bring targeted audience to your website

Search engine optimization (SEO): Optimizing your website for search engines can help bring targeted traffic from people searching for keywords related to your business. Pay-per-click (PPC) advertising: PPC advertising platforms like Google AdWords allow you to create ads that appear at the top of search engine results pages when people search for specific keywords. Content...

Read More

Top 8 Benefits of Having a Website

Top 8 Benefits of Having a Website Whether you’re a small business or a large corporation, having a website is essential to your success. In today’s digital world, people are used to getting their information online, and if you don’t have a website, you’re missing out on a huge opportunity. A website allows you to...

Read More

What is web hosting and why do I need it ?

Unless you are planning to build a website from scratch, you will need web hosting. Web hosting is a service that provides you with the technology and resources necessary to build and maintain a website. Think of it this way: if a website is like a house, then web hosting is like the land it’s...

Read More

How To Find The Right Website Designer For Your Business

A website is the face of your business – so it’s important that you take the time to find a designer who will create something that accurately represents your company. In this blog post, we’ll explore the process of selecting a designer, what you should keep in mind when hiring one, and how to go...

Read More

A Guide To Why You Need A Dynamic Website

The world has changed. The way people search for things have changed. The way they use technology to do their work have changed. Gone are the days when you create a website and take it as it is, customers will want more information, they’ll want better content, so you need to be ready to provide...

Read More
Scroll to Top
Scroll to Top

We help businesses with Websites, Mobile Applications, Digital Marketing, E Commerce Solutions & Custom Software.