Meta box not appearing in my custom post type

The last two parameters in add_meta_box() are switched. Look at the code in the tutorial next to yours: // tutorial code add_meta_box(‘wpt_events_location’, ‘Event Location’, ‘wpt_events_location’, ‘events’, ‘side’, ‘default’); // your code add_meta_box( ‘linkToArcticle’, ‘Link to arcticle’, ‘linkToArcticle’, ‘arcticles’, ‘default’, ‘normal’ ); Change it to: add_meta_box( ‘linkToArcticle’, ‘Link to arcticle’, ‘linkToArcticle’, ‘arcticles’, ‘normal’, ‘default’ ); And … Read more

Sorting by meta_key different to search criteria?

The value for the value key in the meta query is probably the cause of the problem. ‘value’ => get_post_meta( get_the_ID(), ‘cancelled’, true ) The get_post_meta call actually retrieves the value of the meta key “cancelled” for the current post. So, in your current WP_Query, you’re retrieving all posts with a paypal_recur_profile_status equal to the … Read more

Custom Sidebar in Editor (not Widget) for Custom Post Type in Genesis

For anyone with the same problem, here’s the answer. I finally figured it out. // Display Profile Sidebar ACF add_action(‘genesis_sidebar’, ’employee_title’); function profile_photo() { if ( is_singular(‘profile’) && genesis_get_custom_field(’employee_title’) ) echo ‘<div id=”employee-title”> ‘. genesis_get_custom_field(’employee_title’) .'</div>’; } This is the the hook location in Genesis where the custom field data needs to output to: genesis_sidebar. … Read more

creating files for displaying different custom post type posts with paging

You don’t have to create any dummy page for custom post types, as those archive pages are just an automated process and named using the post type object name. To make sure your Custom Registered Post Type uses/support archive page, set the parameter ‘has_archive’ => ‘documents’ for Document & ‘has_archive’ => ‘videos’ for Video. register_post_type( … Read more