Skip to content

Commit

Permalink
🔨 updates "Update footer.php, front-page.php, and header.php files to…
Browse files Browse the repository at this point in the history
… improve schema.org markup and semantic HTML structure."
  • Loading branch information
crazyyy committed Jun 30, 2024
1 parent 764e42a commit 9267361
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 31 deletions.
7 changes: 5 additions & 2 deletions wp-content/themes/wp-framework/footer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<footer class="footer-container" role="contentinfo">
</main><!-- /.global -->

<footer class="footer-container" role="contentinfo" itemscope itemtype="https://schema.org/WPFooter">

<div class="container">
<div class="grid">

Expand All @@ -8,8 +11,8 @@

</div><!-- /.grid -->
</div><!-- /.container -->

</footer><!-- /footer .container -->

</div><!-- /.wrapper -->

<?php wp_footer(); ?>
Expand Down
36 changes: 20 additions & 16 deletions wp-content/themes/wp-framework/front-page.php
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
<?php /* Template Name: Home Page */ get_header(); ?>
<section class="container" role="main" itemscope itemprop="mainContentOfPage">
<div class="grid">

<?php if (have_posts()): while (have_posts()) : the_post(); ?>
<section class="front-page" role="main" itemscope itemprop="mainContentOfPage">
<div class="container">
<div class="grid">

<header class="page-header col-12">
<h1 class="page-title">
<?php the_title(); ?>
</h1>
</header><!-- /.page-header col-12 -->
<?php if (have_posts()): while (have_posts()) : the_post(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class('col-9'); ?>>
<header class="page-header col-12">
<h1 class="page-title">
<?php the_title(); ?>
</h1>
</header><!-- /.page-header col-12 -->

<?php the_content(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('col-9'); ?>>

<?php edit_post_link(); ?>
<?php the_content(); ?>

</article>
<?php edit_post_link(); ?>

<?php endwhile; endif; ?>
</article><!-- /.<?php post_class(); ?>> -->

<?php get_sidebar(); ?>
<?php endwhile; endif; ?>

<?php get_sidebar(); ?>

</div><!-- /.grid -->
</div><!-- /.container -->
</section><!-- /front-page -->

</div><!-- /.grid -->
</section><!-- /section .container -->
<?php get_footer(); ?>
29 changes: 16 additions & 13 deletions wp-content/themes/wp-framework/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="https://gmpg.org/xfn/11">

<title>
<?php wp_title(''); ?><?php if (wp_title('', false)) { echo ' :'; } ?> <?php bloginfo('name'); ?>
</title>
<title><?php wp_title('|', true, 'right'); ?><?php bloginfo('name'); ?></title>

<link href="//www.google-analytics.com/" rel="dns-prefetch">
<link href="//fonts.googleapis.com" rel="dns-prefetch">
Expand All @@ -42,22 +40,22 @@

<body <?php body_class(); ?> itemscope itemtype="https://schema.org/WebPage">
<?php wp_body_open(); ?>
<!-- wrapper -->

<div class="wrapper">

<header id="masthead" class="<?php echo esc_attr($wrapper_classes); ?>" role="banner">
<header id="masthead" class="<?php echo esc_attr($wrapper_classes); ?>" role="banner" itemscope itemtype="https://schema.org/WPHeader">

<div class="container">
<div class="grid">

<div class="header__logo col-12 col-xs-12 col-sm-12 col-md-6 col-lg-6">
<?php
$logo_id = get_theme_mod( 'dark_logo_setting' );
if ( $logo_id ) {
$logo_url = wp_get_attachment_image_url( $logo_id, 'full' );
echo '<img src="' . esc_url( $logo_url ) . '" alt="' . get_bloginfo( 'name' ) . '">';
} elseif (function_exists('the_custom_logo')) {
the_custom_logo();
}
<?php $logo_id = get_theme_mod( 'dark_logo_setting' );
if ( $logo_id ) {
$logo_url = wp_get_attachment_image_url( $logo_id, 'full' );
echo '<img src="' . esc_url( $logo_url ) . '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '">';
} elseif (function_exists('the_custom_logo')) {
the_custom_logo();
}
?>
</div><!-- /.header__logo -->

Expand All @@ -69,3 +67,8 @@
</div><!-- /.container -->
</header><!-- /header -->

<main class="global" itemscope itemprop="mainContentOfPage">




0 comments on commit 9267361

Please sign in to comment.