Helper Functions

Volatyl has a number of built-in helper functions that are used in the organization of the framework’s core files. They’re also available for use in child themes. Use the following helper functions to write cleaner code in your child themes.

Volatyl Helper Functions

vol_is_full_width() – returns true if the “Wide (100%) HTML Structure” option is checked and false if it is not checked.

vol_get_layout() – returns the value of “Content and Sidebars” option. The possible values are:

  • c1 – Content (No Sidebars)
  • c2 – Content (Sidebars Below Content)
  • cs – Content / Sidebar
  • sc – Sidebar / Content
  • css – Content / Sidebar / Sidebar
  • scs – Sidebar / Content/ Sidebar
  • ssc – Sidebar / Sidebar / Content

vol_get_column_count() – returns the number (integer) of total columns in the layout – 1, 2, or 3.

vol_updates_on() – returns true if the “Enable Framework Updates” option is checked and false if it is not checked.

vol_is_responsive() – returns true if the “Enable Responsive CSS” option is checked and false if it is not checked.

vol_has_logo() – returns true if a site logo has been uploaded through the Volatyl options and false if no logo has been uploaded.

vol_get_logo() – returns the URL of the logo image if a site logo has been uploaded through the Volatyl options and false if no logo has been uploaded.

vol_site_title_on() – returns true if the “Display Header Elements – Site title” option is checked and false if it is not checked.

vol_site_tagline_on() – returns true if the “Display Header Elements – Site tagline” option is checked and false if it is not checked.

vol_header_menu_on() – returns true if the “Display Header Elements – Header menu” option is checked and false if it is not checked.

vol_standard_menu_on() – returns true if the “Activate Additional Menus – Standard menu” option is checked and false if it is not checked.

vol_footer_menu_on() – returns true if the “Activate Additional Menus – Footer menu” option is checked and false if it is not checked.

vol_default_widget_on() – returns true if the “Display Default Widgets” option is checked and false if it is not checked.

vol_pagination_on() – returns true if the “Activate Pagination” option is checked and false if it is not checked.

vol_byline_date_on() – returns true if the “Display Post Byline Elements – Date” option is checked and false if it is not checked.

vol_byline_author_on() – returns true if the “Display Post Byline Elements – Author” option is checked and false if it is not checked.

vol_byline_comments_on() – returns true if the “Display Post Byline Elements – Responses/Comments” option is checked and false if it is not checked.

vol_byline_edit_on() – returns true if the “Display Post Byline Elements – Edit Link” option is checked and false if it is not checked.

vol_byline_cats_on() – returns true if the “Display Post Byline Elements – Categories” option is checked and false if it is not checked.

vol_has_byline_items() – returns true if at least one of the “Display Post Byline Elements” options are checked and false if none are checked.

vol_excerpt_on() – returns true if the “Display Post Excerpts” option is checked and false if it is not checked.

vol_excerpt_link_on() – returns true if the “Display Post Excerpts – Link to full article in excerpts” option is checked and false if it is not checked.

vol_archive_featured_image_on() – returns true if the “Display Featured Images – Post Feeds” option is checked and false if it is not checked.

vol_single_featured_image_on() – returns true if the “Display Featured Images – Single Posts” option is checked and false if it is not checked.

vol_archive_tags_on() – returns true if the “Display Tags List – Post Feeds” option is checked and false if it is not checked.

vol_single_tags_on() – returns true if the “Display Tags List – Single Posts” option is checked and false if it is not checked.

vol_pings_on() – returns true if the “Display Post Pings” option is checked and false if it is not checked.

vol_search_pages_on() – returns true if the “Display Pages in Search Results” option is checked and false if it is not checked.

vol_page_comments_on() – returns true if the “Display Comments on all Pages” option is checked and false if it is not checked.

vol_download_comments_on() – (for EDD only) returns true if the “Display Comments on Downloads” option is checked and false if it is not checked.

Return to docs