• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

i want to custome post archive in page archive template

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › i want to custome post archive in page archive template

This topic is: not resolved

Tagged: custom post types, wp_get_archives

  • This topic has 1 reply, 2 voices, and was last updated 12 years, 8 months ago by ramseyp.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • November 12, 2013 at 9:37 pm #72620
    jaa3864
    Member

    Hi ,

    This is my code in new page archive template :

    <?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: Archive2
    
    //* 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>' . __('&nbsp;') . '</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>' . __('&nbsp;') . '</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 .

    Anybody please help me ?

    Thanks .

    http://charmspa.vn/dich-vu
    November 17, 2013 at 1:55 pm #73733
    ramseyp
    Member

    Surprisingly, custom post types are not yet a part of wp_get_archives(). There is a filter you can edit in your functions.php that will work around this, though:

    http://wpsnipp.com/index.php/functions-php/adding-custom-post-types-to-wp_get_archives/

    Cheers!

    Pat


    Community • Work • Conversations

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble