Custom Post Type has wrong label and is not found when called by a loop

The issue with the labels in problem 1 is that you haven’t passed the labels to register_post_type(). You’ve defined the labels in the $labels variable, but this is what you passed to register_post_type(): $args = array( ‘labels’ => ‘Bateau’, // … ); register_post_type( ‘bateau’, $args ); You need to pass the $labels array: $args = … Read more

display custom plugin view on front end inside template body

In your plugin class (e.g. MyPlugin), add public static function, returning some content: public static function my_plugin_output() { // Build your content $output=”<div>”; $output .= ‘This is a text to display.’; $output .= ‘</div>’; return $output; } Once your plugin is activated, add this line to any template, you want the plugin content to appear: … Read more

How To Use htaccess to Rewrite Link Structure for a Page that is Generated Programatcially

You’re looking to remove a post-type slug completely from the url. This is documented in this answer. Remember that after making any changes to post urls, you should resave your permalink structure for the changes to fully take effect. Edit: You can additionally redirect from the old location (with the slug), this way: function na_redirect_slug_requests() … Read more

Changing Date Format on Custom Meta Data w/shortcode call

Try with change line to date(‘d-m-Y’,strtotime($current_user->delivery_date)) ; function delivery_date( $atts ) { global $current_user, $user_login; get_currentuserinfo(); add_filter(‘widget_text’, ‘do_shortcode’); if ($user_login) return date(‘d-m-Y’,strtotime($current_user->delivery_date)) ; } add_shortcode( ‘delivery_date’, ‘delivery_date’ ); echo do_shortcode(‘[delivery_date]’);