Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: My Custom Archive Page
- Note:
- 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.
- 2. Set your desired title in line 19. If no title should appear, delete this line.
- 3. The code in this is just a copy of archive.php. Only additions are this commented header area and line 21.
- */
- ?>
- <?php
- function render_content() {
- global $wp_theme_options;
- ?>
- <?php if ( have_posts() ) : ?>
- <h4 class="page-title">Enter the title for this page here</h4>
- <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=1&paged=$paged"); ?>
- <?php while ( have_posts() ) : // The Loop ?>
- <?php the_post(); ?>
- <div class="magazine-post" style="width: <?php echo $wp_theme_options["home_width"] ?>px;">
- <?php /*the_author_posts_link();*/ ?>
- <?php /*the_time(__('l, F j, Y', 'Builder'));*/ ?>
- <?php if (has_post_thumbnail()) { ?>
- <div class="front-page-thumbnail">
- <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail( 'front-page-thumbnail' ); ?></a>
- </div>
- <?php } ?>
- <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 -->
- <div class="post-content">
- <?php the_excerpt(); ?>
- </div>
- </div>
- <?php endwhile; // end of one post ?>
- <!-- Previous/Next page navigation -->
- <div class="paging clearfix">
- <div class="alignleft"><?php previous_posts_link( __( '« Previous Page', 'it-l10n-BuilderChild-Ionic-Sky' ) ); ?></div>
- <div class="alignright"><?php next_posts_link( __( 'Next Page »', 'it-l10n-BuilderChild-Ionic-Sky' ) ); ?></div>
- </div>
- <?php else : // do not delete ?>
- <?php do_action( 'builder_template_show_not_found' ); ?>
- <?php endif; // do not delete ?>
- <?php
- }
- add_action( 'builder_layout_engine_render_content', 'render_content' );
- do_action( 'builder_layout_engine_render', basename( __FILE__ ) );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement