WordPress.org

Ready to get started?Download WordPress

Forums

Suppose I don't want the home page (31 posts)

  1. poster59
    Member
    Posted 1 year ago #

    I know this is a strange request - but my site is more of a book than a blog. Is there any way I can delete the home page? If I trash it - does is delete the whole site? I will want people to view the pages but not the home page.

    Thanks.

    SAndy

  2. bythegram
    Member
    Posted 1 year ago #

    so what do you want people to see when they go to http://www.yoursite.com?

  3. poster59
    Member
    Posted 1 year ago #

    Good question. My plan is to have them see a website home page that will not look exactly like this but this is the general idea (It's going to match the blog style better so it LOOKS like the same site)

    http://www.poouster59.com/

    Then from there, I may have the same menu on the side - but at the very least, it will have a link to the preface of the blog.

    http://poouster59.com/blog/?page_id=206

    Does this make sense?

    The URL won't be poouster59. I'm just building it with that URL. When I publish it, it will be http://www.theheroicself.com

  4. bythegram
    Member
    Posted 1 year ago #

    so I guess keeping in your 'book' concept the "homepage" will be more of a "cover"? That's still very much the 'homepage' just not a typical one.

  5. bythegram
    Member
    Posted 1 year ago #

    this might help static front page

  6. esmi
    Forum Moderator
    Posted 1 year ago #

    A "home" page is merely the page that is shown when someone uses just your site's url (rather than a link to a specific Post or Page). As bythegram suggested, a static front page would seem to be the best choice (live example - NSFW)

  7. poster59
    Member
    Posted 1 year ago #

    Yes,You have the idea. I thought I'd have more options for design with a regular home page. I don't want the Welcome to The Heroic Self or the "date" by Poouster" or Posted in..."

    If I could get rid of the, Archives widgets on all pages I'd be happy. The only reason I'm making it a blog is the author wanted people to be able to post comments. This was the best way I knew of to be able to do that. If I made the cover with a non-wordpress web page I wouldn't be able to support comments on the cover but I could live with that. However, I'd be willing to have a wordpress cover if I could just have a photo and maybe some text. No date or "posted by".

    Sorry if this is confusing.

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    I thought I'd have more options for design with a regular home page.

    Your only limitations are your HTML, PHP & CSS coding skills. You can create a specific template for your home page that will be applied automatically - front-page.php. It's entirely up to you as to what blog functionality (if any) this template includes.

  9. poster59
    Member
    Posted 1 year ago #

    Wow! Love your example. OK so maybe I CAN make a wordpress home page look pretty. Let me try this. Can you tell me how to get rid of the Archives widget? (on all pages)

    Thanks for your help.

  10. esmi
    Forum Moderator
    Posted 1 year ago #

    First of all, don't edit the Twenty Ten theme. Create a child theme for your changes. Or turn your customised version into a new standalone theme. Then, in your new (child or standalone) theme, create a copy of the original Twenty Ten page.php file and call it front-page.php.

    Remove:

    <?php
    /* Run the loop to output the page.
    * If you want to overload this in a child theme then include a file
    * called loop-page.php and that will be used instead.
    */
    get_template_part( 'loop', 'page' );
    ?>

    This pretty much gives you a blank slate. So - what do you want to do next? ;-)

  11. poster59
    Member
    Posted 1 year ago #

    Thanks. I'll give this a try. I'm pretty new at this but I'm determined to learn.

  12. esmi
    Forum Moderator
    Posted 1 year ago #

    If it helps, the site I linked to as an example of static front page has the following in it's front-page.php file:

    <?php get_header('front'); ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div <?php post_class();?>>
    
    <?php the_content(); ?>
    </div>
    <?php endwhile; endif; ?>
    
    <?php get_footer('front');

    So it pulls in a custom header template file (called header-front.php) and a matching custom footer template file (footer-front.php). These three files plus a bit of CSS, an image and some text and you have a completely non-blog-like front page.

  13. poster59
    Member
    Posted 1 year ago #

    Yes. Anything will help. If I get stuck, I'll be back.

  14. esmi
    Forum Moderator
    Posted 1 year ago #

    If you haven't checked it out already, I'd also suggest bookmarking Theme Development.

  15. poster59
    Member
    Posted 1 year ago #

    Thank you. Your directions make sense and I'm making progress. I'm very new at CSS and I'm getting the error
    "Parse error: syntax error, unexpected '<' in /home/pooust5/public_html/blog/wp-content/themes/twentyten/front-page.php on line 35"

    OK so here's the code:

    <?php
    /**
     * The template for displaying all pages.
     *
     * This is the template that displays all pages by default.
     * Please note that this is the WordPress construct of pages
     * and that other 'pages' on your WordPress site will use a
     * different template.
     *
     * @package WordPress
     * @subpackage Twenty_Ten
     * @since Twenty Ten 1.0
     */
    
    get_header(); ?>
    
    		<div id="container">
    
    			<div id="content" role="main">
    
    <?php get_header('front'); ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div <?php post_class();?>>
    
    <?php the_content(); ?>
    </div>
    <?php endwhile; endif; ?>
    
    <?php get_footer('front');
    
    			</div><!-- #content -->
    		</div><!-- #container -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Line "35" is </div><!-- #content -->

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still - use the pastebin. As it stands, your code may now have been permanently damaged/corrupted by the forum's parser.]

  16. bythegram
    Member
    Posted 1 year ago #

    <?php get_footer('front');

    should be

    <?php get_footer('front');>

    you where missing the closing >

  17. poster59
    Member
    Posted 1 year ago #

    That's what I thought but when I put > in, I still got an error. I'll try it again. Myabe I need to hold my tongue right.

  18. esmi
    Forum Moderator
    Posted 1 year ago #

    <?php get_header(); ?>
    <div id="container">
    <div id="content" role="main">
    <?php get_header('front'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div <?php post_class();?>>
    <?php the_content(); ?>
    </div>
    <?php endwhile; endif; ?>
    <?php get_footer('front');?>
    </div><!-- #content -->
    </div><!-- #container -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
  19. bythegram
    Member
    Posted 1 year ago #

    opps good catch esmi I must be sleeping still, I forgot the '?'

  20. poster59
    Member
    Posted 1 year ago #

    Yessss! I also needed a '?' in front of the '>'

    Thanks. You'll probably hear from me again.

  21. poster59
    Member
    Posted 1 year ago #

    OK...so.. another challenge: what files would I alter if I wanted to make a custom menu down the side on ALL the pages? Right now, I got it going down the side using custom menu, but it just looks like a bunch of links listed.

    http://poouster59.com/blog/?page_id=47

    I'd like it to look more like this:

    http://www.theheroicself.blogspot.com/

  22. bythegram
    Member
    Posted 1 year ago #

    I'd suggest posting a new topic now, this is a separate issue, (css related).

  23. poster59
    Member
    Posted 1 year ago #

    OK, Thanks. You've helped a lot.

  24. poster59
    Member
    Posted 1 year ago #

    OK it's getting there.

    http://www.poouster59.com/blog/

    I thought I was successful at making the blank page - but I see that the original menu and the recent comments, archives and meta blah blah blah are at the bottom. How do I delete those?

    Also, I'd like to move the new menu to what I think is the side bar - further right anyway.

  25. bythegram
    Member
    Posted 1 year ago #

    can you use http://pastebin.com/ and paste the code from that page template? it's probably calling <?php get_sidebar(); ?> somewhere.

  26. bythegram
    Member
    Posted 1 year ago #

    that is unless it is the same as previously posted, then it for sure is. Just remove <?php get_footer('front');?> and <?php get_sidebar();?>

    <?php get_header(); ?>
    <div id="container">
    <div id="content" role="main">
    <?php get_header('front'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div <?php post_class();?>>
    <?php the_content(); ?>
    </div>
    <?php endwhile; endif; ?>
    </div><!-- #content -->
    </div><!-- #container -->
    <?php get_footer(); ?>
  27. poster59
    Member
    Posted 1 year ago #

    Thanks. Of of which file? or what code? I'm very new at this and I've never used something like http://pastebin.com/ although, I wouldn't be against trying it the first time.

  28. bythegram
    Member
    Posted 1 year ago #

    I assume you followed esmi instructions from earlier in this thread and created a page template called "front-page.php" which should look like this if you copied and pasted her code:

    <?php
    /**
     * The template for displaying all pages.
     *
     * This is the template that displays all pages by default.
     * Please note that this is the WordPress construct of pages
     * and that other 'pages' on your WordPress site will use a
     * different template.
     *
     * @package WordPress
     * @subpackage Twenty_Ten
     * @since Twenty Ten 1.0
     */
    <?php get_header(); ?>
    <div id="container">
    <div id="content" role="main">
    <?php get_header('front'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div <?php post_class();?>>
    <?php the_content(); ?>
    </div>
    <?php endwhile; endif; ?>
    <?php get_footer('front');?>
    </div><!-- #content -->
    </div><!-- #container -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    If so all you need to do is take out the sidebar and footer(front)

    <?php
    /**
     * The template for displaying all pages.
     *
     * This is the template that displays all pages by default.
     * Please note that this is the WordPress construct of pages
     * and that other 'pages' on your WordPress site will use a
     * different template.
     *
     * @package WordPress
     * @subpackage Twenty_Ten
     * @since Twenty Ten 1.0
     */
    <?php get_header(); ?>
    <div id="container">
    <div id="content" role="main">
    <?php get_header('front'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div <?php post_class();?>>
    <?php the_content(); ?>
    </div>
    <?php endwhile; endif; ?>
    </div><!-- #content -->
    </div><!-- #container -->
    <?php get_footer(); ?>

    I'm hoping that won't break the layout of your site but it's hard to tell without giving it a shot.

  29. poster59
    Member
    Posted 1 year ago #

    Yes, I did make front-page.php with her code. I'll follow your instructions on this. Thank you.

  30. poster59
    Member
    Posted 1 year ago #

    OK! it mostly worked. I took out
    '<?php get_sidebar(); ?>
    <?php get_footer(); ?>'

    that was at the bottom too.

    I'm going to see if I can move the menu on the home page to the right.

    Thanks for your patience.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.