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

Malicious AI-bots are on a holiday shopping spree

AI bots have entered the holiday! Though not as jolly joy spreaders as one could’ve hoped, but as tools for scammers to exploit the season’s shopping spree.

Read more

AI bots have entered the holiday! Though not as jolly joy spreaders as one could’ve hoped, but as tools for scammers to exploit the season’s shopping spree.

The Problem

During the holiday shopping season, retailers have seen a large increase in fraudulent purchases from bots. This new iteration of bots are able to mimic the average customer, making them more difficult to detect. It allow them to purchase large quantities of high-demand products quickly, perhaps to resell at later times at hiked prices.

They are also able to more effectively identify vulnerabilities in the systems used by the retailers, thus allowing for ransomware, takeover off customer’s accounts, or manipulate prices through discount codes.

Today’s retailers see an average of 560 000 daily such AI-driven attacks.

Solutions

Anyone familiar with the purchasing flow of sites like Amazon know it’s incredibly easy to purchase any product. Once you’ve got your account you’re about 2-3 clicks away from ordering a product – any product.

But the trade-off here is security. Creating additional steps for purchasing online will make the consumer have more opportunities to stop and rethink their choice, which is what retailers, especially online ones, struggle with today. This could somewhat be helped by setting up blocking for malicious domains and IP’s, a practice many companies already adhere to.

A fricitonless approach makes for more opportunity for scammers to exploit and penetrate the process than a process with more security measures set up will.

It’s not an easy trade-off in today’s dopamin-infused world where customers won’t hesitate for a second to swipe along to another retailer!

Read less

2024-11-28 02:01 | 0 comments

Pressing Pause on Streaming: Is Physical Media Making a Comeback?

Are people increasingly turning away from the comfort of streaming services and back towards physical mediums? That’s what some people are experiencing, and I’d be lying if it hadn’t crossed my mind as well.

Read more

Are people increasingly turning away from the comfort of streaming services and back towards physical mediums? That’s what some people are experiencing, and I’d be lying if it hadn’t crossed my mind as well.

Downsides of streaming services

What a lot of people, myself included, have experienced with streaming services is the sudden disappearance of the show I’m currently watching or a movie I plan to watch. This has been a recurring theme in our house where we’re about to put on the Friday movie with the kids and it’s just gone. Of course, there are always others, but if you’ve hyped up 3 kids for a movie, there’s going to be some disappointment.

Another downside, that’s really not quite a downside, is the way we’ve been watching movies in. Before streaming services we decided on a movie for the evening, put the movie on and watched it. Afterwards we normally did other things. Now, the ease of starting another movie after the first one allows for whole evenings spent on the couch in front of the black box. The movie is nowhere near as “important” to the setting anymore.

Recent uptick in physical sales

According to BBC News, there’s been a recent uptick in the sales of physical visual, and more specifically Blu-ray discs. Despite being more expensive than their streamed counterparts they are steadily on the rise.

“If you hold it in your hand, it’s yours”

Personally, I believe a lot of people simply have started getting tired of the endless subscriptions we pay for different services. I myself have been going over my old CD-collection and am looking to possibly purchase a new stereo to rid myself of Spotify. It’s a good service, but I’m generally listening to the same songs and artists over and over, paying the approximate price for an album every month.

If I purchase 12 albums per year, I have exactly 12 albums after one year that I never have to pay for again. I can download the songs to my phone and listen to when I’m not home, at the same time my wife or kids listen to the same album at home.

Buy it once, enjoy it forever.

Will streaming become a thing of the past?

It’s quite unlikely that streaming will go away anytime soon. It’s simply too convenient and comfortable to put on and just leave in the background. It’s also a great way to find common ground, if you take date home for an evening on the couch. Instead of browsing through your highly specific movie list of documentaries of the Roman Empire, she might want something more easily digestible.

