Blog

Tips, tricks, and other valuable WordPress and web technology knowledge to save you time and make you money!

Blog

Get Current Page Slug WordPress

A post’s or page’s slug can be retrieved by accessing the post object’s post_name property. There are several ways to get the current page’s or post’s slug in WordPress. The first method involves utilizing the global $post variable while the second method uses the get_post_field function. Option 1: Use Global Post Variable global $post; $post_slug=$post->post_name;…

Creating WordPress RSS Feeds for Custom Post Types

In addition to creating WordPress RSS feeds for categories and tags, RSS feeds for search results, RSS feeds for comments, and RSS feeds for authors, you can also create RSS feeds for custom post types. This is super simple. In order to do this, simply use the URL structure below: https://www.example.com/feed?post_type=custom_post_type You need to replace…

Creating WordPress RSS Feeds for Search Results

In order to create a WordPress RSS feed for search results, you need to simply use the URL format shown below: http://example.com/?s=searchterm&feed=rss2 This enables you to get all search results related to a certain search term. For example, some of our users may be particularly interested in a gutenberg related post but at the moment…

Create Automated Email Newsletters with MailChimp and WordPress’ RSS Feed

We wanted to create an automated email newsletter for our WPLauncher blog readers. We wanted this automated email newsletter to send emails to our subscribers on a weekly basis with all of the newly added post in a certain category. We put together this post to show you the 6 steps involved in the process…

Creating WordPress RSS Feeds for Comments

To find or create a WordPress RSS feed of all of a site’s comments or all of a post’s comments, you simply have to use RSS Feed URL structure shown below: All Site Comments: http://example.com/comments/feed/ But, if you only want comments associated with a certain WordPress post, you would use the URL structure below. All…

Creating WordPress RSS Feeds for Authors

To create a WordPress RSS feed of all posts associated with an author, you simply have to use RSS Feed URL format below: http://example.com/author/authorname/feed/ So, if I only want to show posts by Walt Whitman, I would use the RSS feed URL shown below: http://example.com/author/walt-whitman/feed/ What can I do with WordPress RSS Feeds of authors?…

Creating WordPress RSS Feeds for Categories and Tags

You can find or create a WordPress website’s RSS feed to do a number of things, including sending out automated email newsletters. Below, we show you how to find or create WordPress RSS feed URLs based on the category of posts on your website or the tags of posts on your website. However, you can…

Capitalize First Letter in a String with JavaScript

In creating a function for a client, I ran into an issue where I wanted to capitalize the first letter in a string with JavaScript, or in other words, uppercase the first letter in a string with JavaScript. The solution is quite simple, all you need to do is use the following function: function capitalize(word){…

Error Establishing a Database Connection

I ran into this error while working on a client site the other day. The steps that I took to solve the issue included the following: Step 1: Check if you can connect to the database in another way Sometimes you may be able to connect to the database via the command line using the…

Want to use our API?

Sign up below and we'll let you know when it's available for you to start your own WordPress hosting company.