Education theme, create custom loop

Community Forums Forums Design Tips and Tricks Education theme, create custom loop

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  yaneiryscruz 4 months, 1 week ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #78427

    yaneiryscruz
    Member
    Post count: 4

    Hello, I’m using the Education theme, I want to use the default layout but I’d like to show an specific page instead the latest blog posts.
    Right now I’m hiding the posts, but I don’t know how to show a page by id.
    I’m trying with this code, but it doesn’t work,

    /** To remove the posts from the bottom of the home page */
    remove_action( ‘genesis_loop’, ‘genesis_do_loop’ );

    /* Show the page ID */
    add_action(‘genesis_loop’, ‘custom_loop’);
    function custom_loop() {
    global $paged;

    $args = array(‘post_type’ => ‘page’);
    // Accepts WP_Query args
    // (http://codex.wordpress.org/Class_Reference/WP_Query)

    $query = new WP_Query( ‘page_id=68′ );
    genesis_custom_loop( $args );
    }
    genesis();

    Please, I need some help!
    Thanks in advance,
    Have a great day!

    http://ucs.jumptoweb.com
    #78481

    braddalton
    Participant
    Post count: 7478
    #78496

    yaneiryscruz
    Member
    Post count: 4

    Brandon, thanks…
    But, using that function I can add pages to the loop, but I only want to show a single page, an specific page in the homepage

    #78507

    braddalton
    Participant
    Post count: 7478

    Just use the Reading Settings.


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #78545

    yaneiryscruz
    Member
    Post count: 4

    When I use the reading settings and select my front page to display a static page, I lose the slider, the features, etc..

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.