Developer Documentation

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 :


WordPress Page :


WordPress Blog Post : 


WordPress Attachment :


Share This