How to fetch post id outside the wordpress loop ?

How to fetch post id outside the wordpress loop ?

If you have struggled to find the answer to this question , there is a quick and a simple fix. Call $wp_query first and then fetch the post id. global $wp_query; $postid = $wp_query->post->ID;

0
How to force a user to complete his profile after he registers on wordpress ?

How to force a user to complete his profile after he registers on wordpress ?

If you have user registration enabled on your WordPress and you would like users to force complete their profile – use the following steps to do so. Step 1 – Insert an action on the user register hook to redirect users on registration //run this when a new user registers add_action(‘user_register’,'continue_to_registration’); //redirects user to registration … Continue Reading

0
How to display a post using a custom field and a term id ?

How to display a post using a custom field and a term id ?

Say you have a list of posts in a category of a taxonomy. You are also using custom fields in this posts. You had like to display all the terms with the custom field “soda” and that fall under the term_id = 120.

0
How to quickly add hidden content in your post without a plugin ?

How to quickly add hidden content in your post without a plugin ?

Ever wanted to quickly add some hidden content in your post but not wanted to install a plugin ? There are various ways of achieving this. The quickest way to do is using the Wordpress short code api to write a quick function

0
How to add a CSS class to a WordPress Metabox ?

How to add a CSS class to a WordPress Metabox ?

After creating a metabox it may be necessary to style the output or just apply a class to the metabox.
You can either style the output or use the following filter.

0
How to check your wordpress version on dedicated host using command line ?

How to check your wordpress version on dedicated host using command line ?

Here is a quick and a simple trick to quickly check your wordpress version on a dedicated host. grep wp_version wp-includes/version.php

0
How to fetch post id outside the wordpress loop ?

How to fetch post id outside the wordpress loop ?

0

If you have struggled to find the answer to this question , there is a quick and a simple fix. Call $wp_query first and then fetch the post id. global $wp_query; $postid = $wp_query->post->ID;

How to force a user to complete his profile after he registers on wordpress ?

How to force a user to complete his profile after he registers on wordpress ?

0

If you have user registration enabled on your WordPress and you would like users to force complete their profile – use the following steps to do so. Step 1 – Insert an action on the user register hook to redirect users on registration //run this when a new user registers add_action(‘user_register’,'continue_to_registration’); //redirects user to registration … Continue Reading

How to display a post using a custom field and a term id ?

How to display a post using a custom field and a term id ?

0

Say you have a list of posts in a category of a taxonomy. You are also using custom fields in this posts. You had like to display all the terms with the custom field “soda” and that fall under the term_id = 120.

How to quickly add hidden content in your post without a plugin ?

How to quickly add hidden content in your post without a plugin ?

0

Ever wanted to quickly add some hidden content in your post but not wanted to install a plugin ? There are various ways of achieving this. The quickest way to do is using the Wordpress short code api to write a quick function

How to add a CSS class to a WordPress Metabox ?

How to add a CSS class to a WordPress Metabox ?

0

After creating a metabox it may be necessary to style the output or just apply a class to the metabox.
You can either style the output or use the following filter.

How to check your wordpress version on dedicated host using command line ?

How to check your wordpress version on dedicated host using command line ?

0

Here is a quick and a simple trick to quickly check your wordpress version on a dedicated host. grep wp_version wp-includes/version.php