Añadir bootstrap a la plantilla de Genesis

Contactar con el profesor

functions.phpadd_filter( 'genesis_attr_site-inner', function( $attributes ) {
	$attributes['class'] = $attributes['class']. ' fluid-container';
	  return $attributes;
  } );
  
  add_filter( 'genesis_attr_site-header', function( $attributes ) {
	$attributes['class'] = $attributes['class']. ' justify-content-between position-relative row';
	  return $attributes;
  } );

  add_filter( 'genesis_attr_title-area', function( $attributes ) {
	$attributes['class'] = $attributes['class']. ' col-4';
	  return $attributes;
  } );
  
  add_filter( 'genesis_attr_nav-primary', function( $attributes ) {
	$attributes['class'] = $attributes['class']. ' col-lg-8 collapse navbar-collapse';
	$attributes['id']= 'navbarSupportedContent';
	  return $attributes;
  } );

  add_filter( 'genesis_attr_site-footer', function( $attributes ) {
	$attributes['class'] = $attributes['class']. ' ppppppppppppp';
	  return $attributes;
  } );


  add_filter( 'genesis_attr_footer-widgets', function( $attributes ) {
	$attributes['class'] = $attributes['class']. ' container-fluid';
	  return $attributes;
  } );


  add_action( 'genesis_before_header', function(){echo '<div  class="fluid-container navbar navbar-expand-lg navbar-light bg-light"><div class="container"><button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
	  <span class="navbar-toggler-icon"></span>
	</button>';});
  add_action( 'genesis_after_header', function(){echo '</div></div>';});

  function be_primary_menu_args( $args ) {
	if( 'primary' == $args['theme_location'] ) {
	  $args['depth'] = 1;
	}
	$args['menu_class'].= ' navbar-nav';
	//var_dump($args);
	return $args;
  }
  add_filter( 'wp_nav_menu_args', 'be_primary_menu_args' );
genesis.scss.site-header {
  padding: 7px;
  width: 100%;

  .navbar-collapse {
  
    .menu-primary {
      justify-content: flex-end;

      a {
        display: block;
        text-align: right;
        color: black;
        padding: 10px;
        text-decoration: none;
        border-bottom: 1px solid rgba(0,0,0,0.2);
      }
      @include media-breakpoint-up(lg) {
        position: static;
        width: 100%;
      }
    }
  }
}

.navbar-toggler {
  position: absolute;
  top: 20px;
  right: 35px;
  z-index: 100;
}

.footer-widgets {
  background: $black;
  padding: 20px;
  .wrap {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    margin: auto;
    padding-right: 15px;
    padding-left: 15px;

    @include media-breakpoint-up(xs) {
      max-width: 540px;
    }

    @include media-breakpoint-up(md) {
      max-width: 720px;
      
      .footer-widgets-2{
        text-align: center;
      }

      .footer-widgets-3{
        text-align: right;
      }
    }

    @include media-breakpoint-up(lg) {
      max-width: 960px;
    }

    @include media-breakpoint-up(xl) {
      max-width: 1140px;
    }

    a {
      color: white;
      text-decoration: none;
    }
  }
}
← Añadir clases a los elementos de la plantilla
Mostrar los resultados de búsqueda incluyendo sólo texto, no diseño o fotos →

Aviso Legal | Política de privacidad