Multiple Block Quotes without using HTML

you can create shortcode for that 1.make a shortcode unsing add_shortcode(functions.php) add_shortcode(‘bquote’,’ravs_blockquotes_func’) function ravs_blockquotes_func( $atts, $content=”” ) { extract( shortcode_atts( array( ‘style’ => ‘style1’ ), $atts ) ); return ‘<blockquote class=”‘.$style.'”>’.$content.'</blockquote>’ } 2.now just simply define quote in shortcode(post or page editer) [bquote style=”style2″]your quote[/bquote] it’s output in html like <blockquote class=”style2″>your quote</blockquote> 3.create as … Read more

Display custom posts in checkbox list

{// post_list case ‘post_list_produktkrav’: $items = get_posts( array ( ‘post_type’ => $field[‘post_type’], ‘posts_per_page’ => -1 )); foreach($items as $item) { echo ‘<input type=”checkbox” value=”‘.$item->ID.'” name=”‘.$field_related[‘id’].'[]” id=”‘.$item->ID.'”‘,$meta_related && in_array($item->ID, $meta_related) ? ‘ checked=”checked”‘ : ”,’ /> <label for=”‘.$item->ID.'”>’.$item->post_title.'</label><br />’; } // end foreach break;}

Create shortcode for list of custom post titles with custom fields alongside

Try the following code: (I’ve not tested it, so there might be few things here and there, but you can get the overall idea): add_shortcode(‘boats’, ‘shortcode_boats’); function shortcode_boats($atts){ //merge the passed attributes with defaults extract( shortcode_atts( array( ‘post_type’ => ‘yacht-for-sale’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => 15, ‘caller_get_posts’ => 1 //i am not sure what you … Read more

install.php Custom Taxonomy Term not being added to custom post

I believe I found the solution here: http://codex.wordpress.org/Function_Reference/wp_set_object_terms wp_set_object_terms( $post_id, $terms, $taxonomy, $append ); wp_set_object_terms( 4, $cat_id, ‘example_product_cat’); This is still placed inside of the install.php file. If there is a better solution, please add! Thanks. Roc.

Checking 2 dates against todays date

For date manipulations you should use the DateTime class. Also, dates should be stored in Y-m-d format (if you’re storing them differently you can create the DateTime object from a specified format: http://php.net/manual/en/function.date-create-from-format.php (php 5.3+) – but I recommend storing it in the unambiguous Y-m-d format ). The following assumes Y-m-d formatin the post meta: … Read more