</ul>
      </nav>
    <div id="search-3" class="tm-widget uk-panel widget_search">
      <div>
        <form class="uk-form uk-form-icon uk-form-icon-flip uk-width-1-1" method="get" action="/" role="search">
          <input class="uk-width-1-1" type="search" placeholder="Search" value="" name="s">
          <i class="uk-icon-search"></i>
        </form>
      </div>
    </div>
  </div>
</div>
<?php 
}
// modify the loop output
beans_modify_action_callback('beans_loop_template', 'tbr_resources_loop');
function tbr_resources_loop($query)
{
    $query_args = array('post_type' => 'resources');
    if ($term_id = beans_get('filter_term_id')) {
        $query_args = array_merge($query_args, array('tax_query' => array(array('taxonomy' => 'resource_type', 'field' => 'term_id', 'terms' => beans_get('filter_term_id')))));
    }
    $the_query = new WP_Query($query_args);
    if (wp_is_mobile()) {
        $filter_id = 'mobile-filters';
    } else {
        $filter_id = 'filters';
    }
    ?>

    <div class="tm-index-wrap tm-portfolio tm-lazy uk-grid-width-1-1 uk-grid-width-small-1-2 uk-grid-width-medium-1-3" data-uk-grid="{gutter: 30, controls: '#<?php 
Beispiel #2
0
beans_add_smart_action( 'widgets_init', 'banks_register_bottom_widget_area' );

function banks_register_bottom_widget_area() {

	beans_register_widget_area( array(
		'name' => 'Footer',
		'id' => 'footer',
		'description' => 'Widgets in this area will be shown in the footer section as a grid.',
		'beans_type' => 'grid'
	) );

}


// Add footer content
beans_modify_action_callback( 'beans_footer_content', 'tbr_footer' );

function tbr_footer() {

    echo beans_widget_area( 'footer' ); ?>

    <div class="tm-credits uk-margin-large-top uk-margin-bottom uk-text-muted uk-text-center uk-clearfix">
        &#169; ThemeButler <?php echo date('Y'); ?>. All rights reserved.
        Built with <a href="http://www.getbeans.io/" target="_blank" title="Built with Beans framework for WordPress.">Beans</a> and <a href="https://wordpress.org/" target="_blank">WordPress</a>.
    </div>

    <script type="text/javascript">
    var _paq = _paq || [];
    _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
    _paq.push(["setCookieDomain", "*.themebutler.com"]);
    _paq.push(["setDomains", ["*.themebutler.com"]]);
Beispiel #3
0
//   global $_beans_uikit_enqueued_items;
//
//   print '<pre>';
//   print_r( $_beans_uikit_enqueued_items );
//   print '</pre>';
//
// }
// Resize post image (filter)
beans_add_smart_action('beans_edit_post_image_args', 'tbr_frontpage_post_image_args');
function tbr_frontpage_post_image_args($args)
{
    $args['resize'] = array(430, 250, true);
    return $args;
}
// Modify the loop output
beans_modify_action_callback('beans_loop_template', 'tbr_home_themes_loop');
function tbr_home_themes_loop($query)
{
    $the_query = new WP_Query(array('post_type' => 'themes', 'posts_per_page' => '4', 'no_found_rows' => true));
    ?>

  <div class="tm-home uk-text-center">
    <h2 class="uk-margin-remove-top">Looking for a new WordPress theme?</h2>
    <p class="uk-article-lead tm-excerpt">Browse our growing collection of free child-themes for awesome Beans framework for WordPress. You won't find any complicated configuration options, the themes are heavily optimized for performance and are easy to customize. </p>
    <div class="tm-themes uk-grid uk-grid-width-1-1 uk-grid-width-medium-1-4 uk-margin-large-top" >

    <?php 
    if ($the_query->have_posts()) {
        while ($the_query->have_posts()) {
            $the_query->the_post();
            global $post;
Beispiel #4
0
<?php

// Setup the contact page
add_action('beans_before_load_document', 'dfh_contact_setup');
function dfh_contact_setup()
{
    beans_remove_action('beans_post_title');
    beans_remove_attribute('beans_body', 'class');
    beans_add_attribute('beans_body', 'class', 'tm-contact');
    beans_add_attribute('beans_main_grid', 'class', 'uk-grid-collapse');
}
// Include the needed uikit components
add_action('beans_uikit_enqueue_scripts', 'dfh_enque_uikit_contact');
function dfh_enque_uikit_contact()
{
    beans_uikit_enqueue_components(array('article', 'contrast'));
}
// Include contact form
function dfh_contact_form()
{
    include get_stylesheet_directory() . '/inc/contact-form.php';
}
// Output contact form
beans_modify_action_callback('beans_loop_template', 'dfh_view_content');
function dfh_view_content()
{
    dfh_contact_form();
}
// Load Beans
beans_load_document();
    return $atts;
}
add_filter('nav_menu_link_attributes', 'bench_add_nav_menu_atts', 10, 4);
// The bottom widget area
function bench_bottom_widget_area()
{
    // Stop here if no widget
    if (!beans_is_active_widget_area('bottom')) {
        return;
    }
    echo beans_open_markup('bench_bottom', 'section', array('class' => 'tm-bottom'));
    echo beans_widget_area('bottom');
    echo beans_close_markup('bench_bottom', 'section');
}
// Overwrite the footer content.
beans_modify_action_callback('beans_footer_content', 'bench_footer_content');
function bench_footer_content()
{
    ?>
	<div class="uk-grid uk-text-muted">
		<div class="uk-width-medium-1-3">
	<?php 
    echo '<div class="tm-footer-logo">';
    if ($logo = get_theme_mod('beans_logo_image', false)) {
        echo beans_open_markup('beans_site_title_link', 'a', array('href' => esc_url(home_url()), 'rel' => 'home', 'itemprop' => 'headline'));
        echo beans_selfclose_markup('beans_logo_image', 'img', array('class' => 'tm-logo', 'src' => esc_url($logo), 'alt' => esc_attr(get_bloginfo('name'))));
        echo beans_close_markup('beans_site_title_link', 'a');
    }
    echo '</div>';
    if ($description = get_bloginfo('description')) {
        echo '<p class="uk-margin-small-top uk-margin-bottom">' . $description . '</p>';
Beispiel #6
0
// Add the bottom widget area
add_action('beans_header_after_markup', 'dfh_welcome');
function dfh_welcome()
{
    ?>

  <div class="tm-welcome uk-contrast">
    <h1 class="uk-article-title uk-text-center">Howzit! My name is Chris</h1>
    <p class="uk-margin-remove uk-h3 uk-text-center">I am an Entrepreneur, Designer and Front-end Developer. I get a kick out of creating interfaces that people love using. Below are a few examples of my work.</p>
  </div>

<? }


// Modify the loop output
beans_modify_action_callback( 'beans_loop_template', 'dfh_home_work_loop' );

function dfh_home_work_loop( $query ) {

  $the_query = new WP_Query( array( 'post_type' => 'portfolio', 'posts_per_page' => '15', 'no_found_rows' => true ) ); ?>

  <div class="uk-grid uk-grid-match uk-grid-width-1-1 uk-grid-width-small-1-2 uk-grid-width-large-1-3" data-uk-grid-match="{target:'.uk-thumbnail'}">
    <?php 
    if ($the_query->have_posts()) {
        while ($the_query->have_posts()) {
            $the_query->the_post();
            if ($images = get_post_meta(get_the_ID(), 'portfolio_gallery', true)) {
                $image = wp_get_attachment_image_src($images[0], 'full');
                $image_src = beans_edit_image($image[0], array('resize' => array(380, 298, array('center', 'top'))));
            } else {
                $image_src = false;