Pods Plugin: Creating new Pods and Displaying Them on Your Site

Unlock the power of custom post types! Learn step-by-step how to set up and display your unique content using the Pods plugin for WordPress.


Have you ever been on the cusp of giving up on a project simply because of not being able to pull it in just that way that you want to? This is the story of my life in web. Recently I got the idea of adding a custom post type to my website and while I can code that part, it’s just easier if I can find a small plugin that does it and make sure to keep itself updated. Then I found the Pods plugin!

In this article

In this article we’ll cover the process of setting up a custom post type with custom taxonomies (tags and categories) in a simple but effective setup for sharing articles you find interesting. First, we’ll show you The final result, then we move on to The setup of Pods plugin itself. After that, we set up the Custom post type and look at the different options available. Then, we need to Create and connect taxonomies to our custom post type.

Once the actual setup of Pods plugin, i.e. the custom post type and the desired taxonomies, we’ll move on to creating a template for the front end. Finally, we add the template to the front-end by placing a ‘Pod’ on the desired page or post!


1. The final result

We’ll start by showing the result!

Enter Pods plugin!

I should also mention that I’m one of those really liking the new and more advanced full site block editor. It’s really incredible how much you can do with it! Anyway, I wanted to build this website as a newsletter site. I wanted the main flow of articles ‘Posts’ and the ability to publish headlines in a quick and simple manner. Articles that I found interesting and that I might wanted to write about later on. So, a custom post type would be perfect!

Adding new ‘news’ with Pods plugin

This is what my new post type ‘news’ looks like when I click ‘Add New news’:

In this view you have the fields for title, tags and categories, but also a new, custom field called ‘url’. This field is where I copy the link to the article (or, perhaps you’d prefer an affiliate link?).

On the front-end

On the below picture’s right side, you can see the result. A list of headlines that, when you click them, takes you to the original website. Kind of like the setup used by Drudge Report and similar news aggregator sites. The beauty of this approach is that it doesn’t interfere with your normal posts. Neither does it show up in that feed. It has it’s own feed completely, thus keeping the rest of the website clean.

2. Setting up Pods plugin

Start with installing the plugin to your WordPress site. It’s freely available both from the plugin catalogue and from Pods own website. When you’ve installed or uploaded the plugin to your WordPress installation, you’ll find a new section in your admin panel. Here you’ll have the options to Edit you pods.

What is a ‘Pod’, you might ask?

Well, a pod is a piece of content. It can be a post- or a page type, a category, or a new set of tags. To these types of content you can then add several new fields. These fields can be normal text, checkboxes, urls, images, pdfs, phone number, e-mail, etc. – you get the point. This means that you have a lot more freedom and can add a lot more information to a post than with the normal post type.

E.g. I’ve created another post type for another website with book reviews, and yet another specifically for food recipes. If you want to see those as well, give me a shout out in the comments or contact me in your preferred way!

Now, head over to ‘Add new’ under Pods admin to set up your first pod!

3. How to set up a custom post type in Pods plugin

When faced with the below, we want to click on the bottom left ‘Create New >>’ button. We want to create a completely new post type that will show up in the admin panel the same way ‘Posts’ and ‘Pages’ are shown. If we click on the right button ’Extend Existing’, we will be able to create new fields for any of our current post types. That is very useful if you, for example want to add an adress field to a post type. That’s not what we want right now, though!

Create and name your new post type

Start with choosing the first option to create a new post type. As you see here, this is the place you’ll create the taxonomies as well later on.

Then, write the name of the new post type in singular and plural. This has no effect on the front end, only to make things easier for yourself in the admin panel.

Adding fields to your new post type

To add a new field to your new psot type, just hit ‘Add field’. If you’re adding a lot of extra fields, you might want to group them by adding several groups of fields.

Different field types

I won’t go into explaining all of these field types, they’re pretty self-explanatory. As you can see there any many different options for every conceivable way of structuring your new post type!

The fields shown in the image below: Label, Name, Description, and Field Type, are only visible to you so it doesn’t really matter what you put in here. Be aware that it’s good practice to keep the names and labels descriptive so you’ll have an easier time creating the templates later on.

3.5. Advanced Settings in Pods plugin

In addition to adding new fields to your custom post type, you can adjust some very handy settings if you’d like. You’ll find them in the ’Advanced Options’ tab and the ones highlighted in the image below are the ones I find the most interesting. If you’re more interested, you can read up on them in the docs on Pods’ official website.

