Ionic
m (→How to show a certain number of posts full width in the content area with remaining posts in columns) |
(Added "How to create a page that shows posts from a category") |
||
| Line 149: | Line 149: | ||
Thanks to: Ronald. | Thanks to: Ronald. | ||
| + | |||
| + | =How to create a page that shows posts from a category= | ||
| + | |||
| + | Let's say there's a category called "Music News" in your site. | ||
| + | |||
| + | If pretty permalinks are enabled, then posts from this category will appear at <code>http://www.yoursite.com/category/music-news</code> w/o us having to do anything special. | ||
| + | |||
| + | This section will provide instructions on how to create a Page template which when applied to a Page will show the posts from a specified category besides the above standard category page. | ||
| + | |||
| + | # Download http://pastebin.com/b67Fg3Qu, (re)name it as page-customarchive.php and upload it to your theme directory. | ||
| + | # Create a new blank Page, set the template to "My Custom Archive Page" and publish it. | ||
Revision as of 04:41, February 8, 2011
Edit theme's style.css.
Change
.builder-module-navigation {
font-size: 1em;
background: transparent url('images/nav-bg.png') bottom;
display: block;
width: 99%;
margin: 0em auto;
}
to
.builder-module-navigation {
font-size: 1em;
background: transparent url('images/nav-bg.png') bottom;
display: block;
width: 100%;
margin: 0em auto;
}
and
.builder-module-navigation ul {
float: left;
display: block;
background: url('images/nav-top-shadow.png') repeat-x;
margin: 0;
padding: 0;
width: 99%;
}
to
.builder-module-navigation ul {
float: left;
display: block;
background: url('images/nav-top-shadow.png') repeat-x;
margin: 0;
padding: 0;
width: 100%;
}
Thanks to Dana.
Adding date below post titles on Posts page
Edit index.php under wp-content/themes/BuilderChild-Ionic
Change
<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3> <!--post text with the read more link -->
to
<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3> <div class="date"> <span class="weekday"><?php the_time( 'l' ); ?><span class="weekday-comma">,</span></span> <span class="month"><?php the_time( 'F' ); ?></span> <span class="day"><?php the_time( 'j' ); ?><span class="day-suffix"><?php the_time( 'S' ); ?></span><span class="day-comma">,</span></span> <span class="year"><?php the_time( 'Y' ); ?></span> </div> <!--post text with the read more link -->
- Before and After
Changing the width of each block on the Posts page
Add the following at the end of your theme's style.css:
.builder-module-content .magazine-post {
width: 280px !important;
}
Change 280px in the above to your desired value.
How to show a certain number of posts full width in the content area with remaining posts in columns
- Before and After
Take a backup of your theme's current index.php and replace its content with the code here.
Set the value of $wideposts in line 23 to the number of wide posts that should appear above the posts in columns.
If you want to filter the query to do stuff like excluding posts from a certain category by passing parameters, then modify line 22.
For example, changing it to the following will exclude the posts from a category whose ID is 24.
$my_query->query('paged='.$paged . '&posts_per_page=' . get_option('posts_per_page') . '&cat=-24');
Add the following at the end of your theme's style.css:
.widecol {
padding: 0 10px;
}
.widecol h3 {
font-family: 'Yanone Kaffeesatz', 'Trebuchet MS', arial, sans-serif;
margin-top: .2em;
margin-bottom: 0;
font-size: 2.8em;
}
.widecol h3 a {
color: #333;
margin-top: 0;
margin-bottom: 0;
}
.widecol h3 a:hover {
color: #777;
}
.widecol .front-page-thumbnail {
float: left;
margin-right: 1em;
}
.widecol .post-content {
clear: none;
}
If your blog posts have thumbnails, Posts page is going to look like this: http://d.pr/7MiU
Thanks to: Ronald.
How to create a page that shows posts from a category
Let's say there's a category called "Music News" in your site.
If pretty permalinks are enabled, then posts from this category will appear at http://www.yoursite.com/category/music-news w/o us having to do anything special.
This section will provide instructions on how to create a Page template which when applied to a Page will show the posts from a specified category besides the above standard category page.
- Download http://pastebin.com/b67Fg3Qu, (re)name it as page-customarchive.php and upload it to your theme directory.
- Create a new blank Page, set the template to "My Custom Archive Page" and publish it.