how do I get rid of the blog text on my front page? (15 posts)

  1. dmalderman
    Posted 4 years ago #

    Still new to this, but I like what I see.
    I'm playing around with a static page layout. How do I get rid of the "Search" bar, the "Recent Posts" text, and the "Powered by WordPress" at the bottom?

  2. christogeretz
    Posted 4 years ago #

    Just edit the template for the theme you're using!

  3. dmalderman
    Posted 4 years ago #

    Sorry - I have no idea how to do that. Where do I find that?
    Pages? Posts? Appearance? Settings? I don't see anything called "template."

  4. christogeretz
    Posted 4 years ago #

    To find out what template you are currently using, go to Pages > All Pages, hit "quick edit" on any of your pages, and look for what's in the drop-down beside "template:".

    Then go Appearance > Editor.

    On the far right will be a list of all the files associated with the theme you're using ... you'll probably be looking for something like "Page Template (page.php)".

    Once you're looking at the template, you can just start deleting bits of code that relate to what you're trying to get rid of.

    For some of the items (search box?) you may need to check out Appearance > Widgets .. pretty self-explanatory once you have a look!

    Let me know if this helps.

  5. christogeretz
    Posted 4 years ago #

    Also, check out Settings > Permalinks and figure out if you want your page URLs to read "http://www.coopjackdesign.com/?page_id=46" or "http://www.coopjackdesign.com/portfolio" :)

    (that's done by putting this in the 'custom structure': /%postname% )


  6. cbdeland
    Posted 4 years ago #

    I'm new to WordPress, too, and I have the same question. In the editor for page.php, rather than deleting bits of code, I'd rather comment them out. What is the comment character? Is it /* comment */ ?

    Thanks, Cy

  7. christogeretz
    Posted 4 years ago #

  8. cbdeland
    Posted 4 years ago #

    Actually, <?php xxxx ?> was my first guess, but the whole page is commented out except for
    <div id="content" role="main"> comment, comment, comment </div>

    Is that so? I'm using the Weaver II theme and want to get rid of all the stuff in the body of the default home page.

  9. cbdeland
    Posted 4 years ago #

    I was not looking at the right templates. The list of templates on the 2 pages I have created are: 2 Col Content (split w/ <!-more->), Blank, Page with Posts, Raw, Sitemap, and iframe. When I look at Page with Posts, this line appears to be commented out, but that is what actually appears on the default Home page:
    <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.','weaver-ii'); ?></p>

    Based on the codex page about comments, I would expect the entire line to be a comment. Am I not interpreting the comment correctly?

  10. cbdeland
    Posted 4 years ago #

    oops, I should have added Default Template to the list of templates that are in the drop down. However, I cannot find Default Template in the list of templates on the Editor page.

  11. President McCheese
    Posted 4 years ago #

    <?php xxxx ?> That is not a comment. That is a PHP declaration; a bit of server-side coding.

    Here is a clean slate for you. Save it as home.php in your template folder. Backup your original first! -

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    	<meta charset="<?php bloginfo( 'charset' ); ?>" />
    <meta name="viewport" content="width=device-width" />
    	 * Print the <title> tag based on what is being viewed.
    	global $page, $paged, $current_user, $user_ID;
    	wp_title( '|', true, 'right' );
    	// Add the blog name.
    	bloginfo( 'name' );
    	// Add the blog description for the home/front page.
    	$site_description = get_bloginfo( 'description', 'display' );
    	if ( $site_description && ( is_home() || is_front_page() ) )
    		echo " | $site_description";
    	// Add a page number if necessary:
    	if ( $paged >= 2 || $page >= 2 )
    		echo ' | ' . sprintf( __( 'Page %s', 'webxexutive' ), max( $paged, $page ) );
    <link rel="profile" href="http://gmpg.org/xfn/11" />
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <!--[if lt IE 9]>
    <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
    <?php wp_head(); ?>
    <body data-logged_in="<?php if('' == $user_ID){ echo 'false'; }else{ echo 'true'; } ?>" data-home_url="<?php echo home_url(); ?>" data-image_path="<?php echo get_stylesheet_directory_uri(); ?>/images/" data-theme_path="<?php echo get_stylesheet_directory_uri(); ?>" data-user_login="<?php echo $current_user->user_login; ?>" data-user_email="<?php echo $current_user->user_email; ?>" data-user_level="<?php echo $current_user->user_level; ?>" data-user_firstname="<?php echo $current_user->user_firstname; ?>" data-user_lastname="<?php echo $current_user->user_lastname; ?>" data-display_name="<?php echo $current_user->display_name; ?>" data-user_id="<?php echo $current_user->ID; ?>" data-search_page="<?php if('Search' == $_REQUEST['submit'] && '' != $_REQUEST['s']){ echo 'true'; }else{ echo 'false'; } ?>" data-search_term="<?php if('Search' == $_REQUEST['submit'] && '' != $_REQUEST['s']){ echo htmlentities(strip_tags($_REQUEST['s'])); }else{ echo ''; } ?>" >
    <div id="wrapper">
    <?php wp_footer(); ?>
  12. cbdeland
    Posted 4 years ago #

    Thanks, but I don't have a home.php. At least, it's not in the list of templates in the Editor section. How can I find it? Or how can I create it?

  13. President McCheese
    Posted 4 years ago #

    Create it locally with a text editor and upload it to your theme.

  14. dmalderman
    Posted 4 years ago #

    Thanks. I found what I was looking for in --
    • Footer.php to delete the Proudly Powered by WordPress link at the bottom ...
    • Set template to Default instead of Showcase to get rid of the "Recent Posts" text ... and
    • Header.php allowed me to get rid of the search bar.

    Cool. It makes me really nervous deleting code, though. I don't really have a big-picture idea of hoe everything goes together!

  15. christogeretz
    Posted 4 years ago #

    Don't forget, all you've got to do is reinstall the theme to revert all changes :)

    Make a backup! (Good plugin for this is Backup-WP)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.