Display posts order by custom post in a dropdown menu

Now I can order de post_types. Any help for the multiple save? // The Callback function show_custom_meta_box_related() { global $custom_meta_fields_related, $post; // Use nonce for verification echo ”; // Begin the field table and loop echo ‘<table class=”form-table”>’; foreach ($custom_meta_fields_related as $field_related) { // get value of this field if it exists for this post … 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

Synch Custom Post Types (and Custom Fields, Cats, etc.) Between WordPress Sites

You’ve created a structure that is going to be difficult to manage. Independent WordPress sites do not communicate by default, or readily, or easily. My suggestion would be to roll both sites into one with the course catalog being a custom post type with rigid controls over who can view the content. If that is … Read more

Repeatable custom meta select boxes

To make this work… $meta == $item->ID ? ‘ selected=”selected”‘ : ”; … with an array like a:1:{i:0;s:3:”179″;} which unserializes to… Array ( [0] => 179 ) … you’d need to do this: $meta = unserialize($meta); $meta[0] == $item->ID ? ‘ selected=”selected”‘ : ”; But that line shows up inside a foreach like foreach($meta as … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)