
How to Get WordPress Post and Page IDs (Code Snippets)
The post ID in WordPress is a unique number assigned to every post, page, and custom post type. Whether you need it for a
Andy has been a full time WordPress developer for over 15 years. Through his years of experience has built 100s of sites and learned plenty of tricks along the way.
Found this article helpful? Buy Me A Coffee
102 posts published

The post ID in WordPress is a unique number assigned to every post, page, and custom post type. Whether you need it for a

Whether it’s for migrations or backup there are plenty of reasons to export WordPress menus. Additionally if you use a staging environment and want

WordPress is an incredible platform to build your site. But one added complication of a WordPress website is site speed. When done correctly you

If you have a WordPress site with a lot of users you will be extremely familiar with these new user registration emails. These emails

There are a massive amount of plugins that will add social share icons to your WordPress site. With popular plugins in the space like
Have you been enjoying the icons of Elementor but notice some of your favorite icons missing. By default, Elementor uses the Font Awesome icons

If you have put your WordPress site in the Facebook debugger you may have seen the following error: The error “The following required properties

WordPress’s flexibility is its biggest strength: drop the right 5 lines of PHP into the right place and you can change how the site

To get the featured image of a WordPress post with PHP, use one of three core functions depending on what you need: Below I’ll

If you keep logging into WordPress and keep seeing the “Admin Email Verification” screen you know it can get quite annoying. This message was

The fastest way to customize your WordPress login page is with a plugin like Login Customizer by Colorlib (drag-and-drop, no code). If you’d rather

WordPress user roles control what each user on your site is allowed to do. There are six default roles, Subscriber, Contributor, Author, Editor, Administrator,

The fastest way to add custom CSS to WordPress depends on which kind of theme you’re running. On a block theme (Twenty Twenty-Four, Twenty

Whether your theme shows the newest comments on top or the oldest, you may want to change the order of comments in WordPress. Seeing

If you’ve tested the speed of your site on a tool like Pingdom or GTmetrix you may have seen the message to remove query

The fastest way to get a WordPress user’s ID is to open their profile in the admin (Users → All Users → Edit) and

Plugins are a major part of using WordPress and can easily add new functionality to your WordPress blog. From security to additional features there

There are many reasons that you may want to clone a WordPress website. These can include testing new plugins, trying new themes, or moving

Want to check if a shortcode already exists in WordPress? Ever since the launch of WordPress 3.6 in 2013 you can easily check to

According to various studies to determine the best content management system (CMS), the research has shown that WordPress is among the top-rated and most

WordPress won’t let you change usernames in the admin panel. Here are 3 methods that work, from beginner-friendly to advanced.

The WordPress block editor (Gutenberg) loads a CSS file called block-library/style.min.css on every page of your site. If you use the classic editor or

Developing for WordPress and want to know how check if a user is logged in? Keep reading for useful user PHP code snippets. Sometimes

The fastest way to check your WordPress version is to log into your site’s admin dashboard. The version number appears in the “At a