Note: It is important to note that the ‘Announcement Icon’ can not be enabled on any post types other than the default announcements bundled with Timeline Express.

Out of the box, the color picker for the ‘Announcement Color’ options is only available to the Announcement posts inside of Timeline Express. This is helpful when you are displaying the announcements in a timeline, but when you display posts, pages or any other custom post type in the timeline you won’t have the ability to alter the color of the circle.

Users can quickly enable the color picker on other post types by adding the following code snippet to your themes functions.php file.

// Enable color picker on blog posts
function enable_color_picker_on_custon_post_types( $post_types_array ) {
      $post_types_array[] = 'post';
      return $post_types_array;
}
add_filter( 'timeline_express_post_type_enable_color_picker', 'enable_color_picker_on_custon_post_types' );

If you wanted to enable it on posts, pages and possible Easy Digital Download downloads – you would add those post types to the `$post_types_array` like so:

// Enable color picker on blog posts
function enable_color_picker_on_custon_post_types( $post_types_array ) {
      $post_types_array[] = 'post';
      $post_types_array[] = 'page';
      $post_types_array[] = 'download';
      return $post_types_array;
}
add_filter( 'timeline_express_post_type_enable_color_picker', 'enable_color_picker_on_custon_post_types' );

Once enabled, you should see the color picker display down below the content editor (depending on which post type you enabled it on).

Example:

Timeline Express - Post Type Add-On Color Picker enabled on the 'post' post type

Timeline Express – Post Type Add-On Color Picker enabled on the ‘post’ post type

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.