WordPress Themes, Plugins, Tutorials, Tips And More...

Tag: Post

How To Find A WordPress Post, Category And User ID

Admin

While working on WordPress, you may come across conditions where you feel like the need arise on getting to know you WordPress post, category and user ID. Although the task of finding the ID is quite a simple one but sometimes it may even confuse an advanced WordPress user also. In this article we will show you how to find different IDs which come beneath under WordPress.

Finding Page/Post ID

Once you logged into your WordPress dashboard, Go to Manage > Pages and from the Pages list, hover over to one of the Page title of which you want to find the ID of. You will notice the URL in the following way:

http://www.example.com/wp-admin/page.php?action=edit&post=60

The number with which the URL ends is the Page ID (60 in this case).

Finding Category ID

Go to Posts > Categories and click on the category name. The category will get open in an editor and you will then be able to see the category ID by looking onto your browser’s address bar. You will notice the URL in the following way:

http://example.com/wp-admin/edit-tags?action=edit&taxonomy=category&post_type=post&tag_ID=4&post_type=post

The number with which the tag ID represents is the Category ID (4 in this case).

Finding User ID

Go to Users >All users and click on the user name. User’s profile will get open and you can then get the user ID from browser’s address bar. You will notice the URL in the following way:

http://example.com/wp-admin/user-edit.php?user_id=20

The number with which the user ID represents is the User ID (20 in this case).

Photo Credit: Flickr/Konrad Twardowski

Note: Like the post, then make sure you do follow and like us on both Twitter and Facebook.

Writing Your First WordPress Post

Post-it

So you are starting with your WordPress writing realm i.e. writing your first post, but how you can achieve this? Is it really so tough or just simple like anything one can think of. Well, will say relax, calm down, and follow the steps below as I will promise to make the thing as easy as possible for you.

WordPress allows us to either write posts or pages. When you are writing a blog entry, it is termed as posts although posts appear in reverse chronological order – i.e. the one which recently written will comes first, while the one written earlier will comes last – on your blog’s homepage.

While you do have to remember that not to confuse with pages, as overall pages are very similar to posts as they too have titles and content with WordPress Theme templates files which in turn will maintain a consistent look throughout your site. Pages mainly include content like About Us page, Contact page etc.

How To Write A Post?

  • Log-in first to your WordPress Administration Panel – the Dashboard – will be www.example.cpm/wp-admin.
  • Once on dashboard, click the Posts tab followed by adding New Sub Tab.
  • Start by filling the blanks.
  • As per your requirement, select category, add tags, feature and in-content images.
  • Once done all, click Publish.

Understanding Screen Options

It’s often that you don’t want all the fields to display and at that time the screen options work for you as it allow you to choose which Post Fields are displayed or not displayed in the SubPanel. On clicking on the Screen Option tab, you will see a list of the columns with a check-box next to each column.

The Screen Options lets you to check the box for each Post Field which you want to be on display or unchecked the box which you don’t want to display. Once done, click the Screen Options tab again to close the Screen Options. The options then saved so that you can customize it on how your own editing screen will look.

Also make a note here that if you are using WordPress 3.1 or greater version, then some screen options on the Post Administration Panel comes hidden by default if in case they have not been saved earlier. The following fields come hidden by default – Excerpt, Post Author, Discussion, Custom Fields, Slug, Comments, Send Trackbacks and Revisions.

Understanding Post Fields

Title

The title describes what your post will be known by. You have the full freedom to use any of phrases, words or characters. But, also make sure you try to avoid using the same title more than once as using the same title will cause a mess. You can also use commas, quotes, hyphens, dashes, apostrophes and other typical symbols.

Post Editing Area

It is a blank box where you add your content, links, images links and any information you want to share via your site. You can use either the Text view or Visual view to compose your posts.

Preview button

The option lets you view the post before you officially publishing it.

Publish box

It’s a box which contains buttons including Published, Pending Review and Draft where Published means your post has been published on your blog, Pending Review means your post is in draft stage and is waiting for review by an editor before the publishing and Draft means the post not yet published and kept under Draft status.

Visibility

An important button which defines how your post will appears to the world. There are three options available – Public, which appears to whole world; Private, which lets only administrator or editor able to view and Password Protected, let’s see the post only to those who have password with them.

Suggested Readings:

Permalink

Permalink means “permanent links” and is define as a link – a post URL – which does not show up the post ID to all. You have got the full authority to change it totally as per your requirement, but it’s always advisable to use a user- and search engines- friendly permalink.

Suggested Reading: Choosing Your WordPress Permalink Structure

Save

The option will let you save your post either as a draft or pending review instead of publishing the very same time.

Publish

Opposite of Save option. Will publish your post the very same time you click on it although you are liable on making any edit you want after even the content being published.

Post Tags

This are termed as micro-categories and helps your site visitors to find the related content. Say, for example, your visitor wants to search for WordPress related content of your site, they can simply do this by typing the following: www.example.com/tag/wordpress in the URL and your site will in turn show all the results having WordPress as one of its tag.

Categories

Just like Tags, Categories go the same way. The categories are the topics with which one can classify the post belong to. Typically bloggers have 5 to 7 categories for their content. To add a new category, click the “+Add New Category” link while to manage categories, you can do this by going Administration Panels > Posts > Categories.

Excerpt

A teaser of whole of your post featured on your website’s homepage as well as on the category, achieves, tags post pages.

Send Trackbacks

A way – basically a one of valuable resource in point of SEO also – which will notify the site that you have linked to them.

Custom Fields

It allows you to add information to your site.

Discussion

This comes in two forms – Allow Comments on the post and Allow trackbacks and pingbacks on the post. In simple words, as the name suggest, it’s a way by which one can engage with other over the post.

Password Protect This Post

The option will let you visible the post only to those who have its password with them.

Post Author

These are post authors who have been offering their expertise in form of content to the site.

Photo Credit: Flickr/Katy Warner

Useful Snippets For Password Protected Posts

WordPress Mug

We earlier discussed the manual way by which one can use password protection for WordPress posts, but one can also do the same by using the snippets, the short codes. The following article we will discuss all those snippets which can help you in keeping your posts or pages password protected.

Protecting Custom Fields

Unless and until the correct password is entered, WordPress does not show or display a password-protected post’s Content or Excerpt. But, you do also notice that the post’s Custom Field(s) data is not protected and can still be shown.

In order to make it stopped from displaying, you need to wrap your single.php or page.php files get_post_meta calls with adding a conditional statement using: post_password_required. You can also use the post_password_required function within in an if statement to do other customization.

Customized The Protected Text

Using short codes will also give you freedom to change the default text in the password form. You can change the default text for the password-protected post Excerpt by inserting the password form into the post Excerpt by using the following code in your WordPress functions.php file.

The password form basically displays the default message: “This post is password protected. To view it please enter your password below:” Using the snippet will return the form with different text and different html structure. Here do make sure that you don’t use print or echo function at all while using the snippet.

Protected Excerpt Text

Using the following short code will change the password excerpt text. The default Excerpt of a password-protected post is: “There is no excerpt because this is a protected post.” While after using the code will replace that text with the one you wanted. You are also allowed to use HTML here.

Add The Password Form To The Excerpt

You can also print out the password form instead of the Excerpt message. Using the following snippet will let you make the password form to be the Excerpt for a password protected post.

Hiding Password Protected Posts

You do often want to have your password protected posts to show up on different places in your site. You can use the following snippet in your theme’s functions.php file to hide the password protected posts from these pages without affecting your set pagination structure.

Photo Credit: Flickr/Carlos Varela

Page 2 of 2

Powered by WordPress & Theme by Anders Norén