Minimal bir blog teması yaz dedim ve aşağıdaki kodu yazdı. Bunu nasıl WordPress sitede görebiliriz çok merak ediyorum nasıl olduğunu. Aynı temanın blogger versiyonunu istedim o da aşağıda
<?php
/*
Template Name: Minimal Blog
*/
?>
<!DOCTYPE html>
<html>
<head>
<title><?php wp_title(); ?></title>
<style>
/* Global styles */
* {
box-sizing: border-box;
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
body {
background-color: #f2f2f2;
}
/* Header styles */
header {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
header h1 {
margin: 0;
}
/* Main content styles */
main {
margin: 20px;
}
/* Post styles */
.post {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
padding: 20px;
}
.post h2 {
margin: 0;
}
/* Footer styles */
footer {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
</style>
<?php wp_head(); ?>
</head>
<body>
<!-- Header -->
<header>
<h1><?php bloginfo( 'name' ); ?></h1>
</header>
<!-- Main content -->
<main>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<!-- Post -->
<div class="post">
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
</div>
<?php endwhile; endif; ?>
</main>
<!-- Footer -->
<footer>
<p>© <?php bloginfo( 'name' ); ?></p>
</footer>
<?php wp_footer(); ?>
</body>
</html>Blogger versiyonu:
<!DOCTYPE html>
<html>
<head>
<title>My Minimal Blog</title>
<style>
/* Global styles */
* {
box-sizing: border-box;
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
body {
background-color: #f2f2f2;
}
/* Header styles */
header {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
header h1 {
margin: 0;
}
/* Main content styles */
main {
margin: 20px;
}
/* Post styles */
.post {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
margin-bottom: 20px;
padding: 20px;
}
.post h2 {
margin: 0;
}
/* Footer styles */
footer {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
</style>
</head>
<body>
<!-- Header -->
<header>
<h1>My Minimal Blog</h1>
</header>
<!-- Main content -->
<main>
<!-- Post 1 -->
<div class="post">
<h2>Post 1 Title</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod scelerisque massa, eu placerat urna convallis at. Sed blandit metus vel metus rutrum, id congue velit sollicitudin.</p>
</div>
<!-- Post 2 -->
<div class="post">
<h2>Post 2 Title</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod scelerisque massa, eu placerat urna convallis at. Sed blandit metus vel metus rutrum, id congue velit sollicitudin.</p>
</div>
</main>
<!-- Footer -->
<footer>
<p>© My Minimal Blog</p>
</footer>
</body>
</html>