Community Forums › Forums › Archived Forums › General Discussion › Magazine-Pro Problem with Byline Edits
Tagged: byline, custom functions, edit byline, edit date, magazine, Magazine Pro, no date
- This topic has 4 replies, 1 voice, and was last updated 9 years, 1 month ago by eluviis.
-
AuthorPosts
-
October 14, 2015 at 8:32 pm #168185eluviisMember
Hi a while back someone here gave me this code snippet to edit my author byline in order to remove the date but leave the author. The problem is, I get a byline for posts, but I get absolutely no byline at all for my custom post types. I'm not sure how to make it appear on my custom post types.
Here's the snippet:
//* Custom - Customize the entry meta in the entry header - HTML5 add_filter( 'genesis_post_info', 'sp_post_info_filter' ); function sp_post_info_filter($post_info) { $post_info = 'by [post_author_posts_link] [post_edit]'; return $post_info; }
The custom post types are called "quickblog", "portfolio" and "specialty"
This is the site:
http://rallyways.comOctober 14, 2015 at 9:17 pm #168187eluviisMemberI think I might have found the problem, but I don't know how to fix it. I noticed that in my portfolio custom post type, the author byline does work. But my portfolio CPT was code I pulled from an old Minimum site I had and I pasted the code into the Magazine-Pro functions.php
This is the code:
/** Custom - Create portfolio custom post type */ add_action( 'init', 'minimum_portfolio_post_type' ); function minimum_portfolio_post_type() { register_post_type( 'portfolio', array( 'labels' => array( 'name' => __( 'Portfolio', 'minimum' ), 'singular_name' => __( 'Portfolio', 'minimum' ), ), 'exclude_from_search' => false, 'has_archive' => true, 'hierarchical' => true, 'menu_icon' => 'dashicons-admin-page', 'public' => true, 'rewrite' => array( 'slug' => 'portfolio' ), 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes', 'genesis-seo', 'genesis-cpt-archives-settings' ), ) ); }
Now, my other CPTs are made with a plugin. I have genesis-seo, genesis-cpt-archive-settings, and page-attributes activated. But... I don't know how to activate the author byline.
October 14, 2015 at 9:26 pm #168188eluviisMemberThis is the code the plugin is inserting. Now, why does the byline not show? And while I'm at it... Why don't do the post tags work with the custom post type? One of the bottom widgets doesn't work either.
// registration code for quickblog post type function register_quickblog_posttype() { $labels = array( 'name' => _x( 'Quickblog', 'post type general name' ), 'singular_name' => _x( 'Quickblog', 'post type singular name' ), 'add_new' => __( 'Add New' ), 'add_new_item' => __( 'Quickblog' ), 'edit_item' => __( 'Quickblog' ), 'new_item' => __( 'Quickblog' ), 'view_item' => __( 'Quickblog' ), 'search_items' => __( 'Quickblog' ), 'not_found' => __( 'Quickblog' ), 'not_found_in_trash'=> __( 'Quickblog' ), 'parent_item_colon' => __( '' ), 'menu_name' => __( 'Quickblog' ) ); $taxonomies = array('post_tag'); $supports = array('title','editor','author','thumbnail','excerpt','custom-fields','revisions','post-formats'); $post_type_args = array( 'labels' => $labels, 'singular_label' => __('Quickblog'), 'public' => true, 'show_ui' => true, 'publicly_queryable'=> true, 'query_var' => true, 'exclude_from_search'=> false, 'show_in_nav_menus' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'rewrite' => array('slug' => 'quickblog', 'with_front' => false ), 'supports' => $supports, 'menu_position' => 6, 'menu_icon' => 'http://rallyways.com/wp-content/uploads/extra_images/quickblog_icon.png', 'taxonomies' => $taxonomies ); register_post_type('quickblog',$post_type_args); } add_action('init', 'register_quickblog_posttype');
October 14, 2015 at 9:29 pm #168189eluviisMemberI wonder if I'm better off just copying that first portfolio code and changing the portfolio name for each of my other custom post types and turning off the plugin. I wonder if things won't break.
October 15, 2015 at 3:12 pm #168230eluviisMemberAnyone? :/
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.