How to stop wordpress from mangling HTML in a metabox textarea

I’v re-worked your code. I’ll try to explain some of the changes after the code block add_action(“admin_menu”, “tf_book_deets_create”); function tf_book_deets_create(){ add_meta_box(‘tf_book_details’, ‘Book Details’, ‘tf_book_details’, ‘books’); } function tf_book_details () { global $post; $tf_book_media = get_post_meta($post->ID, “tf_book_media”, true); $tf_book_review = get_post_meta($post->ID, “tf_book_review”, true); ?> <div class=”admin_meta”> <ul> <li><label>Reviews:</label><textarea rows=”5″ cols=”70″ name=”tf_book_review”><?php echo esc_textarea($tf_book_review); ?></textarea></li> <li><label>Media:</label><textarea rows=”5″ … Read more

remove custom taxonomy metabox form custom post type

Change your taxonomy registration parameter show_ui to false… register_taxonomy(‘package_hotel’,’package’,array( ‘hierarchical’ => false, ‘labels’ => $Package_labels, ‘show_ui’ => false, ‘update_count_callback’ => ‘_update_post_term_count’, ‘query_var’ => true, ‘show_in_nav_menus’ => false, ‘rewrite’ => array( ‘slug’ => ‘hotels’ ), ));

Create separate template for shared custom taxonomy with shared terms

See, It’s quite difficult to have path like site/books/product_category/horror/ site/movies/product_category/horror/ As wordpress functionality will conflict between custom_post_type & their taxonomy if try to keep url like you mentioned. I suggest you consider the I mentioned below as a solution of your problem. site/product_category/horror/?post_type=books site/product_category/horror/?post_type=movies Now to keep template as per shared terms, Create two templates … Read more

How to get only one category of custom post type?

Never use query_posts! Use get_posts() or new WP_Query() instead. I think this will work however: $today = date(“Y/m/j”); $args = (array( ‘post_type’ => ‘event’, ‘posts_per_page’ => 10, ‘orderby’ => array( ‘wpse_meta_query_name’ => ‘ASC’, ‘post_title’ => ‘DESC’ // optional second orderby paramater ), ‘meta_query’ => array( ‘wpse_meta_query_name’ => array( // give the meta query arguments a … Read more

Multiple Archive Pages for Custom Post Types AND Taxonomies

You can create the taxonomy-{$custom_taxonomy}.php that will handle all request for you custom taxonomy, and rely on query string to show events based on month. The url can change based on your setting, but should be something like this: http://yourdomain.com/custom-taxonomy/term-a/?month=2013-07 Hooking into pre_get_posts action (search codex) you can modify the query for that taxonomy and … Read more

slick slider as custom post type

First of all you’ve written array(jquery) instead of array(‘jquery’). And also has not defined the slickinit enqueue position. So the right code will be- //Enqueue scripts add_action(‘wp_enqueue_scripts’, ‘wp_enqueue_all_scripts’, 999); function wp_enqueue_all_scripts(){ //add slick slider wp_register_style(‘slickcss’, get_template_directory_uri() . ‘/slick/slick.css’ ); wp_register_style(‘slickcsstheme’, get_template_directory_uri() . ‘/slick/slick-theme.css’ ); //load slick js wp_register_script(‘slickslider’, get_template_directory_uri() . ‘/slick/slick.min.js’, array(‘jquery’), ”, true ); … Read more