updated basic HTML portions for better semantics

This commit is contained in:
Jacob Haddon 2024-02-18 11:35:39 -05:00
parent 0d83ea38a6
commit a90b2b0b62
4 changed files with 71 additions and 35 deletions

View File

@ -3,17 +3,21 @@
// content.PHP // content.PHP
?> ?>
<div class="blog-post"> <article id="post-<?php the_ID(); ?>" >
<section <?php post_class(); ?>>
<h2 class="blog-post-title"><a href="<?php the_permalink(); ?> "><?php the_title(); ?></a></h2> <h2 class="blog-post-title"><a href="<?php the_permalink(); ?> "><?php the_title(); ?></a></h2>
<p class="blog-post-meta"><?php the_date(); ?> by <?php the_author_link(); ?></p> <p class="blog-post-meta"><?php the_date(); ?> by <?php the_author_link(); ?></p>
<?php the_content(); ?> <?php the_content(); ?>
</div><!-- /.blog-post --> </section><!-- /.blog-post -->
<div class="blog-comments"> <section class="blog-comments">
<?php <?php
// If comments are open or we have at least one comment, load up the comment template. // If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) : if ( comments_open() || get_comments_number() ) :
comments_template(); comments_template();
endif; endif;
?> ?>
</div> <!-- blog comments --> </section> <!-- blog comments -->
</article>

View File

@ -1,3 +1,15 @@
<hr>
<footer>
<p>this is a <a href="http://motherfuckingwebsite.com/">motherfucking website</a> and a <a href="http://bettermotherfuckingwebsite.com/">better motherfucking</a> website.</p>
<p><a href="https://code.jacobhaddon.com/Wordpress/mfwpt">Code</a> by Jacob Haddon - license <a href="https://www.gnu.org/licenses/gpl-2.0.en.html">GPLv2.0 or later</a> - <a href="https://Apokrupha.com">Apokrupha.com</a></p>
</footer>
<hr>
<?php wp_footer(); ?> <?php wp_footer(); ?>
</body> </body>
</html> </html>

View File

@ -1,13 +1,27 @@
<!DOCTYPE html> <!DOCTYPE html>
<html <?php language_attributes(); ?>> <html <?php language_attributes(); ?>>
<head> <head>
<meta charset="<?php bloginfo( 'charset' ); ?>" /> <meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php wp_title(); ?></title> <title><?php wp_title(); ?></title>
<?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?> <?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?> <?php wp_head(); ?>
</head> </head>
<body <?php body_class(); ?>> <body <?php body_class(); ?>>
<header>
</header>
<!-- Nav -->
<?php wp_nav_menu( array( <?php wp_nav_menu( array(
'theme_location' => 'header-menu', 'theme_location' => 'header-menu',
'container' => 'nav',
'container_class' => 'mfwpt_menu' 'container_class' => 'mfwpt_menu'
) );?> ) );?>
<!-- Nav -->

View File

@ -1,5 +1,8 @@
<?php get_header(); ?>
<main>
<?php <?php
get_header();
if ( have_posts() ) : while ( have_posts() ) : the_post(); if ( have_posts() ) : while ( have_posts() ) : the_post();
get_template_part( 'content', get_post_format() ); get_template_part( 'content', get_post_format() );
endwhile; endwhile;
@ -7,5 +10,8 @@
_e( 'Sorry, no posts matched your criteria.', 'textdomain' ); _e( 'Sorry, no posts matched your criteria.', 'textdomain' );
endif; endif;
//get_sidebar(); //get_sidebar();
get_footer();
?> ?>
</main>
<?php get_footer(); ?>