我正在一个Divi网站上工作,该网站的主页上有两个博客网格。我需要将每个博客部分的标题和日期移到底部(博客文本下方)。
<div class="et_pb_blog_grid_wrapper">
<div class="et_pb_blog_grid clearfix et_pb_module et_pb_bg_layout_light et_pb_blog_0" data-columns="3">
<div class="column size-1of3">
<article id="post-226" class="et_pb_post et_pb_no_thumb post-226 post type-post status-publish format-standard has-post-thumbnail hentry category-uncategorized">
<h2><a href="link">Blog Title</a></h2>
<p class="post-meta"> 19 Jun 2015 </p>
blog text here....
</article></div>
<div class="column size-1of3">
<article id="post-216" class="et_pb_post et_pb_no_thumb post-216 post type-post status-publish format-standard hentry category-uncategorized">
<h2><a href="link2">Blog Title 2</a></h2>
<p class="post-meta"> 20 Jun 2015 </p>
blog text here...
</article></div>
<div class="column size-1of3"></div></div>
<!-- .et_pb_posts --></div>
因此,标题和帖子元需要放在博客文本之后。
以下是网站:http://abundancepracticebuilding.com
我知道我需要在PHP的某个地方移动,但我不知道在哪个文件中。我试着在单间移动东西。php,但这只会更改整个博客页面。我想索引。php是正确的文件,因为它包含头和post meta标记,但没有显示我所更改的内容。所以我认为它是在函数中。php,但我不知道在哪里。。。可能是因为我还在学习详细的PHP。
我以为这些部分就是它:
<?php
/* Blog Meta */
$et_pb_print_selectors_post_meta = "body.home-posts #left-area .et_pb_post .post-meta, body.archive #left-area .et_pb_post .post-meta, body.search #left-area .et_pb_post .post-meta, body.single #left-area .et_pb_post .post-meta";
et_pb_print_styles_css( array(
array(
\'key\' => \'post_meta_height\',
\'type\' => \'line-height\',
\'default\' => \'1\',
\'selector\' => $et_pb_print_selectors_post_meta,
),
array(
\'key\' => \'post_meta_spacing\',
\'type\' => \'letter-spacing\',
\'default\' => \'0\',
\'selector\' => $et_pb_print_selectors_post_meta,
),
array(
\'key\' => \'post_meta_style\',
\'type\' => \'font-style\',
\'default\' => \'\',
\'selector\' => $et_pb_print_selectors_post_meta,
),
) );
/* Blog Title */
$et_pb_print_selectors_post_header = "body.home-posts #left-area .et_pb_post h2, body.archive #left-area .et_pb_post h2, body.search #left-area .et_pb_post h2, body.single .et_post_meta_wrapper h1";
et_pb_print_styles_css( array(
array(
\'key\' => \'post_header_height\',
\'type\' => \'line-height\',
\'default\' => \'1\',
\'selector\' => $et_pb_print_selectors_post_header,
),
array(
\'key\' => \'post_header_spacing\',
\'type\' => \'letter-spacing\',
\'default\' => \'0\',
\'selector\' => $et_pb_print_selectors_post_header,
),
array(
\'key\' => \'post_header_style\',
\'type\' => \'font-style\',
\'default\' => \'\',
\'selector\' => $et_pb_print_selectors_post_header,
),
) );
?>
但移动它们也没有任何作用。有人能给我指出正确的方向吗?我觉得我已经尝试了我能想到的一切。
这是第页中的代码。php文件:
<?php
get_header();
$is_page_builder_used = et_pb_is_pagebuilder_used( get_the_ID() );
?>
<div id="main-content">
<?php if ( ! $is_page_builder_used ) : ?>
<div class="container">
<div id="content-area" class="clearfix">
<div id="left-area">
<?php endif; ?>
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( ! $is_page_builder_used ) : ?>
<h1 class="main_title"><?php the_title(); ?></h1>
<?php
$thumb = \'\';
$width = (int) apply_filters( \'et_pb_index_blog_image_width\', 1080 );
$height = (int) apply_filters( \'et_pb_index_blog_image_height\', 675 );
$classtext = \'et_featured_image\';
$titletext = get_the_title();
$thumbnail = get_thumbnail( $width, $height, $classtext, $titletext, $titletext, false, \'Blogimage\' );
$thumb = $thumbnail["thumb"];
if ( \'on\' === et_get_option( \'divi_page_thumbnails\', \'false\' ) && \'\' !== $thumb )
print_thumbnail( $thumb, $thumbnail["use_timthumb"], $titletext, $width, $height );
?>
<?php endif; ?>
<div class="entry-content">
<?php
the_content();
if ( ! $is_page_builder_used )
wp_link_pages( array( \'before\' => \'<div class="page-links">\' . __( \'Pages:\', \'Divi\' ), \'after\' => \'</div>\' ) );
?>
</div> <!-- .entry-content -->
<?php
if ( ! $is_page_builder_used && comments_open() && \'on\' === et_get_option( \'divi_show_pagescomments\', \'false\' ) ) comments_template( \'\', true );
?>
</article> <!-- .et_pb_post -->
<?php endwhile; ?>
<?php if ( ! $is_page_builder_used ) : ?>
</div> <!-- #left-area -->
<?php get_sidebar(); ?>
</div> <!-- #content-area -->
</div> <!-- .container -->
<?php endif; ?>
</div> <!-- #main-content -->
<?php get_footer(); ?>