captaincainer
Forum Replies Created
-
That’s great, thank you Alessandro.
Both Types,
I have a country dropdown that needs to be populated by a “country” post_type and a “specialisation” dropdown that needs to be populated from a meta_value.
I’m currently using jQuery but would be happier if there was a built in filter, function or hook.
This is my current jquery and php for the country dropdown.
<?php // query for your post type $post_type_query = new WP_Query( array ( 'post_type' => 'country', 'posts_per_page' => -1 , 'orderby' => 'title', 'order' => 'ASC', ) ); // we need the array of posts $posts_array = $post_type_query->posts; // create a list with needed information // the key equals the ID, the value is the post_title $post_title_array = wp_list_pluck( $posts_array, 'post_title', 'post_name' ); //echo '<pre>' . var_export(json_encode($post_title_array), true) . '</pre>'; ?> <script> (function($) { var selectValues = <?php echo json_encode($post_title_array); ?>; var selectMenu = $('#country-select'); $.each(selectValues, function(key, value) { selectMenu .append($('<option>', { value : key }) .text(value)); }); })(jQuery); </script>Forum: Plugins
In reply to: [Meta Box] displaying SHORTCODEI fixed this by using do_shortcode…
<?php $tablecell19 = rwmb_meta( 'tb_comparisontable19_cell', 'type=text' ); foreach ( $tablecell19 as $cell ){ ?> <td> <?php echo do_shortcode( $cell ); ?> </td> <?php } ?>Forum: Plugins
In reply to: [Meta Box] displaying SHORTCODEI’ve tried adding “‘raw’ => true” to the metabox type=text and it still fails.
Forum: Plugins
In reply to: [Meta Box] Can't display meta box on cptThanks for the reply, I figured this one out already. Thanks again for taking the time on this one. 🙂
Forum: Plugins
In reply to: [Genesis Responsive Slider] Preserve HTML in the_contentEmbarrasingly the post only had a single paragraph tag, so that was all it was showing…
I added some more styles and BOOM! Works like a charm.
If you’d like to remove the outer 10px grey border add this to your CSS.
#genesis-responsive-slider { border: none !important; padding: 0px !important; }To delete the border add this to your CSS.
.slide-excerpt-border { border: none !important; }Forum: Fixing WordPress
In reply to: Blog token not found. – comment form errorThanks,
It worked a treat.
Forum: Fixing WordPress
In reply to: twenty ten, add pages to rss feedThanks but I tried the plug-in’s but couldn’t get any to work!