As the streaming industry will inevitably become more normalised in the coming years, it will settle for a somewhat smaller audience than currently. Currently, there are too many streaming services that produce too much bad quality stuff and doesn’t have enough of the good stuff that will have to be swallowed by the others, one way or another.

Giants don’t like to sell things that can be resold

When looking at the numbers, physical retail of movies, etc. aren’t exactly going too well, despite the hopefulness of this article. However, we must remember that a lot of people who purchase CDs and physical movies don’t always purchase them new. There’s been a significant uptick in second hand sales in pretty much all markets recently. It’s become cool to reuse and repurpose things. This doesn’t show in any kind of statistics.

E.g. I have a friend who buys- and sells old vinyl records online and makes quite a nice profit off of them. None of these transactions are visibly in any type of metric, but the buyers are happy for their new record all the same.

Read less

2024-07-25 10:03 | 0 comments

Giant Impact Theory of Plate Tectonics

Living on this planet we call home, most of us are very aware that the ground beneath our feet move occasionally. The enormous plates that make up the many continents we live on move, and sometimes they come in contact with each other, in more or less…

Read more

Living on this planet we call home, most of us are very aware that the ground beneath our feet move occasionally. The enormous plates that make up the many continents we live on move, and sometimes they come in contact with each other, in more or less drastic ways. But how did this come to be: Why does the earth consist of different plates and not just one solid piece?

Formation of Continents

According to the Giant Impact Theory of Plate Tectonics suggest that the initial formation of continents could be the result of a massive meteor hit to the earth. A hit which caused the single “shell” of Earth to break apart and start moving. According to scientists, the massive release of energy on the planet took place during the first billion years of the planet’s existence, causing the lithosphere (outer shell of the planet) to melt and form the oceanic plates we’re so used to today.

Scientific Evidence

Since we don’t have any eyewitness accounts of the crust-killer meteorite, we have to resort to digging for archaeological and geological evidence of this event. In rocks from the Pilbara Craton in Western Australia one study found ancient minerals, such as zircon crystals, suggesting that a massive release of energy took place. The crystals were studied and found to have been created during a handful of distinct periods, rather than created over time. Together with the age of the crystals we can come up with a time frame for the event that corresponds with the suggested hit by the large rock on Earth.

Other Theories

The great thing about science is that it is a process, not a result, resulting in various other explanations of the event.

The Planetary Collision Theory

Another suggestion is that a great collision with another planet, Theia, approximately the size of mars, could have triggered the division of tectonic plates.

However, as usual, nothing is certain in the world of science and we don’t really know for sure what caused the Earth’s shell to separate. The search for other Eart-like planets with tectonic plates of their own continues and, hopefully we’ll get som additional information from these that may aid our understanding of our home planet!

Read less

2024-07-16 10:38 | 0 comments

‘Better than real men’: Chinese men are losing to AI chatbots in the flesh market

A recent trend in companion-type chatbots have taken the Chinese young women by storm. In ever larger numbers they are simply turning away from the Chinese men in favor of the friendly and romantic machines.

Read more

A recent trend in companion-type chatbots have taken the Chinese young women by storm. In ever larger numbers they are simply turning away from the Chinese men in favor of the friendly and romantic machines.

Companion-type chatbots

By now, most people will probably have heard about ChatGPT, Ms Bing / Copilot, Gemini, and the other big names in Large Language Models. Chatbots, more specifically. Advanced ones, yes, but still chatbots.

Since the release of ChatGPT in last year, a lot of people have taken a liking to these Chatbots, perhaps more than what was first expected. Some startups noticed the opportunity and built models that would emulate a real person. One of those startups is the app “Glow” by Shanghai company MiniMax who’re offering, not really a chatbot, but rather a “companion”.

Particularly young women seem to be enjoying the conversations:

“He knows how to talk to women better than a real man,” said Tufei, from Xi’an in northern China, who preferred to use a pseudonym rather than her real name.

“He comforts me when I have period pain. I confide in him about my problems at work,” she said.

