WordPress.org

Support

Support » How-To and Troubleshooting » How to get rid of some stuff

How to get rid of some stuff

Viewing 15 replies - 1 through 15 (of 18 total)
  • Not sure I understand the rquest:
    Do you want to display only the comments on a particular post? I believe I saw a hack for this somewhere….

    I only want to display say the last 5 posts, and then the archives list

    Does anyone know how to do this?

    in the admin interface under “reading” you can select how many posts to show. having said that it doesn’t work for me. although i suspect i broke it with some hacking. try it out… archives you always get, and if you want to get rid of links, calndar etc., just edit those things out of your index.php

    Try an RSS reader like MyHeadlines:
    http://www.jmagar.com/index.php?y=0&myh=user&myh_op=showLink&myh_link=1
    Essentially, WordPress would then become a backend system and you would use MyHeadlines to read the content from it and display what you want within your inline frame.

    do want something like this?
    http://www.searchenginejournal.com/

    I think he’s trying to just include the posts into the inline frame on the second page so he can create more of GUI. I suppose you could copy index.php of your WordPress install and name it content.php then delete the menu and header tags. You would just have this between the <body></body> tags:

    <div id="content">
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <?php the_date('','<h2>','</h2>'); ?>
    <div class="post">
    <h3 class="storytitle" id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></h3>
    <div class="meta"><?php _e("Filed under:"); ?> <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
    <div class="storycontent">
    <?php the_content(); ?>
    </div>
    <div class="feedback">
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    </div>
    <!--
    <?php trackback_rdf(); ?>
    -->
    <?php include(ABSPATH . 'wp-comments.php'); ?>
    </div>

    You could then use the popups for reading more of the article and/or comments.

    awesome! ill try this later today, and post backif something goes wrong

    Ok, I have made the blog.php file into the following code. No matter where it is, I ALWAYS get a parse error on the last line which reads “</html>”
    <!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”>
    <head>
    </head>
    <body>
    <div id=”content”>
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <?php the_date(”,'<h2>’,'</h2>’); ?>
    <div class=”post”>
    <h3 class=”storytitle” id=”post-<?php the_ID(); ?>”>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”><?php the_title(); ?></h3>
    <div class=”meta”><?php _e(“Filed under:”); ?> <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
    <div class=”storycontent”>
    <?php the_content(); ?>
    </div>
    <div class=”feedback”>
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__(‘Comments (0)’), __(‘Comments (1)’), __(‘Comments (%)’)); ?>
    </div>
    <?php include(ABSPATH . ‘http://www.freepgs.com/protegechris/wordpress/wp-comments.php’); ?>
    </div>
    </body>
    </html>
    Do you know whay I did wrong?

    ok, my new code is
    <!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”>
    <head>
    <?php
    /*Don’t remove this line. */
    require(‘./wordpress/wp-blog-header.php’);
    ?>
    </head>
    <body>
    <div id=”content”>
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <?php the_date(”,'<h2>’,'</h2>’); ?>
    <div class=”post”>
    <h3 class=”storytitle” id=”post-<?php the_ID(); ?>”>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”><?php the_title(); ?></h3>
    <div class=”meta”><?php _e(“Filed under:”); ?> <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
    <div class=”storycontent”>
    <?php the_content(); ?>
    </div>
    <div class=”feedback”>
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__(‘Comments (0)’), __(‘Comments (1)’), __(‘Comments (%)’)); ?>
    </div>
    <?php include(ABSPATH . ‘http://www.freepgs.com/protegechris/wordpress/wp-comments.php’); ?>
    </div>
    </body>
    </html>
    But i get an error on line 133, line 133 is the </html>
    ..Grr lol. Do you know whative done wrong?

    TechGnome

    @techgnome

    Moderator

    the code:
    <?php
    /*Don't remove this line. */
    require('./wordpress/wp-blog-header.php');
    ?>

    MUST be the FIRST thing in the file. It need to go ABOVE the <!DOCTYPE tag…..
    TG

    i made the code new now, and stilll get an error onte /html line.
    <?php
    /*Don’t remove this line. */
    require(‘http://www.freepgs.com/protegechris/wordpress/wp-blog-header.php’);
    ?>
    <!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”>
    <head>
    </head>
    <body>
    <div id=”content”>
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <?php the_date(”,'<h2>’,'</h2>’); ?>
    <div class=”post”>
    <h3 class=”storytitle” id=”post-<?php the_ID(); ?>”>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”><?php the_title(); ?></h3>
    <div class=”meta”><?php _e(“Filed under:”); ?> <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
    <div class=”storycontent”>
    <?php the_content(); ?>
    </div>
    <div class=”feedback”>
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__(‘Comments (0)’), __(‘Comments (1)’), __(‘Comments (%)’)); ?>
    </div>
    <?php include(ABSPATH . ‘http://www.freepgs.com/protegechris/wordpress/wp-comments.php’); ?>
    </div>
    </body>
    </html>

    Ok, I have remade the code, and it successful puts the full blog page into my frame
    at http://www.freepgs.com/protegechris/index2.html
    Does anyoine think they could take this code, and revise it to show only the text, and a link to a popup window to show the archives? Thanks!
    <?php
    /* Don’t remove this line. */
    require(‘wordpress/wp-blog-header.php’);
    ?>
    <!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”>
    <head profile=”http://gmpg.org/xfn/1″>
    <title><?php bloginfo(‘name’); ?><?php wp_title(); ?></title>
    <meta http-equiv=”Content-Type” content=”text/html; charset=<?php bloginfo(‘charset’); ?>” />
    <meta name=”generator” content=”WordPress <?php bloginfo(‘version’); ?>” /> <!– leave this for stats –>
    <style type=”text/css” media=”screen”>
    @import url( <?php echo get_settings(‘siteurl’); ?>/wp-layout.css );
    </style>
    <link rel=”stylesheet” type=”text/css” media=”print” href=”<?php echo get_settings(‘siteurl’); ?>/print.css” />
    <link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”<?php bloginfo(‘rss2_url’); ?>” />
    <link rel=”alternate” type=”text/xml” title=”RSS .92″ href=”<?php bloginfo(‘rss_url’); ?>” />
    <link rel=”alternate” type=”application/atom+xml” title=”Atom 0.3″ href=”<?php bloginfo(‘atom_url’); ?>” />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />
    <?php wp_get_archives(‘type=monthly&format=link’); ?>
    <?php //comments_popup_script(); // off by default ?>
    <?php wp_head(); ?>
    </head>
    <body>
    <div id=”rap”>
    <h1 id=”header”>“><?php bloginfo(‘name’); ?></h1>
    <div id=”content”>
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <?php the_date(”,'<h2>’,'</h2>’); ?>
    <div class=”post”>
    <h3 class=”storytitle” id=”post-<?php the_ID(); ?>”>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”><?php the_title(); ?></h3>
    <div class=”meta”><?php _e(“Filed under:”); ?> <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
    <div class=”storycontent”>
    <?php the_content(); ?>
    </div>
    <div class=”feedback”>
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__(‘Comments (0)’), __(‘Comments (1)’), __(‘Comments (%)’)); ?>
    </div>
    <?php include(ABSPATH . ‘wp-comments.php’); ?>
    </div>
    <?php endforeach; else: ?>
    <?php _e(‘Sorry, no posts matched your criteria.’); ?>
    <?php endif; ?>
    </div>
    <div id=”menu”>

      <?php get_links_list(); ?>
      <li id=”categories”><?php _e(‘Categories:’); ?>
      <?php wp_list_cats(); ?>

    <li id=”search”>
    <label for=”s”><?php _e(‘Search:’); ?></label>
    <form id=”searchform” method=”get” action=”<?php echo $PHP_SELF; ?>”>
    <div>
    <input type=”text” name=”s” id=”s” size=”15″ />
    <input type=”submit” name=”submit” value=”<?php _e(‘Search’); ?>” />
    </div>
    </form>

    <li id=”archives”><?php _e(‘Archives:’); ?>

      <?php wp_get_archives(‘type=monthly’); ?>

    <li id=”calendar”>
    <?php get_calendar(); ?>

    <li id=”other”><?php _e(‘Other:’); ?>

    <li id=”meta”><?php _e(‘Meta:’); ?>

    </div>
    </div>
    <p class=”credit”><!–<?php echo $wpdb->num_queries; ?> queries. <?php timer_stop(1); ?> seconds. –> <cite><?php echo sprintf(__(“Powered by WordPress“), __(“Powered by WordPress, state-of-the-art semantic personal publishing platform”)); ?></cite>
    </body>
    </html>

    sorry, it didnt post corre4ctly
    [code]<?php
    /* Don’t remove this line. */
    require(‘wordpress/wp-blog-header.php’);
    ?>
    <!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”>
    <head profile=”http://gmpg.org/xfn/1″>
    <title><?php bloginfo(‘name’); ?><?php wp_title(); ?></title>
    <meta http-equiv=”Content-Type” content=”text/html; charset=<?php bloginfo(‘charset’); ?>” />
    <meta name=”generator” content=”WordPress <?php bloginfo(‘version’); ?>” /> <!– leave this for stats –>
    <style type=”text/css” media=”screen”>
    @import url( <?php echo get_settings(‘siteurl’); ?>/wp-layout.css );
    </style>
    <link rel=”stylesheet” type=”text/css” media=”print” href=”<?php echo get_settings(‘siteurl’); ?>/print.css” />
    <link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”<?php bloginfo(‘rss2_url’); ?>” />
    <link rel=”alternate” type=”text/xml” title=”RSS .92″ href=”<?php bloginfo(‘rss_url’); ?>” />
    <link rel=”alternate” type=”application/atom+xml” title=”Atom 0.3″ href=”<?php bloginfo(‘atom_url’); ?>” />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />
    <?php wp_get_archives(‘type=monthly&format=link’); ?>
    <?php //comments_popup_script(); // off by default ?>
    <?php wp_head(); ?>
    </head>
    <body>
    <div id=”rap”>
    <h1 id=”header”>“><?php bloginfo(‘name’); ?></h1>
    <div id=”content”>
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <?php the_date(”,'<h2>’,'</h2>’); ?>
    <div class=”post”>
    <h3 class=”storytitle” id=”post-<?php the_ID(); ?>”>” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”><?php the_title(); ?></h3>
    <div class=”meta”><?php _e(“Filed under:”); ?> <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
    <div class=”storycontent”>
    <?php the_content(); ?>
    </div>
    <div class=”feedback”>
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__(‘Comments (0)’), __(‘Comments (1)’), __(‘Comments (%)’)); ?>
    </div>
    <?php include(ABSPATH . ‘wp-comments.php’); ?>
    </div>
    <?php endforeach; else: ?>
    <?php _e(‘Sorry, no posts matched your criteria.’); ?>
    <?php endif; ?>
    </div>
    <div id=”menu”>

      <?php get_links_list(); ?>
      <li id=”categories”><?php _e(‘Categories:’); ?>
      <?php wp_list_cats(); ?>

    <li id=”search”>
    <label for=”s”><?php _e(‘Search:’); ?></label>
    <form id=”searchform” method=”get” action=”<?php echo $PHP_SELF; ?>”>
    <div>
    <input type=”text” name=”s” id=”s” size=”15″ />
    <input type=”submit” name=”submit” value=”<?php _e(‘Search’); ?>” />
    </div>
    </form>

    <li id=”archives”><?php _e(‘Archives:’); ?>

      <?php wp_get_archives(‘type=monthly’); ?>

    <li id=”calendar”>
    <?php get_calendar(); ?>

    <li id=”other”><?php _e(‘Other:’); ?>

    <li id=”meta”><?php _e(‘Meta:’); ?>

    </div>
    </div>
    <p class=”credit”><!–<?php echo $wpdb->num_queries; ?> queries. <?php timer_stop(1); ?> seconds. –> <cite><?php echo sprintf(__(“Powered by WordPress“), __(“Powered by WordPress, state-of-the-art semantic personal publishing platform”)); ?></cite>
    </body>
    </html>[/code]

    i uploaded the code to a txt file, since it wont post correctly on here.
    http://www.freepg.com/protegechris/code.txt

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘How to get rid of some stuff’ is closed to new replies.