- This topic has 2 replies, 2 voices, and was last updated 7 years, 6 months ago by
Kevin.
-
AuthorPosts
-
-
August 12, 2014 at 1:59 pm #2210
tuckerjoenzMemberI have a client that is using Yoast and asked my about a custom post type that I created. He said
“I installed Yoast and it has these optimization suggestions that work on post body. Stories isn’t using that, though, I don’t think. Can it be changed to use the default editor and field for post body?”
Is there something I need to do different for this CPT or will this work?
stories.php
<?php /* Title: Stories of Impact Post Type: stories Order: 14 Meta Box: false Collapse: false */ ?> <?php piklist('field', array( 'type' => 'file' ,'field' => 'story_media' ,'scope' => 'post_meta' ,'label' => __('Media Uploader','story-media') ,'description' => __('Validation rule set: Upload no more than two files.','story-media') ,'options' => array( 'modal_title' => __('Add File(s)','story-media') ,'button' => __('Add','story-media') ) )); piklist('field', array( 'type' => 'editor' ,'field' => 'story_content' ,'label' => 'Add Story' ,'description' => 'Stories of Impact' ,'options' => array ( 'media_buttons' => true ,'teeny' => true ,'textarea_rows' => 5 ,'drag_drop_upload' => true ) )); piklist('field', array( 'type' => 'datepicker' ,'field' => 'story_date' ,'label' => 'Story Date' ,'description' => 'Click in box' ,'attributes' => array( 'class' => 'text' ) ,'options' => array( 'dateFormat' => 'M d, yy' ,'firstDay' => '0' ) )); -
August 12, 2014 at 2:30 pm #2211
tuckerjoenzMemberUPDATE: For stories (and all probably): when we try to override the publish date in quick edit, it erases Yoast SEO information (title, meta description)
-
August 12, 2014 at 2:32 pm #2212
KevinKeymasterOf course 🙂 You will have to move your content from the post meta field to the post_content for anything already created, however for the field you just need to specify the scope and change the field name like so…
piklist('field', array( 'type' => 'editor' ,'scope' => 'post' ,'field' => 'post_content' ,'label' => 'Add Story' ,'description' => 'Stories of Impact' ,'options' => array ( 'media_buttons' => true ,'teeny' => true ,'textarea_rows' => 5 ,'drag_drop_upload' => true ) ));
-
-
AuthorPosts
- The topic ‘Using Yoast with Piklist’ is closed to new replies.