Cosmos Plugin provides hooks and specific markup that can be overwritten and used to style content block output

  • Filters
  • Markup – HTML Classes

Content Rendering Filters :

Shortcode Filters :

Attachments :

apply_filters(‘cosmos_image_shortcode_before’, null);

apply_filters(‘cosmos_image_shortcode_after’, null);

Posts and Pages :

apply_filters(‘cosmos_post_shortcode_before’, null);

apply_filters(‘cosmos_post_shortcode_before_title’, null);

apply_filters(‘cosmos_post_shortcode_after_title’, null);

apply_filters(‘cosmos_post_read_more_link_class’, null)

apply_filters(‘cosmos_post_read_more_text’, null)

apply_filters(‘cosmos_post_shortcode_after’, null)

Class generation for CSS Styling :

Cosmos content block CSS class naming convention uses a combination of dpg_content as prefix, followed by the type of content.

All content blocks have class names that have dpg_content prepended to them – after this, the type of content will determine the class name as a whole :

WooCommerce Product :

dpg_content–product

WordPress Page :

dpg_content–page

WordPress Blog Post : 

dpg_content–post

WordPress Attachment :

dpg_content–attachment