public function body_class($classes) { if (!is_page()) { $classes[] = dh_get_main_class(true); } return $classes; }
<?php $main_class = dh_get_main_class(); $layout = dh_get_theme_option('blogs-style', 'masonry'); $pagination = dh_get_theme_option('blogs-pagination', 'infinite_scroll'); $loadmore_text = dh_get_theme_option('blogs-loadmore-text', __('Load More', DH_THEME_DOMAIN)); $columns = dh_get_theme_option('blogs-columns', 4); $show_tag = dh_get_theme_option('blogs-show-tag', '0') == '1' ? 'yes' : ''; $link_post_title = dh_get_theme_option('blogs-link-post-title', '1') == '1' ? 'yes' : ''; $hide_post_title = dh_get_theme_option('blogs-show-post-title', '1') == '1' ? '' : 'yes'; $hide_thumbnail = dh_get_theme_option('blogs-show-featured', '1') == '1' ? '' : 'yes'; $hide_date = dh_get_theme_option('blogs-show-date', '1') == '1' ? '' : 'yes'; $hide_comment = dh_get_theme_option('blogs-show-comment', '1') == '1' ? '' : 'yes'; $hide_category = dh_get_theme_option('blogs-show-category', '1') == '1' ? '' : 'yes'; $hide_author = dh_get_theme_option('blogs-show-author', '1') == '1' ? '' : 'yes'; $hide_readmore = dh_get_theme_option('blogs-show-readmore', '1') == '1' ? '' : 'yes'; $excerpt_length = absint(dh_get_theme_option('blogs-excerpt-length', 30)); $show_date = empty($hide_date) ? true : false; $show_comment = empty($hide_comment) ? true : false; $show_category = empty($hide_category) ? true : false; $show_author = empty($hide_author) ? true : false; global $wp_query; if ($layout == 'masonry') { /** * script * {{ */ wp_enqueue_script('vendor-isotope'); } if ($pagination === 'infinite_scroll') { /**
public function body_class($classes) { if (is_singular('product') && dh_get_theme_option('single-product-style', 'style-1') == 'style-2') { $classes[] = 'single-product-style-2'; } if (!is_page()) { $classes[] = dh_get_main_class(true); } return $classes; }