“I feel like I’m in a romantic relationship.”

Japan Times

Trust in the machines

Anyone living in the EU who haven’t noticed all the new cookie-pop-ups must’ve been living under a rock in recent years. The interesting thing about the data tracking law is that you get a real eye-opener to all the tracking that is being done on practically all websites – everywhere. Still, people do confide in the new types of AI chatbots like it’s a close friend.

The more you confide in them, the more they learn about you, and the more accurate they can be in predicting what next words you’ll want to hear in this very moment, as is illustrated by the first sentence of the above quote.

We’re still in the early stages of AI and the advancements are coming quickly.

Future of human relationships

If this trend is to continue, we will see a drastical reduction in human-human relationships in an already declining birth-rate epidemic all around the world. If young women are increasingly opting out of the dating pool to be with “someone who knows how to talk to women better than a real man”, young men are soon going to run out of young women to date.

A note on partnership

The point of a relationship is not to always get your way, and be told exactly what you want to hear. No improvement has ever been made by being told you’re doing everything completely right – it just breeds narcissism and loneliness.

Read less

2024-07-14 11:42 | 0 comments

Telling the Truth with Testosterone

Have you ever heard a woman complain about a man’s insensitivity? Or, perhaps, you even are a woman who’ve been on the receiving end of a man’s brutal honesty? There’s actually a good explanation to why men behave in this way – and it’s actually a good…

Read more

Have you ever heard a woman complain about a man’s insensitivity? Or, perhaps, you even are a woman who’ve been on the receiving end of a man’s brutal honesty? There’s actually a good explanation to why men behave in this way – and it’s actually a good thing!

The Role of Testosterone in Men

Testosterone is a hormone that exist in men and women alike and affects a lot of different functions in the body. It aids in things muscle growth, social behaviour, and emotional regulation. Women tend to have a significantly lower amount of testosterone than men, resulting in lower muscle mass and a lot of different behavioural and emotional differences. Some of these differences include the ability to be indifferent of other people’s opinions about one self (or in female terms: insensitivity to other’s feelings).

The Role of Testosterone in Women

Just like in men, testosterone regulates muscle mass, social behaviour, and emotions – women just have much less of it. For women, e.g. one of the effects an increase in testosterone have on them is reduced likelihood of crying.

Prosocial- and Strategic Behaviour

One study that explored how an increase in testosterone affected the participating males concluded that an increase in testosterone decreased prosocial behaviour in the men. This means that men who had their testosterone raised simply didn’t care what the surrounding thought about their opinions, or in other words, decreased lying. Testosterone seems to reduce conformity to social expectations and social anxiety and instead promotes behaviours related to dominance.

Sexual Mimicry and Reduced Testosterone

So, what happens when you instead reduce a man’s testosterone levels?

It seems like pretty much the opposite of an increase in testosterone: rincreased “prosocial behavior” (i.e. less honesty = more lying). Men who lower their testosterone levels also are more prosocial and generally care more about what the social situation thinks of them.

Sexual Mimicry is an extreme when the lowering of testosterone in a man pivots his behaviour into a more female-like behaviour.

Current Events and Testosterone

Unfortunately we’ve had a lot of examples of young men who, voluntarily, have been reducing their testosterone levels in some kind of “transfer”. In addition, we’ve seen a steady decrease in testosterone on a societal- or global scale. The end result of this reduction will be felt as men world-wide are less and less staying true to themselves and, instead, conform to social pressure.

Currently, we’re seeing testosterone levels dropping all over the world, perhaps most significantly in the West, affecting sperm count- and quality. This is a serious problem that needs to be addressed, as more and more young men exhibits lower testosterone levels, we have fewer men who’re able to stand up and say no to crazy. Whatever one might think of the men who stand up, they’re incredibly important to the well-being of a society.


What do you think about the role of testosterone: Does it really make men more brutally honest; and are women, in general, more prone to white lies?

Read less

2024-07-13 11:02 | 0 comments