WordPress.org

Forums

Ever After
[resolved] slider and controlling content on homepage (8 posts)

  1. face4u
    Member
    Posted 1 year ago #

    Hello, I have 3 sticky posts, because I want the slider on the homepage, but I don't want the last post to be on the homepage, If I can decide which post/page be on homepage while having the slider - that's best. If not - How can I make no posts on homepage...

    My site: http://www.zohara-blessings.com

  2. Hi there, I'm not quite sure I understand what you're aiming for. Would you be able to explain a little bit more, perhaps with screenshot or providing links to specific posts? Thanks!

  3. face4u
    Member
    Posted 1 year ago #

    Hello,

    I took this code below out of index.php, and put my own static code instead. Is there a way to put code I choose from the site like deciding which static page? because the default as I understand is the recent posts... (In order to use the slider...)

    <?php if ( have_posts() ) : ?>

    <?php forever_content_nav( 'nav-above' ); ?>

    <?php

    /**
    * Begin from zero
    */
    rewind_posts();

    while ( have_posts() ) : the_post(); ?>

    <?php get_template_part( 'content', get_post_format() ); ?>

    <?php endwhile; ?>

    <?php forever_content_nav( 'nav-below' ); ?>

    <?php elseif ( ! forever_featured_posts() && ! $recent ) : ?>

    <article id="post-0" class="post no-results not-found">
    <header class="entry-header">
    <h1 class="entry-title"><?php _e( 'Nothing Found', 'forever' ); ?></h1>
    </header><!-- .entry-header -->

    <div class="entry-content">
    <p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'forever' ); ?></p>
    <?php get_search_form(); ?>
    </div><!-- .entry-content -->
    </article><!-- #post-0 -->

    <?php endif; ?>

  4. Dennis Barber
    Member
    Posted 1 year ago #

    If you are changing code/inserting your own code it is always best to create and use a child theme first.

    To use a particular static page as your home page, create the page, then in the admin panel go to Settings > Reading and change the radio button to 'A static page' and select the page you want to use for Front Page and for Blog Posts.

  5. DMBarber is spot-on. By editing theme files directly, you will lose any your changes when you update the theme to the newest version.

    Ever After is a special case, because it is already a child theme of Forever. To create a child theme of Ever After you'd actually need to make a grandchild theme of Forever - here's a tutorial:
    http://www.wp-code.com/wordpress-snippets/wordpress-grandchildren-themes/

    If you have any trouble setting up your static front page following his instructions above, let us know.

    Keep in mind that index.php is meant for the blog index only, not for static pages.

    If you want, you can create a new template file to be used by your static homepage. Here's some information about creating custom templates in WordPress:
    http://codex.wordpress.org/Page_Templates

  6. face4u
    Member
    Posted 1 year ago #

    Thank you for your answers, but it's not what I meant...

    The slider for ever after must have sticky posts... So if I want an active slider I can't do what DMBarber suggests...

    I mean I can, but then I have no slider in this homepage...

    Or... you can tell me how to have the slider on a page which is the home page...

    Do you understand my question now?

  7. You might want to use a slider plugin instead of Forever's built-in slider if you want a slider on a static homepage. It will probably be much easier than trying to adapt the theme. There are tons of slider scripts in the directory:

    http://wordpress.org/plugins/search.php?q=slider

  8. face4u
    Member
    Posted 1 year ago #

    Thank you :)

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.