Forum Replies Created
-
AuthorPosts
-
October 23, 2019 at 11:22 am in reply to: WARNING | Function name xxx is discouraged (double underscore) #494214
seezee
MemberThanks!
seezee
MemberI managed to get this working with a combination of the Display Posts Shortcodes plugin by Bill Erickson & this snippet in my custom plugin (you could put this in your functions.php instead, but I prefer to write my own plugin & leave the theme files alone).
The snippet adds the Genesis column classes, so no need to modify any CSS.
September 24, 2014 at 9:53 am in reply to: Add featured image support to custom post type in Executive Pro #125547seezee
MemberWeird discovery — if I log out as Network Admin and log back in as a regular Admin, the featured image meta is available.
August 30, 2014 at 8:35 am in reply to: Add featured image support to custom post type in Executive Pro #121864seezee
MemberHave you tried putting the code to register the post type in functions.php, just to test out if the code works as expected there? Maybe there’s something off about how your plugin is trying to set things up?
Not yet. I'll give it a go & report back the results.
August 29, 2014 at 4:27 pm in reply to: Add featured image support to custom post type in Executive Pro #121753seezee
MemberAnyone ever figure this out?
August 11, 2014 at 9:14 am in reply to: Add featured image support to custom post type in Executive Pro #118193seezee
MemberHere's the relevant portion of the code (the plugin has other stuff related to the site that I'm omitting here):
// Register Custom Post Type function cm_product_post_type() { $labels = array( 'name' => _x( 'Products', 'Post Type General Name', 'text_domain' ), 'singular_name' => _x( 'Product', 'Post Type Singular Name', 'text_domain' ), 'menu_name' => __( 'Product', 'text_domain' ), 'parent_item_colon' => __( 'Parent Product:', 'text_domain' ), 'all_items' => __( 'All Products', 'text_domain' ), 'view_item' => __( 'View Product', 'text_domain' ), 'add_new_item' => __( 'Add New Product', 'text_domain' ), 'add_new' => __( 'New Product', 'text_domain' ), 'edit_item' => __( 'Edit Product', 'text_domain' ), 'update_item' => __( 'Update Product', 'text_domain' ), 'search_items' => __( 'Search products', 'text_domain' ), 'not_found' => __( 'No products found', 'text_domain' ), 'not_found_in_trash' => __( 'No products found in Trash', 'text_domain' ), ); $args = array( 'label' => __( 'product', 'text_domain' ), 'description' => __( 'Product information pages', 'text_domain' ), 'labels' => $labels, 'rewrite' => array('slug' => 'products'), 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'custom-fields', 'revisions', 'genesis-cpt-archives-settings' ), 'taxonomies' => array( 'category', 'post_tag' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_icon' => '', 'menu_position' => 5, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', ); register_post_type( 'cm_product', $args ); } // Hook into the 'init' action add_action( 'init', 'cm_product_post_type', 0 ); // Customize the Admin Menu (add icons for product post type menu) function add_menu_icons_styles(){ ?> <style> #adminmenu .menu-icon-cm_product div.wp-menu-image:before { content: "\f312"; } </style> <?php } add_action( 'admin_head', 'add_menu_icons_styles' ); /** * * Add featured image thumbnail to posts and pages * */ // Add new image size add_image_size( 'singular', 680, 510, TRUE ); add_action ( 'genesis_entry_header', 'cm_featured_image_title_singular' ); function cm_featured_image_title_singular() { if ( !is_singular() || !has_post_thumbnail() ) return; echo '<div class="singular-thumbnail">'; genesis_image( array( 'size' => 'singular' ) ); echo '</div>'; }
True that the auto-update wouldn't overwrite changes, but I'm going to be doing several sites for the client all based on Ex. Pro, so each needs its own child theme.
-
AuthorPosts