You may notice that when using the Brooklyn theme that additional text is added onto your timeline excerpts. You may notice that the Title, Author and Date of the announcement are appended on to the content.

Example:
Additional content appended onto Timeline Express announcements by the Brooklyn Theme.

This content is generated by the theme itself, using a WordPress filter, so removing it can be a bit tricky.

Thanks to one of our generous users (gcmedia), who reported the issue to us on the WordPress.org support forums, we were able to track down the issue and provide a code snippet that removed the filter from all Timeline Express announcements.

Solution

For this fix, you’ll need to add a small code snippet into your theme’s functions.php file. Since you are using Brooklyn theme, you can either create a child theme to make the modifications in, or for a more simple approach you can install a third party plugin which allows you to add code snippets from the WordPress dashboard.

The plugin that we recommend to add code snippets to your theme is My Custom Functions, which can be downloaded for free from the WordPress.org repository.

Once you download and install the plugin, you’ll want to go into ‘Appearance > Custom Functions‘ and add the following code snippet into the box:

/**
 * Remove the excess data generated by the Brooklyn theme on Timeline containers
 *
 * @author CodeParrots
 */
function remove_hatom_data_on_timeline() {

   remove_filter( 'the_content', 'add_brooklyn_hatom_data' );

}
add_action( 'timeline-express-styles', 'remove_hatom_data_on_timeline' );

Example:
Brooklyn Theme: Timeline Express Excerpt Code Snippet

When you have added the function above, you can click ‘Save Changes’. Once saved, you should be good to go and the additional text should no longer be displaying on the Timeline.

Stuck or Confused?

If for some reason you run into issues, don’t understand what is outlined above or need some additional help – feel free to reach out to us, or leave a comment below, and we’ll do our best to get things resolved for you.

Leave a Reply

Your email address will not be published. Required fields are marked *

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