function tbr_blog_setup() { beans_remove_attribute('beans_body', 'class'); beans_add_attribute('beans_body', 'class', 'tm-blog tm-post'); beans_remove_action('beans_post_meta'); beans_remove_attribute('beans_post', 'class'); beans_add_attribute('beans_post', 'class', 'uk-article uk-panel uk-panel-box uk-panel-box-secondary'); beans_remove_attribute('beans_comments', 'class', ' uk-panel-box'); beans_add_attribute('beans_widget_content_recent-posts', 'class', 'tm-list-style1'); beans_add_attribute('beans_widget_content_categories', 'class', 'tm-list-style1'); beans_replace_attribute('beans_post_meta_tags', 'class', 'uk-text-muted', 'tm-tags uk-margin-medium-top uk-display-block'); beans_modify_action_hook('beans_post_meta_date', 'beans_post_header_prepend_markup'); beans_modify_action_hook('beans_post_meta_categories', 'beans_post_header_prepend_markup'); beans_replace_attribute('beans_post_meta_categories', 'class', 'uk-text-small uk-text-muted uk-clearfix', 'tm-topic uk-button uk-button-tertiary uk-button-mini'); beans_add_attribute('beans_post_title', 'class', 'uk-margin-small-top'); beans_remove_markup('beans_post_body'); beans_add_attribute('beans_next_link_post_navigation', 'class', 'uk-text-right uk-h3'); beans_add_attribute('beans_previous_link_post_navigation', 'class', 'uk-text-left uk-h3'); beans_add_attribute('beans_embed_oembed', 'class', 'tm-cover-article'); beans_modify_markup('beans_no_comment', 'h3'); beans_add_attribute('beans_comment_form_legend', 'class', 'uk-hidden'); beans_add_attribute('beans_comment_form_field_name', 'placeholder', 'Name'); beans_add_attribute('beans_comment_form_field_email', 'placeholder', 'Email'); beans_add_attribute('beans_comment_form_field_url', 'placeholder', 'Website'); beans_add_attribute('beans_comment_form_wrap', 'class', 'uk-panel-box'); beans_replace_attribute('beans_primary', 'class', 'uk-width-medium-3-4', 'uk-width-medium-2-3'); beans_replace_attribute('beans_sidebar_primary', 'class', 'uk-width-medium-1-4', 'uk-width-medium-1-3'); }
function dfh_setup_theme() { beans_replace_attribute( 'beans_favicon', 'href', 'http://devignerforhire.com/favicon.ico' ); beans_remove_action( 'beans_comments' ); beans_remove_action( 'beans_replace_nojs_class' ); beans_add_attribute( 'beans_site', 'class', 'uk-container uk-container-center' ); beans_remove_markup( 'beans_fixed_wrap_header' ); beans_remove_markup( 'beans_site_branding' ); beans_remove_markup( 'beans_content' ); beans_add_attribute( 'beans_primary', 'role', 'main' ); beans_remove_markup( 'beans_fixed_wrap_main' ); beans_replace_attribute( 'beans_header', 'class', 'uk-block', 'uk-overflow-container uk-margin-large-top' ); beans_remove_attribute( 'beans_menu_navbar_primary', 'id' ); beans_replace_attribute( 'beans_menu_navbar_primary', 'class', ' uk-navbar-nav', 'uk-navbar-nav' ); beans_remove_action( 'beans_site_title_tag' ); beans_add_attribute( 'beans_site_title_link', 'class', 'tm-logo uk-float-left' ); beans_add_attribute( 'beans_site_title_tag', 'class', 'tm-tagline uk-float-left' ); beans_remove_attribute( 'beans_main', 'class', 'uk-block' ); beans_remove_attribute( 'beans_footer', 'class', 'uk-block' ); beans_remove_action( 'beans_breadcrumb' ); beans_modify_action_hook( 'beans_footer', 'beans_main_after_markup' ); beans_remove_markup( 'beans_fixed_wrap_footer' ); beans_remove_attribute( 'beans_post', 'id' ); }
function bench_index_setup_document() { //Layout if (beans_get_layout() == 'c') { beans_remove_attribute('beans_primary', 'class', 'uk-width-large-7-10'); } // Posts grid beans_add_attribute('beans_content', 'class', 'tm-posts-grid uk-grid uk-grid-width-small-1-2 uk-grid-width-medium-1-3'); beans_add_attribute('beans_content', 'data-uk-grid-margin', ''); beans_add_attribute('beans_content', 'data-uk-grid-match', "{target:'.uk-panel'}"); beans_wrap_inner_markup('beans_post', 'bench_post_panel', 'div', array('class' => 'uk-panel uk-panel-box')); // Post content beans_remove_attribute('beans_content', 'class', 'tm-centered-content'); // Post article beans_remove_attribute('beans_post', 'class', 'uk-article'); // Post meta beans_remove_action('beans_post_meta'); beans_remove_action('beans_post_meta_tags'); beans_modify_action('beans_post_meta_categories', 'beans_post_header', null, 7); beans_remove_output('beans_post_meta_categories_prefix'); beans_add_attribute('beans_post_meta_categories', 'class', 'tm-post-category'); // Post image beans_modify_action('beans_post_image', 'beans_post_header_before_markup', 'beans_post_image'); // Post title beans_add_attribute('beans_post_title', 'class', 'uk-margin-small-top uk-h3'); // Post more link //beans_add_attribute( 'beans_post_more_link', 'class', 'uk-button uk-button-small' ); // Posts pagination beans_modify_action_hook('beans_posts_pagination', 'beans_content_after_markup'); }
function kkthemes_index_setup_document() { if (is_main_archive()) { // Remove breadcrumb if this is main archive (accessible from main menu) // Other archives like Tags archive, author archive, month archive etc will continue to have breadcumb beans_remove_action('beans_breadcrumb'); //Add a large Title panel in these archive pages beans_add_smart_action('beans_header_after_markup', 'kkthemes_archive_title'); } kkthemes_post_view(); // Posts pagination beans_modify_action_hook('beans_posts_pagination', 'beans_content_after_markup'); }
function tbr_resources_archive_setup() { beans_remove_attribute('beans_body', 'class'); beans_add_attribute('beans_body', 'class', 'tm-resources'); beans_remove_markup('beans_primary'); beans_remove_markup('beans_main_grid', 'class'); beans_modify_action_hook('beans_post_image', 'beans_post_prepend_markup'); beans_remove_markup('beans_post_header'); beans_add_attribute('beans_post_title', 'class', 'uk-h3'); beans_add_attribute('beans_post_image', 'class', 'uk-margin-remove'); beans_remove_attribute('beans_post', 'class'); beans_add_attribute('beans_post_body', 'class', 'uk-panel-box'); beans_modify_action_hook('beans_post_title', 'beans_post_body_prepend_markup'); }
/** * Fields content. */ public function fields($tag) { beans_remove_action('beans_field_label'); beans_modify_action_hook('beans_field_description', 'beans_field_wrap_after_markup'); beans_modify_markup('beans_field_description', 'p'); beans_add_attribute('beans_field_description', 'class', 'description'); foreach (beans_get_fields('term_meta', $this->section) as $field) { echo '<tr class="form-field">'; echo '<th scope="row">'; beans_field_label($field); echo '</th>'; echo '<td>'; beans_field($field); echo '</td>'; echo '</tr>'; } }
function dfh_modify_portfolio_markup() { beans_remove_markup('beans_main_grid'); beans_remove_markup('beans_primary'); beans_remove_attribute('beans_post', 'id'); beans_remove_attribute('beans_post', 'class'); beans_remove_attribute('beans_body', 'class'); beans_add_attribute('beans_body', 'class', 'tm-portfolio'); beans_add_attribute('beans_post_header', 'class', 'uk-clearfix'); beans_add_attribute('beans_post_title', 'class', 'uk-float-left uk-margin-remove'); beans_add_attribute('beans_post', 'class', 'tm-portfolio-single uk-padding-remove'); beans_wrap_inner_markup('beans_post', 'tm_portfolio_content', 'div', array('class' => 'tm-portfolio-content uk-width-1-1 uk-width-medium-6-10 uk-width-large-7-10')); beans_add_attribute('tm_portfolio_content', 'role', 'main'); beans_add_attribute('beans_post', 'class', 'uk-grid uk-grid-collapse'); beans_add_attribute('beans_main', 'class', 'uk-padding-remove'); beans_modify_action_hook('beans_post_image', 'beans_post_before_markup'); beans_add_attribute('beans_post_image', 'class', 'uk-margin-bottom-remove uk-cover'); }
function totem_setup_document() { // Header beans_remove_attribute('beans_header', 'class', ' uk-block'); beans_wrap_inner_markup('beans_fixed_wrap_header', 'totem_overlay_navigation', 'div', array('class' => 'tm-overlay-navigation uk-clearfix')); // Breadcrumb beans_remove_action('beans_breadcrumb'); // Navigation beans_add_attribute('beans_sub_menu_wrap', 'class', 'uk-dropdown-center'); beans_remove_attribute('beans_menu_item_child_indicator', 'class', 'uk-margin-small-left'); // Offcanvas beans_add_attribute('beans_widget_area_offcanvas_bar', 'class', 'uk-offcanvas-bar-flip'); beans_add_attribute('beans_primary_menu_offcanvas_button', 'class', 'uk-button-primary'); // Post content beans_remove_attribute('beans_post', 'class', ' uk-panel-box'); beans_add_attribute('beans_post_content', 'class', 'uk-text-large'); beans_add_attribute('beans_post_more_link', 'class', 'uk-button uk-button-small'); // Post image beans_modify_action_hook('beans_post_image', 'beans_post_title_before_markup'); // Post meta beans_remove_action('beans_post_meta'); beans_remove_action('beans_post_meta_tags'); beans_remove_action('beans_post_meta_categories'); // Post read more beans_replace_attribute('beans_next_icon_more_link', 'class', 'angle-double-right', 'long-arrow-right'); // Posts pagination beans_remove_markup('beans_previous_icon_posts_pagination'); beans_remove_markup('beans_next_icon_posts_pagination'); // Comment badge beans_add_attribute('beans_moderator_badge', 'class', 'uk-border-rounded uk-align-right'); beans_add_attribute('beans_moderation_badge', 'class', 'uk-border-rounded uk-align-right'); // Comment meta beans_modify_action_priority('beans_comment_metadata', 9); // Comment form beans_add_attribute('beans_comment_form_submit', 'class', 'uk-button-large'); if (!is_user_logged_in()) { beans_replace_attribute('beans_comment_form_comment', 'class', 'uk-width-medium-1-1', 'uk-width-medium-6-10'); } // Search beans_add_attribute('beans_search_title', 'class', 'uk-margin-large-bottom'); if (is_search()) { beans_remove_action('beans_post_image'); } }
function tbr_search_setup() { beans_remove_markup('beans_grid'); beans_remove_markup('beans_main_grid'); beans_remove_markup('beans_post_header'); beans_remove_markup('beans_post_content'); beans_remove_markup('beans_post_body'); beans_remove_action('beans_post_navigation'); beans_remove_action('beans_post_image'); beans_modify_action_hook('beans_posts_pagination', 'beans_primary_after_markup'); beans_replace_attribute('beans_primary', 'class', 'tm-primary uk-width-medium-4-4', 'tm-search uk-list uk-list-striped'); beans_modify_markup('beans_primary', 'ol'); beans_modify_markup('beans_post', 'li'); beans_remove_attribute('beans_post', 'id'); beans_remove_attribute('beans_post', 'class'); beans_remove_attribute('beans_post_title', 'class'); beans_add_attribute('beans_search_form_input', 'class', 'uk-form-large'); beans_modify_action_hook('beans_post_search_title', 'beans_primary_before_markup'); beans_remove_attribute('beans_search_title', 'class', 'uk-article-title'); }
function kkthemes_setup_document() { beans_remove_action('beans_header_image'); //remove default header image // Move breadcrumb just below header beans_modify_action_hook('beans_breadcrumb', 'beans_header_after_markup'); beans_add_attribute('beans_breadcrumb', 'class', 'uk-container uk-container-center uk-hidden-small'); // Site Logo beans_remove_action('beans_site_title_tag'); //Add back site title after logo image //beans_add_smart_action('beans_logo_image_after_markup', 'kkthemes_site_title'); if (is_user_logged_in()) { //Add edit post link when user is logged in if (is_singular() && !is_page_template('page_home.php')) { beans_add_smart_action('beans_post_header_prepend_markup', 'kkthemes_edit_link'); } } //content beans_remove_attribute('beans_post', 'class', 'uk-panel-box'); //comments beans_remove_attribute('beans_comments', 'class', 'uk-panel-box'); }
function tbr_setup_theme() { beans_remove_attribute( 'beans_primary_menu', 'class' ); beans_add_attribute( 'beans_primary_menu', 'id', 'js-mobile-nav' ); beans_add_attribute( 'beans_fixed_wrap_header', 'class', 'uk-text-center' ); beans_remove_attribute( 'beans_menu_navbar', 'id' ); beans_remove_attribute( 'beans_header', 'role' ); beans_remove_attribute( 'beans_footer', 'role' ); beans_remove_attribute( 'beans_primary_menu', 'role' ); beans_remove_action( 'beans_comments' ); beans_remove_action( 'beans_replace_nojs_class' ); beans_remove_action( 'beans_breadcrumb' ); beans_remove_markup( 'beans_site' ); beans_remove_markup( 'beans_content' ); beans_add_attribute( 'beans_primary', 'role', 'main' ); beans_replace_attribute( 'beans_site_branding', 'class', 'uk-float-left', 'tm-logo uk-align-center tm-nudge' ); beans_replace_attribute( 'beans_main', 'class', ' uk-block', ' uk-block-large' ); beans_remove_attribute( 'beans_menu_navbar_primary', 'id' ); beans_remove_attribute( 'beans_post', 'id' ); beans_modify_action_hook( 'beans_footer', 'beans_main_after_markup' ); beans_add_attribute( 'beans_menu_navbar', 'class', 'uk-hidden-small uk-subnav uk-subnav-line uk-margin-remove tm-nudge' ); beans_add_attribute( 'beans_menu_item_link_24', 'class', 'tm-external' ); beans_replace_attribute( 'beans_widget_area_grid_footer', 'class', 'uk-grid', 'uk-flex uk-flex-top uk-flex-space-between' ); beans_remove_attribute( 'beans_widget_grid_footer', 'class' ); beans_add_attribute( 'beans_menu_grid', 'class', 'uk-list' ); beans_add_attribute( 'beans_widget_grid_footer_text_text-2', 'class', 'tm-about' ); beans_add_attribute( 'beans_widget_grid_footer_text_text-3', 'class', 'tm-connect' ); beans_remove_markup( 'beans_logo_image' ); if ( is_page( 'Theme Setup Guide', 'Features' ) ) { beans_remove_attribute( 'beans_post', 'class', 'uk-panel-box' ); beans_add_attribute( 'beans_post_title', 'class', 'uk-text-center' ); beans_remove_markup( 'beans_main_grid'); beans_remove_markup( 'beans_primary'); beans_add_attribute( 'beans_post_content', 'class', 'tm-narrow-content' ); } }
function flipster_index_setup_document() { // Posts grid beans_add_attribute('beans_content', 'class', 'tm-posts-grid uk-grid uk-grid-width-small-1-2 uk-grid-width-medium-1-2'); beans_add_attribute('beans_content', 'data-uk-grid-margin', ''); beans_add_attribute('beans_content', 'data-uk-grid-match', "{target:'.uk-panel'}"); beans_wrap_inner_markup('beans_post', 'flipster_post_panel', 'div', array('class' => 'uk-panel uk-panel-box')); // Post content beans_remove_attribute('beans_content', 'class', 'tm-centered-content'); // Post article beans_remove_attribute('beans_post', 'class', 'uk-article'); // Post meta beans_remove_action('beans_post_meta_tags'); // Post image beans_modify_action('beans_post_image', 'beans_post_header_before_markup', 'beans_post_image'); // Post title beans_add_attribute('beans_post_title', 'class', 'uk-margin-small-top uk-h2'); // Remove the post content. beans_remove_action('beans_post_content'); // Post more link beans_add_attribute('beans_post_more_link', 'class', 'uk-button uk-button-primary uk-button-small'); // Posts pagination beans_modify_action_hook('beans_posts_pagination', 'beans_content_after_markup'); }
<?php //Make page fullwidth as default layout in home page //Make page fullwidth as default layout in home page add_filter('beans_layout', 'beans_child_default_home_layout'); function beans_child_default_home_layout() { return 'c'; } //Adjust the UKIt grid for the index posts page beans_add_attribute('beans_content', 'class', 'uk-grid uk-container-center'); beans_add_attribute('beans_post', 'class', 'uk-width-large-1-3 uk-width-medium-1-2 uk-width-small-1-1'); beans_add_attribute('beans_post_header', 'class', 'post-header'); beans_add_attribute('beans_post_body', 'class', 'post-body'); //Posts pagination below all the posts beans_modify_action_hook('beans_posts_pagination', 'beans_content_after_markup'); //Add a hero section beans_add_smart_action('beans_header_after_markup', 'beans_child_add_hero'); function beans_child_add_hero() { echo beans_open_markup('beans_child_hero_section', 'div', array('class' => 'uk-block uk-block-large uk-container-center uk-text-center bc-block')); $hero_content = '<h1 class="uk-heading-large">My Beans</h1>'; $hero_content .= '<p class="uk-article-lead">A demo theme for SitePoint</p>'; $hero_content .= '<p><a href="#" class="uk-button uk-button-large">Read Article <i class="uk-icon-external-link"></i></a></p>'; echo $hero_content; echo beans_close_markup('beans_child_hero_section', 'div'); } // Load Beans document. beans_load_document();