Publicly QueryableThis setting decides whether or not the custom post type can be queryable from the outside, rss-feeds, etc.
Enable Archive PageJust like the ’Blog’ page of most blogs, it acts as a feed and collection for your blog posts. If you turn it on Pods will use the domain name ’mywebsite.com/[archive page]/[new custom post type posts]’.
HierarchicalPosts = Non-hierarchical
Pages = Hierarchical
Custom Rewrite SlugHere, you can change the slug in the forementioned archive page to e.g. ’mywebsite.com/[your custom slug]/[single post]

4. Set up- and connect taxonomies

Go through the process in #3 again, but this time choose ’Custom Taxonomy’ instead of custom post type. You don’t have to connect taxonomies for your custom post type to work, but if you want to be able to categorise your custom posts into different categories you’ll need to connect it to a taxonomy. That is easily done by checking the box next to the taxonomy you want to use and then click ‘Save’!

However, you don’t have to create a custom taxonomy for your new post type, you can connect it to the categories and tags that are already connected you the normal Post type.

Below is a screenshot from the ‘Connections’ tab in a custom post type named ‘book’. Here I’ve hooked it up to its own ‘books-cat’ category and to the normal, pre-existing Tags for WordPress’ normal posts. This way, I can have a complete set of categories only for this post type while using the same tags as on my other posts. If I check the archive of a certain tag I will see both books and normal posts that are tagged with this tag, while keeping it separate in other places.

5. Create a template for the front end with Pods plugin

So, now we have our custom post type, our new taxonomy to categorise our new posts and have connected them in the backend. Now, it’s time to present them on the front end. Enter Pods Templates!

Hit ‘- Pod Templates’ in the Pods Admin menu! Now, you’re faced with a new type of screen in which you’re editing the front end part of the new post type. First, choose a proper title for the template, since this title is what you will be identifying the template with when you’re placing the template on the page of your choice later on. Then, you have a couple of self-explanatory restrictions (check Pods website for more info, if you’re interested), and then the actual ‘Template’.

Creating the template

To create a template you need some understanding of html (or you can ask ChatGPT to write the few lines of html that you need). In the below example is a very simple example of what code is used to display the news on this website’s front page in a query loop. It’s basically just calling the post title inside a paragraph that is itself inside a link that goes to the ‘url’ of the very same post. This way, when the visitor clicks the link they’re redirected to the original article, just like on e.g. Drudge Report.

On the right hand side you have ‘Pod Reference’ which is the place where you choose what custom post type the current template should use as reference. You need to choose the right reference to be able to see the custom fields of the intended post type. E.g. if I choose ‘books’ as reference, I’ll have the option to use ‘isbn’, ‘author’, and ‘books-title’ instead of the intended ‘url’ and ‘news-cat’ taxonomy.

Once you’re done with the template, click ‘Save’ or ‘Update’ just as you would a normal post and you’re done!

6. Adding the Pods plugin template to a page or post

Now for the last part in which we’re actually going to show off our work to the public! I will do this in the new Gutenberg editor (yes, I kind of like it) but the process is pretty much the same in the classic editor as well.

Head to the page or post on which you want to display the template you just made.

Method 1: Using query loops to display a feed

First off, make sure you’ve selected the Query Loop in the left hand panel. On the right hand side you’ll see the normal options for query loops. You’ll also be able to select which ‘Post Type’ to display in the feed.

Select the feed of your choice and it will now load your new custom post type

Method 2: Adding the template to a single page or post

In this case I want to display some of the fields of a pod on a website, like book details on a book review post. First off, you need to create a new template or change one of your current ones and hook it up to the pod. Then, if you type /pods in an empty paragraph on the new template, you’ll have several options. Choose the ‘Pods Single Item’ for this example.

Under ‘Pod Name’, choose the pod you want to use and then the template that is hooked up to that pod under ‘Template’.

That’s pretty much it!

Example code of a simple book review’s sidebar:

If you want to edit the look of it you can do that in the template directly. If you don’t want to use the template function of Pods there’s another option here. You can just type the html in the ‘Custom Template’ space.

On the front end the current book review-pod looks something like below. The information on the right side is custom fields of the custom post type ‘book reviews’ and is displayed to the front end using ‘Method 2’. The html-code itself is very simple, yet effective:

<div>Original title: <a href="{@books_link}">{@books_title}</a></div>

<div>Written by: {@books_author}</div>

<div>Publisher: {@books_publisher}</div>

<div>Publish date: {@books_publishing_date}</div>

<div>Language: {@books_language}</div>

<div>Pages: {@books_pages}</div>

<div>ISBN-10: {@books_isbn_10}</div>

<div><em>{@books_quote}</em></div>

The front end result:


Comments

Leave a Reply

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

Recent notes

Florida man’s house hit by NASA’s space junk

