How do I get content of custom post type through post ID in wordpress

Have a look at the Post & Page Parameters Section in the WP_Query Documentation For getting a Post by Post ID, you need to use this: $my_query = new WP_Query(‘post_type=movie_reviews&p=244’); If you only need the content of one specific post, you can also do this: $mypost = get_post(244); echo apply_filters(‘the_content’,$mypost->post_content); In this case, you don’t … Read more

How to merge local and live databases?

If you just merge the local DB into the production DB it actually means that your local install is a production as well. The problem is not with the ability to perform merge, the problem is that you don’t have a separation between production staging and dev servers. DB on dev installs are likely to … Read more

User Defined order on get_categories?

I think the most sane way and easiest way of doing this is to unset the first value in the returned array, and then adding it back at the end of the returned array before your foreach loop For this to work, you will need to sort your categories by ID as you need to … Read more

Adding Field to Profile “Name”

check out my older article HOW TO ADD WORDPRESS AUTHOR BIO & PROFILE PAGE https://phirebase.com/blog/how-to-add-author-bio-profile-page/ just short example to add Twitter and Facebook fields: function my_new_contactmethods( $contactmethods ) { // Add Twitter $contactmethods[‘twitter’] = ‘Twitter’; //Add Facebook $contactmethods[‘facebook’] = ‘Facebook’; return $contactmethods; } add_filter(‘user_contactmethods’,’my_new_contactmethods’,10,1); Single loop <?php the_author_meta(‘facebook’); ?> – show facebook name <?php the_author_meta(‘twitter’); … Read more