嗨,大家好我是WP開發新手,這是我的客戶站點:bit.do/dFQtv
我需要在每個博客摘錄下面添加hr
下面閱讀更多部分,如何操作,如果我插入線下閱讀更多按鈕,顯示在單博客文章頁面也如何在wordpress博客上添加<hr>查看區域
這是編碼:(模板零件/ content.php)
<?php
/**
* Template part for displaying posts
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
*
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<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>');
endif;
if ('post' === get_post_type()) : ?>
<h4 class="meta text-muted">
<?php blog_posted_on(); ?>
</h4><!-- .entry-meta -->
<?php
endif; ?>
<!-- AddThis Button BEGIN -->
<div class="addthis_inline_share_toolbox_mzc3" style="margin-bottom:20px;" data-title="<?php the_title() ?>" data-url="<?php the_permalink(); ?>" </div>
<!-- AddThis Button END -->
</header><!-- .entry-header -->
<div class="entry-content">
<?php
the_content(sprintf (
/* translators: %s: Name of current post. */
wp_kses(__('Read more', 'blog'), array('span' => array('class' =>
array()))),
the_title('<span class="screen-reader-text">"', '"</span>', false)
));
wp_link_pages(array(
'before' => '<div class= "page-links">'. esc_html__('Pages:', 'blog'
),
'after' => '</div>',
));
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php blog_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
(模板零件/內容page.php文件)
<?php
/**
* Template part for displaying page content in page.php
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
*
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title('<h1 class="entry-title">', '</h1>'); ?>
</header><!-- .entry-header -->
<div class="entry-content"><hr>
<?php
the_content();
wp_link_pages(array(
'before' => '<div class="page-links">' . esc_html__('Pages:','blog'),
'after' => '</div>',
));
?>
</div><!-- .entry-content -->
<?php if (get_edit_post_link()) : ?>
<footer class="entry-footer">
<?php
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__('Edit %s', 'blog'),
the_title('<span class="screen-reader-text">"', '"</span>', false)
),
'<span class="edit-link">',
'</span>'
);
?>
<hr>
</footer><!-- .entry-footer -->
<?php endif; ?>
</article><!-- #post-## -->
你試過什麼節目代碼 – Nawin
@Nawin array('class'=> array()))),
–
嘗試編輯您的代碼到您的問題,而不是在評論中... – Nawin