custome new page archive template for Genesis and childtheme

Hi ,
I use Genesis and Childtheme :

How can i custome new page archive template ?

  • jaavu
    • Site Builder, Child of Zeus

    This is my code in new page archive template file new-archive.php :

    <?php
    /**
     * Genesis Framework.
     *
     * WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances.
     * Please do all modifications in the form of a child theme.
     *
     * @package Genesis\Templates
     * @author  StudioPress
     * @license GPL-2.0+
     * @link    http://my.studiopress.com/themes/genesis/
     */
    
    //* Template Name: NewArchive
    
    //* Remove standard post content output
    remove_action( 'genesis_post_content', 'genesis_do_post_content' );
    remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
    
    add_action( 'genesis_entry_content', 'genesis_page_archive_content' );
    add_action( 'genesis_post_content', 'genesis_page_archive_content' );
    /**
     * This function outputs sitemap-esque columns displaying all pages,
     * categories, authors, monthly archives, and recent posts.
     *
     * @since 1.6
     */
    function genesis_page_archive_content() { ?>
    	<h4><?php _e( 'Danh M?c D?ch V?', 'genesis' ); ?></h4>
    	<div class="one-half first">
    	<ul>
    		<?php wp_list_categories( 'exclude=77,82,54,62,1,65,11,24&title_li=<h2>' . __(' ') . '</h2>' ); ?>
    	</ul>
    	</div>
    	<div class="one-half">
    	<ul>
    		<?php wp_list_categories( 'exclude=77,82,54,62,1,65,36,42,47&title_li=<h2>' . __(' ') . '</h2>' ); ?>
    	</ul>
    	</div>
    
    	<h4><?php _e( 'Các Bài vi?t v? D?ch V? Ph?u Thu?t Th?m M?:', 'genesis' ); ?></h4>
    
    <ul>
    		<?php wp_get_archives( 'type=postbypost&limit=100' ); ?>
    	</ul>
    <?php
    }
    
    genesis();

    With that code, i can only show some category on archive page . You can see this link : http://charmspa.vn/dich-vu

    But i have still 1 problem about post archive :

    <h4><?php _e( 'Các Bài vi?t v? D?ch V? Ph?u Thu?t Th?m M?:', 'genesis' ); ?></h4>
    	<ul>
    		<?php wp_get_archives( 'type=postbypost&limit=100' ); ?>
    	</ul>

    I don’t know how to custome above code to show all posts of only any category .

    With every post will have feature image ,

    Anybody please help me ?

  • jaavu
    • Site Builder, Child of Zeus

    Hi Vinod Dalvi ,

    I mean i want to have archive page have :
    + show list some category .( i could do that )
    + show only all posts of that cateogry - not full posts of all category .

    <h4><?php _e( 'Các Bài vi?t v? D?ch V? Ph?u Thu?t Th?m M?:', 'genesis' ); ?></h4>
    	<ul>
    		<?php wp_get_archives( 'type=postbypost&limit=100' ); ?>
    	</ul>

    That above code only show full posts of all category , i want it only show all posts of some category wich i want .

    Thanks .

  • Vinod Dalvi
    • WP Unicorn

    Hi @jaavu,

    Thanks for your reply.

    You can check the answers posted on the following articles.
    http://www.davidorlo.com/articles/wordpress/wp_get_archives-from-specific-category
    http://wordpress.stackexchange.com/questions/8754/limit-wp-get-archives-by-category

    You can also use this plugin http://kwebble.com/projects/wp-plugin-afac to make it work( his plugin is no longer maintained and not tested with the current version of WordPress, so I suggest you to fully test it on development site before using it on production site )

    If above option don't work for you then consider hiring developer on https://premium.wpmudev.org/wpmu-jobs/ job board so that he will develop one for you.

    Cheers.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.