View difference between Paste ID: b67Fg3Qu and
SHOW: | | - or go back to the newest paste.
1-
1+
<?php 
2
/*
3
Template Name: My Custom Archive Page
4
5
Note:
6
7
1. Edit line 21 to set the ID of category in "cat=1&paged=$paged" from which posts should be shown on the Page to which this template is applied.
8
2. Set your desired title in line 19. If no title should appear, delete this line.
9
3. The code in this is just a copy of archive.php. Only additions are this commented header area and line 21.
10
*/
11
?>
12
13
<?php
14
15
function render_content() {
16
	global $wp_theme_options;
17
?>
18
	<?php if ( have_posts() ) : ?>
19
		<h4 class="page-title">Enter the title for this page here</h4>
20
		
21
	        <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=1&paged=$paged"); ?>
22
		
23
		<?php while ( have_posts() ) : // The Loop ?>
24
			<?php the_post(); ?>
25
		<div class="magazine-post" style="width: <?php echo $wp_theme_options["home_width"] ?>px;">
26
			<?php /*the_author_posts_link();*/ ?>
27
			<?php /*the_time(__('l, F j, Y', 'Builder'));*/ ?>
28
			
29
			<?php if (has_post_thumbnail()) { ?>
30
			<div class="front-page-thumbnail">
31
				<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail( 'front-page-thumbnail' ); ?></a>
32
			</div>
33
			<?php } ?>
34
35
			<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
36
			
37
			<!--post text with the read more link -->
38
			<div class="post-content">
39
				<?php the_excerpt(); ?>
40
			</div>
41
		</div>
42
	
43
	<?php endwhile; // end of one post ?>
44
45
		
46
		<!-- Previous/Next page navigation -->
47
		<div class="paging clearfix">
48
			<div class="alignleft"><?php previous_posts_link( __( '&laquo; Previous Page', 'it-l10n-BuilderChild-Ionic-Sky' ) ); ?></div>
49
			<div class="alignright"><?php next_posts_link( __( 'Next Page &raquo;', 'it-l10n-BuilderChild-Ionic-Sky' ) ); ?></div>
50
		</div>
51
	<?php else : // do not delete ?>
52
		<?php do_action( 'builder_template_show_not_found' ); ?>
53
	<?php endif; // do not delete ?>
54
<?php
55
	
56
}
57
58
add_action( 'builder_layout_engine_render_content', 'render_content' );
59
60
do_action( 'builder_layout_engine_render', basename( __FILE__ ) );
61
62
63
?>