sidebar: initial dynamic sidebar support
Doesn't work yet as I haven't put wp_footer in the footer
This commit is contained in:
parent
510f62452b
commit
e2cab60a05
2 changed files with 18 additions and 49 deletions
17
functions.php
Normal file
17
functions.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
/* function.php
|
||||
*
|
||||
* All the function of Quarante-Douze
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* 1. Sidebar support */
|
||||
|
||||
if ( function_exists('register_sidebar') )
|
||||
register_sidebar(array(
|
||||
'before_widget' => '<section id="%1$s" class="widget %2$s card card-secondary">',
|
||||
'after_widget' => '</section>',
|
||||
'before_title' => '<h1 class="section card-header">',
|
||||
'after_title' => '</h1>',
|
||||
));
|
50
sidebar.php
50
sidebar.php
|
@ -1,51 +1,3 @@
|
|||
<aside class="sidebar col-md-3">
|
||||
<section class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Catégories</h3>
|
||||
</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a href="#" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
|
||||
Objet de liste
|
||||
<span class="badge badge-primary badge-pill">14</span>
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Objet de liste</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Objet de liste</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Objet de liste</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Objet de liste</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"> Archive</h3>
|
||||
</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a href="#" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
|
||||
Objet de liste
|
||||
<span class="badge badge-primary badge-pill">14</span>
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Objet de liste</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Objet de liste</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Objet de liste</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Objet de liste</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="card card-primary">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Navigation</h3>
|
||||
</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<a href="#" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
|
||||
Objet de liste
|
||||
<span class="badge badge-primary badge-pill">14</span>
|
||||
</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Objet de liste</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Objet de liste</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Objet de liste</a>
|
||||
<a href="#" class="list-group-item list-group-item-action">Objet de liste</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<?php dynamic_sidebar(); ?>
|
||||
</aside>
|
||||
|
|
Reference in a new issue