custom post type tags

I use this function to display comma separated terms from a custom taxonomy: // Get Comma Seperated List of Custom Taxonomy // function the_custom_taxonomies($taxonomy) { global $post; $terms = get_the_terms($post->ID, $taxonomy); $counter = 0; if (!empty($terms)) { foreach ($terms as $term) { echo $term->name; if (++$counter < count($terms)) echo “, “; } } }

Custom meta box includes

Debugging in WordPress The following could/should be set in the wp-config.php file of your local(!!) installation – never do this on a live site, especially not when you got caching activated! define( ‘WP_CACHE’, false ); // Show the development files for scripts/stylesheets and don’t combine them define( ‘COMPRESS_CSS’, false ); define( ‘SCRIPT_DEBUG’, true ); define( … Read more

create gallery page for specific post id

If you want to get all images attached to a single post then you can use this if ( $images = get_posts(array( ‘post_parent’ => $post->ID, ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ‘post_mime_type’ => ‘image’,))) { foreach( $images as $image ) { $attachmenturl=wp_get_attachment_url($image->ID); $attachmentimage=wp_get_attachment_image_src( $image->ID, full ); $imageDescription = apply_filters( ‘the_description’ , $image->post_content ); $imageTitle = … Read more