Skip to content

Commit

Permalink
navigation menu and widget area
Browse files Browse the repository at this point in the history
  • Loading branch information
hasinhayder committed May 22, 2018
1 parent 55f9a17 commit 7f73460
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 1 deletion.
12 changes: 12 additions & 0 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
}
?>

<div class="footermenu">
<?php
wp_nav_menu(
array(
'theme_location' => 'footermenu',
'menu_id' => 'footermenucontainer',
'menu_class' => 'list-inline text-right',
)
);
?>
</div>

</div>
</div>
</div>
Expand Down
36 changes: 35 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ function alpha_bootstrapping(){
load_theme_textdomain("alpha");
add_theme_support("post-thumbnails");
add_theme_support("title-tag");
register_nav_menu("topmenu",__("Top Menu","alpha"));
register_nav_menu("footermenu",__("Footer Menu","alpha"));
}
add_action("after_setup_theme","alpha_bootstrapping");

Expand Down Expand Up @@ -51,4 +53,36 @@ function alpha_sidebar(){
);
}

add_action("widgets_init","alpha_sidebar");
add_action("widgets_init","alpha_sidebar");

function alpha_the_excerpt($excerpt){
if(!post_password_required()){
return $excerpt;
}else{
echo get_the_password_form();
}
}
add_filter("the_excerpt","alpha_the_excerpt");


function alpha_protected_title_change(){
return "%s";
}
add_filter("protected_title_format","alpha_protected_title_change");


function alpha_menu_item_class($classes , $item) {
$classes[] = "list-inline-item";
return $classes;
}
add_filter("nav_menu_css_class","alpha_menu_item_class", 10, 2);










13 changes: 13 additions & 0 deletions hero.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@
<a href="<?php echo site_url(); ?>"><?php bloginfo( "name" ); ?></a>
</h1>
</div>
<div class="col-md-12">
<div class="navigation">
<?php
wp_nav_menu(
array(
'theme_location' => 'topmenu',
'menu_id' => 'topmenucontainer',
'menu_class' => 'list-inline text-center',
)
);
?>
</div>
</div>
</div>
</div>
</div>
6 changes: 6 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
the_post_thumbnail( "large", array( "class" => "img-fluid" ) );
}

/*if(!post_password_required()){
the_excerpt();
}else{
echo get_the_password_form();
}*/

the_excerpt();
?>
</p>
Expand Down

0 comments on commit 7f73460

Please sign in to comment.