In March of 2024, an ususpecting Florida man’s house was hit by a solid metal projectile jettisoned from the ISS in 2021.

Read more

In March of 2024, an ususpecting Florida man’s house was hit by a solid metal projectile jettisoned from the ISS in 2021.

The Debris

It was after an installation of fresh lithium-ion batteries that NASA decided to eject a pallet of the old nickel-hydride batteries from the Internation Space Station in 2021. The debris was expected to burn up during the re-entry into the atmosphere as to not cause damage. However, a small piece of the scrap metal survived and decended upon the unsuspecting Florida man’s house in tremendous speed, causing small holes in the roof and two floors, nearly hitting the Florida man’s son, playing in the next room.

The projectile meassured 4-inch by 1.6-inch and weighed 1.6 pound.

The aftermath

Florida man filed an unprecendented lawsuit against NASA for the damage but has of writing (June 22th, 2024) not received any compensation from the trash-tossers.

The lawsuit is ongoing and could set a very interesting precedent for future damage caused by any of the millions of objects flying around over our heads. Currently there are over 29,000 objects measuring more than 10 cm, 670,000 objects 1-10 cm large, and more than 170 million objects larger than 1 millimetre.

Luckily, for Florida man, his home insurance covered some of the costs – about $15,000 – and he’s now hoping for another $80,000 from the lawsuit, should he win.

“Scientists at University of British Columbia, New Scientist reports, calculate that the odds are one in ten of “casualties being caused by falling debris over the next decade.””

Environmental Law Institute

This might be a good time to complement the volcano insurance with space junk insurance!

Do you think this is a big problem going forward, and who should pay for the damage caused by space junk falling on people’s houses and properties?

Read less

2024-06-22 10:09 | 0 comments

VR advances and the future of WFH

Is WFH (working from home) just a very temporary freedom or is it here to stay? I believe it’s a bit of both.

Read more

Is WFH (working from home) just a very temporary freedom or is it here to stay? I believe it’s a bit of both.

When the viral hysteria of ’20 hit and people hid in their homes with double FP2’s over their facial air holes, allegedly working from home, most people viewed this as an incredible opportunity for more freedom. There was an incredible amount of people who, all of a sudden had double, triple, or quadruple lunch breaks to go grocery shopping, tend to the garden, or even hit the beach. The data, however, is in and it’s not looking too good for the semi-vacationeers “working from home”.

Employee Monitoring Tools

Unsurprisingly, people higher up started to notice the trend and became disgruntled of the loss of control of their employee’s daily work habits. The first to Take meassures to counter this trend was the guys at big finance, who constructed elaborate “employee monitoring tools”.

Some of the great new features on your brand new WFH laptop include:

  • Full OS access to make sure you’re not viewing personal tabs in the browser
  • Webcam access – should be self-explanatory but it’ll make sure you’re eyes are focused on the screen for the whole 8-hour work day
  • New and improved webcam that is able to track your eyes, using AI tools to find out what part of the screen you’re focused on. Every. Single. Second.

The companies that used these tools noticed that they’re improving efficiency of their employees, regardless of their location.

Instead of forcing you into the office to make sure you’re working, they’re forcing the office upon your every location and system you’re using.

“Let them try…”

While the only companies using this type of extreme surveillance of their employees are the ones already known for pushing the limit of their subordinates, others will follow suit seeing the effectiveness of the systems.

A lot of people will, of course, not go along with this, but with the increased reach and reduced need of actually forcing people into the offices, most companies will probably succeed anyway. Almost all employees nowadays are easily exchangeable, whether we want to admit it or not. Especially when the hiring pool consist of the entirety of the world.

Of course, there’ll be hold-outs and companies that doesn’t jump on the big brother-train, but a lot of them will, making the few remaining jobs without extreme surveillance few and far apart.

Enter VR-headsets

A lot of people laughed at the seeming fiasco of Apple’s new VR headset. It’s true that it is over-the-top for most people’s daily use and the price tag demanded true Apple fanboy-ism from the buyer.

What this signalled, however, is the VR headset’s entry into the serious market and our lives. When Apple comes out with a new product category, odds are it’ll be commonplace in a few years.

So far, headsets are mostly used as gaming devices, gamification of house chores for stay-at-home-dads, and media consumption, but my bet is that companies soon will find great applications for the headsets in the workplace as well. Why, you ask?

  • Unlimited monitors an eye motion away, allowing anyone to work from anywhere. Need 4 large monitors to do your work? Not anymore.
  • 100% eyetracking uptime is a dream come true for the employer. Now, they can follow you everywhere when you “WFH”, and doesn’t have to rely on the static webcam on your laptop.
  • Simulated office in your pod-, I mean living room allows you to chat up that pretty receptionist hologram on your break.

