3

There is a built in WordPress function for this, remove_post_type_support http://codex.wordpress.org/Function_Reference/remove_post_type_support . In your case you could use something like add_action( 'init', 'my_custom_init' ); function my_custom_init() { remove_post_type_support( 'custom_post_type_name', 'editor' ); }


2

I've found that for things like this, get_posts is easier. <?php // Set up your arguments array to include your post type, // order, posts per page, etc. $args = array( 'post_type' => 'testimonial', 'posts_per_page' => 3, 'orderby' => 'date', 'order' => 'DESC' ); // Get the posts $...


2

The Types plugin is making this about 10x harder than it needs to be, you'll have to look through their documentation on the issue, but from what I can tell they don't store items in the postmeta table in a straightforward way. I created a simple field with the plugin in a sandbox env and the meta_key for a field I named data was wpcf-data. You may want to ...


2

You got it pretty close. Here's a working example of what you're trying to do: class Wpse_126374 { public function __construct() { add_action( 'init', array( $this, 'rewrites' ) ); add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) ); } public function rewrites() { add_rewrite_tag( '%parent_id%', '(\d+)' ); ...


1

When defining your MetaBox before registering it, just set the PostTypes it is applicable for: $f711_meta_boxes[] = array( 'id' => 'details', 'title' => __( 'Details', 'f711_theme' ), 'pages' => array( 'publicity' ), // change this values 'context' => 'normal', 'priority' => 'high', 'fields' => array( array(...


1

if ( 'your_cpt' == get_post_type()) { ... } or if (is_singular( array('your_cpt'))) { ... } is_singular() is only true when on a single post page. If you're on an archive page, you need is_post_type_archive('your_cpt') { ... } Here's a list of useful WP Conditional tags.


1

You have a syntax error in your query. According to the documentation for WP_Query, tax_query is an array of arrays of parameters, which is to say that it should probably look like this: 'tax_query' => array( array( 'taxonomy' => 'semester', 'field' => 'slug', 'terms' => $getterm, '...


1

Yes, you can easily do it at the time of creating custom post type by using the register_post_type( $post_type, $args ) function. Don't use the 'editor' in supports parameter. register_post_type('posttype name',$args); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, '...


1

I will never understand the point of these wildly complicated "helper" wrapper/plugins... but that aside... The plugin provides a lot of filters that might help you out. I think that the types_view filter might be what you want. Something like this is a plugin file or your theme functions.php might do it: add_filter('types_view','do_shortcode'); I do not ...


1

Easier than that! Just do: echo types_render_field("description"); Where the "description" is the name of the custom field. This will print the value of "description" of your post / post type. Here is this documentation of Wordpress Types plugin: http://wp-types.com/documentation/user-guides/displaying-wordpress-custom-fields/#1 This only works for "...


1

I would try: echo get_post_meta( $the_query->post->ID, 'authorinfo', true); although I do agree with Mridul Aggarwal that <?php echo get_post_meta(get_the_ID(), 'authorinfo', true); ?> should also work.


1

Read "Multiple Loops in Action at codex page" i think you´ll have your answer there...at least i had mine : http://codex.wordpress.org/The_Loop I did use one "featured" category. And the query was made by "Multiple loops in Action". First loop with just one post with the featured category to put the bootstrap carousel class active. Then the other loop put ...


1

Change, <?php $email ?> to... <?php echo $email; ?> as you need to echo the result of what's held within $email as the function types_render_field would be using return within the function (if you dig into its core) to return the data instead of directly printing it to screen. <?php $email = types_render_field ("email"); if ( $...


Only top voted, non community-wiki answers of a minimum length are eligible