WordPress.org

Ready to get started?Download WordPress

Forums

Spun
[resolved] [closed] Replace Posts with Pages on the Frontpage (12 posts)

  1. rxbbx
    Member
    Posted 1 year ago #

    Hi,

    Is there an easy way to replace the posts on the frontpage (the circle page) by pages. By a quick look, it looks like i have to rewrite the class used in content-home.php.

    I also could use only posts and put my page content in it and make a static header menu with links to those posts.

    But anyhow, what would you suggest? My goal is to use the circle page as my main menu.

    Grtz

  2. Caroline Moore
    Member
    Theme Author

    Posted 1 year ago #

    It's not an easy tweak, as far as I know. I went into it a little bit here:
    http://wordpress.org/support/topic/howto-use-blog-format-for-pages?replies=5

    Probably the second option you've suggested would be easiest, unless you want to modify the loop's main query to pull back pages instead of posts.

  3. rxbbx
    Member
    Posted 1 year ago #

    Thnx for your quick answer.. maybe it would be an idea to create this possibilty in the admin dashboard.. i will try coding pages at the home page in stead of posts..

    My second solution is the quickest, i know it, but i like to code..

    Thnx for your time and respond, nice clear theme by the way..

  4. jeanre
    Member
    Posted 1 year ago #

    If you make your postst sticky they are always up front!
    in combination with smart use of publication date you can arrange their positions.

  5. rxbbx
    Member
    Posted 1 year ago #

    I know, but i will first try to rewrite the php code and use page id in stead of the post id. It are only a few lines of code.

    I just want a static frontpage and use the circles as the main menu.

  6. rxbbx
    Member
    Posted 1 year ago #

    Found the solution by edit the loop in the index.php file and use Class Reference/WP Query : http://codex.wordpress.org/Function_Reference/WP_Query

  7. rxbbx
    Member
    Posted 1 year ago #

    Simple solution:

    edit index.php file located in theme folder:

    <?php /* Display Pages */ ?>
    
    			<?php query_posts('post_type=page'); ?>
    
    			<?php if ( have_posts() ) : ?>
    
    				<?php /* Start the Loop */ ?>
    
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php
    						/* Include the Post-Format-specific template for the content.
    						 * If you want to overload this in a child theme then include a file
    						 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    						 */
    						get_template_part( 'content', 'home' );
    					?>
    
    				<?php endwhile; ?>

    Simply add:

    <?php query_posts('post_type=page'); ?>

    Displays the pages in stead of posts at the frontpage in the circles..

  8. juanrose
    Member
    Posted 1 year ago #

    Hi Rxbbx

    Can you clarify where you posted this code? I pasted it as is in the box but it said there was a syntax error.

    Any help would be appreciated and thank you for identifying a way to do this.

    Much appreciated.

    Great Theme Caroline!

  9. Andrew
    Forum Moderator
    Posted 1 year ago #

    Hi Juanrose, if you create your own thread on your issue, the theme's author and any other volunteer present are more likely to see it.

  10. juanrose
    Member
    Posted 1 year ago #

    Thanks Andrew!

  11. SigridCharlotte
    Member
    Posted 1 year ago #

    Where in the code do you add <?php query_posts('post_type=page'); ?>

  12. LearnGuitarPDX
    Member
    Posted 1 year ago #

    F*ck yeah! Rxbbx, that worked! I am one step closer...
    And BTW, Caroline, thanks so much for making such a lovely theme. It was almost exactly what I imagined my perfect website to be (minus a few minor tweaks). You are awesome.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.