Conclusion

As more and more people are demanding WFH part- or full time, pressure on the employers increases to accommodate without losing control. This is also an incredible tool to be used for personally evaluating employees fairly, if used with caution.

Furthermore, there must be discussions on how to handle all the data these new systems collect. Are employees actually aware of the amount of data their employer have on them? And what are the employer legally allowed to do with the data?

Read less

2024-06-18 03:18 | 0 comments

Gene therapy trial restores hearing

Loosing one of our senses has been a one way street for much of our history, but recent medical breakthroughs are showing very promising results in bringing them back!

Read more

Loosing one of our senses has been a one way street for much of our history, but recent medical breakthroughs are showing very promising results in bringing them back!

Gene therapy restoring hearing

18-month old British girl Opal Sandy has had her hearing restored through a new gene therapy trial. The deafness, in this case, was due to auditory neuropathy, a condition where nerve impulses from the inner ear to the brain are disrupted. To cure her condition a therapy, known as DB-OTO, was used, copying the OTOF gene directly to the ear. Through a minimally invasive procedure, where the gene solution was infused into the inner ear using a catheter, the hearing is potentially restored without any need of repeated treatments.

Future of hearing restoration

While this method was being used in the UK, other parts of the world are doing similar research targeting genetic forms of deafness. Both China and the US are currently working on their own respective delivery method and procedure of targeting the very gene causing deafness.

Not only did the little girl’s life change, but it also makes way for many more people being able to appreciate music, bird’s song, and the voices of our loved ones. Things the hearing of us takes for granted.

Read less

2024-06-06 09:05 | 0 comments

When wolves became man’s best friend

I think we can all agree on that man’s best friend – the dog – can trace its ancestry back to the wolves. How this came to be is a completely different story that researchers haven’t entirely come to agree on. Was it humans or wolves that took the first s

Read more

I think we can all agree on that man’s best friend – the dog – can trace its ancestry back to the wolves. How this came to be is a completely different story that researchers haven’t entirely come to agree on. Was it humans or wolves that took the first step into the interspecies relationship?

Timeline

Today’s dogs have wandered quite far from their original form in the wolf. Even today’s wolves have to some extent devolved into a smaller version of their once larger statures. We’re not entirely certain when this process actually began, but some estimates say it started between 20,000 to 40,000 years ago in Europe and Asia. Studies also suggest that this might have happened in different geographical locations.

Leading theories

The Self-Domestication Theory suggests that at some point wolves began to scavange near human settlements, attracted to the delicious remains of hunting trophys. Over time, the wolves who wandered further into the presence of man in his camps were rewarded with more spoils, warmth from the campfire, and a true bond of friendship.

Another theory, Directed Domestication Theory, suggest that the friendship wasn’t mutual but that early humans captured wolf pups and raised them as their own. They were then selectively breeded for desirable traits.

Whether one subscribes to the theory of mutual benefit or that it was a forced relationship, we can all probably agree that it has been a good one at that!

Read less

2024-05-15 11:57 | 0 comments

Using AI to talk to whales

Recently OpenAI released a much improved version of their LLM, called ChatGPT-4o. The main focus seem to have been on language and conversation, where it answers significantly faster, in any language, and with more “human” emotions in speech, text…

Read more

Recently OpenAI released a much improved version of their LLM, called ChatGPT-4o. The main focus seem to have been on language and conversation, where it answers significantly faster, in any language, and with more “human” emotions in speech, text, or image. Such an improvement does pose the question where it all ends. Will we be able to translate animal speech with an app on our phones in coming updates?

Project CETI and Earth Species Project

Scientists working on Project CETI (Cetacean Translation Initiative) and the Earth Species Project have been working on deepening our understanding of sperm whale language and communication. To this end, they’ve used AI tools in which they’ve created a LLM (Large Language Model) with vast amounts of data on whale talk. The goal is to be able to understand the language of the whales and even to reply to them.

Whale communication

Sperm whales apparently have a very complex communication system with sequences of clicks (called codas), of which the researchers have identified several distinct sequences, believed to function like an alphabet. Their language and “way of speaking” also isn’t random, but very dependant on the context of their interaction.

Conclusion

If we can learn how to communicate with sperm whales, there’s no reason to believe we cannot learn to communicate with other animals. Or plants and fungi, for that matter.

The interesting question here is, whether this will open up to new kinds of deeper knowledge about our environment.

Will we be able to continue to eat animals that we can communicate “meaningfully” with? What does your cat really think of you? Do you really want to know what the crows and seagulls are screaming about?

Read less

2024-05-14 11:43 | 0 comments