Use this class and style it as you like:
.my-recent-posts-box { *Your style goes here* }
.my-recent-posts-box p { *Your style goes here* }
You can refer here for CSS styling.
Hi Rehzin,
I just visited your blog. I saw the Recent Posts Box shows on every page. If you want it only appear on first page, you can add this:
<?php if ( ! is_paged() ) : ?>
<div class="my-recent-posts-box">
<p>Recent Posts</p>
</div>
<?php endif; ?>
Thread Starter
Rehzin
(@rehzin)
Hello adiazudin,
That’s awesome, where exactly I should add this code?
Also, your website looks very nice, how can I vertical align my “Recent Post” just like yours?
Thank you to you both that are helping me. Hope I can do the same for you at some point.
Hi Rehzin,
The code is same location, in your index.php. Above “div class” you put the <?php if ( ! is_paged() ) : ?> and at the end close with <?php endif; ?>
I just checked your CSS, and it should be like this:
.my-recent-posts-box {
width: auto;
height: 40px;
background-color: #565656;
box-shadow: 3px 3px 1px #888888;
padding-top: 15px;
margin-bottom: 20px;
}
.my-recent-posts-box p {
color: #fff;
font-size: 20px;
margin-left: 20px;
font-family: "Arial";
}
I added padding-top. On text format, doesn’t need to repeat background-color. Enough with background-color for the box.
Thread Starter
Rehzin
(@rehzin)
That’s working! Thank you so much for your help.
In case I want to do the same with the sidebar, is it too difficult? I don’t want to take more of your time so I just want to get an idea and study more about codes and CSS.
For sidebar, you add sidebar Title and customize this in css:
.widget > h3 {
font-size: 20px;
font-weight: normal;
text-transform: uppercase; *Depend on your style*
color: #fff;
width: auto;
height: 40px;
background-color: #565656;
box-shadow: 3px 3px 1px #888888;
padding-top: 15px;
text-align: center; *Depend on your style*
margin-bottom: 6px; *Space between your widget area*
}
@rehzin – if the information from @adiazudin has answered your question please mark this topic as Resolved. Thank you.
Thread Starter
Rehzin
(@rehzin)
Thank you guys! I really appreciate your help. God bless you.