About page working
This commit is contained in:
parent
0584537f99
commit
3c6d3e6894
4 changed files with 79 additions and 16 deletions
|
@ -9,6 +9,23 @@
|
||||||
namespace WP_73k;
|
namespace WP_73k;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
<article class="post border-bottom border-gray pb-4 mb-3" itemscope itemtype="https://schema.org/CreativeWork">
|
||||||
|
<header>
|
||||||
|
<h2 class="post-title fs-2 fw-600 mb-2">
|
||||||
|
<?php
|
||||||
|
if ( is_archive() || is_home() ) {
|
||||||
|
printf( '<a href="%s" rel="bookmark">%s</a>',
|
||||||
|
esc_url( get_the_permalink() ),
|
||||||
|
esc_html( get_the_title() )
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
echo get_the_title();
|
||||||
|
} ?>
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
|
||||||
<article <?php post_class( 'bg-white border-2 border-gray-400 p-8' ); ?> itemscope itemtype="https://schema.org/CreativeWork">
|
<article <?php post_class( 'bg-white border-2 border-gray-400 p-8' ); ?> itemscope itemtype="https://schema.org/CreativeWork">
|
||||||
<header>
|
<header>
|
||||||
<h2 class="m-0">
|
<h2 class="m-0">
|
||||||
|
|
31
index.php
31
index.php
|
@ -10,23 +10,24 @@ namespace WP_73k;
|
||||||
|
|
||||||
get_header(); ?>
|
get_header(); ?>
|
||||||
<main class="container d-flex justify-content-center">
|
<main class="container d-flex justify-content-center">
|
||||||
<div class="container mx-auto relative z-10 mb-16 lg:mb-32 flex flex-wrap items-start">
|
|
||||||
<div class="w-full lg:w-4/6 lg:pr-10 mb-8">
|
<div class="col-12 col-md-10 col-lg-9 col-xl-8 col-xxl-7 pb-2 mb-4 mt-3">
|
||||||
<?php
|
|
||||||
if ( have_posts() ) {
|
|
||||||
while ( have_posts() ) {
|
|
||||||
the_post();
|
|
||||||
echo get_template_part( 'content-templates/content', 'article' );
|
|
||||||
}
|
|
||||||
} ?>
|
|
||||||
</div>
|
|
||||||
<?php
|
<?php
|
||||||
if ( !is_active_sidebar( 'sidebar' ) ) : ?>
|
if ( have_posts() ) {
|
||||||
<aside class="w-full lg:w-2/6 bg-white border-gray-400 border-2 p-8">
|
while ( have_posts() ) {
|
||||||
<?php dynamic_sidebar( 'sidebar' ); ?>
|
the_post();
|
||||||
</aside>
|
echo get_template_part( 'content-templates/content', 'article' );
|
||||||
|
}
|
||||||
|
} ?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
endif; ?>
|
// if ( !is_active_sidebar( 'sidebar' ) ) : ?>
|
||||||
|
<!-- <aside class="w-full lg:w-2/6 bg-white border-gray-400 border-2 p-8"> -->
|
||||||
|
<?php // dynamic_sidebar( 'sidebar' ); ?>
|
||||||
|
<!-- </aside> -->
|
||||||
|
<?php
|
||||||
|
// endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<?php
|
<?php
|
||||||
|
|
45
page.php
Normal file
45
page.php
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The default single page template.
|
||||||
|
*
|
||||||
|
* @author Freeshifter LLC
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace WP_73k;
|
||||||
|
|
||||||
|
get_header(); ?>
|
||||||
|
<main class="container d-flex justify-content-center">
|
||||||
|
|
||||||
|
<div class="col-12 col-md-10 col-lg-9 col-xl-8 col-xxl-7 border-bottom border-gray pb-3 mb-5 mt-3">
|
||||||
|
|
||||||
|
<article itemscope itemtype="https://schema.org/CreativeWork">
|
||||||
|
<header>
|
||||||
|
<h2 class="fs-2 fw-600 mb-2">
|
||||||
|
<?php
|
||||||
|
if ( is_archive() || is_home() ) {
|
||||||
|
printf( '<a href="%s" rel="bookmark">%s</a>',
|
||||||
|
esc_url( get_the_permalink() ),
|
||||||
|
esc_html( get_the_title() )
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
echo get_the_title();
|
||||||
|
} ?>
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="article">
|
||||||
|
<?php
|
||||||
|
if ( has_post_thumbnail() ) {
|
||||||
|
echo get_the_post_thumbnail( get_the_ID(), 'large', ['class' => 'rounded shadow-lg'] );
|
||||||
|
}
|
||||||
|
|
||||||
|
the_content(); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<?php
|
||||||
|
get_footer();
|
|
@ -59,7 +59,7 @@ add_filter( 'wp_nav_menu_objects', function($items, $args) {
|
||||||
foreach ($object->classes as $c) {
|
foreach ($object->classes as $c) {
|
||||||
if (substr( $c, 0, strlen( $svgicon_prefix ) ) === $svgicon_prefix) {
|
if (substr( $c, 0, strlen( $svgicon_prefix ) ) === $svgicon_prefix) {
|
||||||
$icon_slug = str_replace($svgicon_prefix, '', $c);
|
$icon_slug = str_replace($svgicon_prefix, '', $c);
|
||||||
$object->title = svg_icon_use($icon_slug, 'icon baseline') . $object->title;
|
$object->title = svg_icon_use($icon_slug, 'icon baseline') . "\\" . $object->title;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue