如何在WordPress中在文章标题上方添加标题
我想在所有帖子的标题之上添加一个附加到URL的标题。如何使用CSS或Jquery实现它 具体请参见下图如何在WordPress中在文章标题上方添加标题,wordpress,wordpress-theming,custom-wordpress-pages,Wordpress,Wordpress Theming,Custom Wordpress Pages,我想在所有帖子的标题之上添加一个附加到URL的标题。如何使用CSS或Jquery实现它 具体请参见下图 这可以通过多种方式实现 您可以在每篇文章中安装插件ACF add post meta字段 在主题文件中打开index.php,或者在获取所有帖子的地方打开模板文件 ** 确保将代码粘贴到文件中的适当位置,并确保粘贴在此行之后: <?php while ( have_posts() ) : the_post(); ?> And before: <?php endwh
这可以通过多种方式实现
<?php while ( have_posts() ) : the_post(); ?>
And before:
<?php endwhile; // end of the loop. ?>
Use the following snipped to embed the metadata, changing the class name, field name and HTML formatting as required.
<p class="myfieldname"><?php the_field('Field_Name'); ?></p>
Save the file, and head to your site’s front-end to review.
在以下日期之前:
使用以下代码嵌入元数据,根据需要更改类名、字段名和HTML格式。
保存文件,然后前往站点前端查看。
**以下是我如何做到这一点的
你能把它分解一下吗?你把代码和解释混在一起了。