Skip to content

razmil's note

らずみるログ処

  • TOP
  • Win10
  • サイトマップ
  • サンプルページ
  • サンプルページ
  • ねっとわーく
  • ふぁみりあ
  • メンテナンス中

カテゴリー: wordpress

ヘッダメニューを削除してみた

Posted on 2020/07/18 - 2020/11/03 by razmil

ヘッダメニューを削除してみた

header.php
</div><!– .site-branding –>
<nav id=”site-navigation” class=”main-navigation” aria-label=”<?php _e( ‘Primary’, ‘micro’ ); ?>”>
<button class=”menu-toggle” aria-controls=”primary-menu” aria-expanded=”false”>
<span class=”screen-reader-text”>Menu</span>
</button>
<div class=”menu-primary-container”>
<?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘menu_id’ => ‘primary-menu’ ) ); ?>
</div><!– .menu-primary-container –>
</nav><!– #site-navigation –>
</div>

投稿日時部分を修正してみた

Posted on 2020/07/18 - 2020/11/03 by razmil

投稿日時部分を修正してみた
りなりす@2020年7月18日

inc\template-tags.php(micro_posted_on())

$posted_on = sprintf(
esc_html_x( ‘@%s’, ‘post date’, ‘micro’ ),
$time_string
);

$byline = sprintf(
#esc_html_x( ‘by %s’, ‘post author’, ‘micro’ ),
esc_html_x( ‘%s‘, ‘post author’, ‘micro’ ),
#'<span class=”author vcard”><a class=”url fn n” href=”‘ . esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ) . ‘”>’ . esc_html( get_the_author() ) . ‘</a></span>’
‘<span class=”author vcard”>’ . esc_html( get_the_author() ) . ‘</span>’
);

//echo ‘<span class=”posted-on”>’ . $posted_on . ‘</span><span class=”byline”> ‘ . $byline . ‘</span>’; // WPCS: XSS OK.
echo ‘<span class=”byline”>’ . $byline . ‘</span><span class=”posted-on”>’ . $posted_on . ‘</span>‘;

Leave a comment

投稿タイトルを非表示にしてみた

Posted on 2020/07/17 - 2020/11/03 by razmil

投稿タイトルを非表示にしてみた

template-parts\content.php

<article id=”post-<?php the_ID(); ?>” <?php post_class( ‘entry’ ); ?>>
<hr>
<header class=”entry-header”>
<?php
if ( is_single() ) {
//the_title( ‘<h1 class=”entry-title”>’, ‘</h1>’ );
} else {
//the_title( ‘<h2 class=”entry-title”><a href=”‘ . esc_url( get_permalink() ) . ‘” rel=”bookmark”>’, ‘</a></h2>’ );
}

if ( ‘post’ === get_post_type() ) : ?>
<div class=”entry-meta”>
<?php micro_posted_on(); ?>
</div><!– .entry-meta –>
<?php
endif; ?>
</header>
<!– .entry-header –>
<hr>

Leave a comment

最近の投稿

  • ヘッダメニューを削除してみた
  • 投稿日時部分を修正してみた
  • 投稿タイトルを非表示にしてみた

最近のコメント

    アーカイブ

    • 2020年7月

    カテゴリー

    • wordpress

    メタ情報

    • ログイン
    • 投稿フィード
    • コメントフィード
    • WordPress.org
    Proudly powered by WordPress | Theme: micro, developed by DevriX.