WordPress.org

Ready to get started?Download WordPress

Forums

Oxygen
Front Page Template override Archives (5 posts)

  1. Aprillicus
    Member
    Posted 1 year ago #

    HI, I am using a static home page and have set it to the front page template. I don't want "recent articles" or "more articles" to appear on this front page. Is there a way to over ride this?
    Thanks,
    April

    http://wordpress.org/extend/themes/oxygen/

  2. eodickso
    Member
    Posted 1 year ago #

    I'm wondering this too!

  3. chrisneylan
    Member
    Posted 1 year ago #

    I just added a text box widget and left it blank and they disappeared.

  4. Mark
    Member
    Posted 1 year ago #

    I'm not sure chrisneylan's reply really answers the question. Here is the most forward-compatible way to do this:

    1. Make an Oxygen child theme by creating a new theme folder (your-theme) and creating a style.css file in that folder with the following content:

    /*
    Theme Name: Oxygen child theme
    Author: Your Name
    Template: oxygen
    */
    
    @import url("../oxygen/style.css");

    2. Copy the file page-template-front.php from the Oxygen theme folder into your new child theme.

    3. Modify the page-template-front.php file in your child theme to delete the two custom loops that are responsible for pulling out "Recent articles" and "More articles".

    The brute way to do this is to remove all of the code that appears between the following two lines:

    <?php do_atomic( 'open_content' ); // oxygen_open_content ?>
    [remove everything in between here, lines 24-131]
    <?php do_atomic( 'close_content' ); // oxygen_close_content ?>

    CSS-only alternative

    Alternatively, if you don't care that posts are loaded and HTML is produced, you can simply hide it using CSS. Follow step 1 above and then add the following line to the child theme's style.css:

    .page-template-front #content { display:none }

    I don't recommend this approach as it just hides the posts instead of not loading them in the first place, but it does work.

  5. chrisnomad
    Member
    Posted 1 year ago #

    I tried this and it worked thanks very much. Can I also remove the date of the posts showing?

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic