WordPress.org

Ready to get started?Download WordPress

Forums

How to get rid of some stuff (19 posts)

  1. Anonymous
    Unregistered
    Posted 10 years ago #

    How do I make it so instead of a full page:
    http://freepgs.com/protegechris/wordpress/
    it only displays the comments I have posted?
    I wish to include this on a frame at
    http://freepgs.com/protegechris/index2.html
    thanks, chris

  2. quasistoic
    Member
    Posted 10 years ago #

    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....

  3. Anonymous
    Unregistered
    Posted 10 years ago #

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

  4. Anonymous
    Unregistered
    Posted 10 years ago #

    Does anyone know how to do this?

  5. eric
    Member
    Posted 10 years ago #

    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

  6. lane
    Member
    Posted 10 years ago #

    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.

  7. OperaManiac
    Member
    Posted 10 years ago #

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

  8. lane
    Member
    Posted 10 years ago #

    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.

  9. Anonymous
    Unregistered
    Posted 10 years ago #

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

  10. Anonymous
    Unregistered
    Posted 10 years ago #

    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?

  11. Anonymous
    Unregistered
    Posted 10 years ago #

    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?

  12. TechGnome
    Moderator
    Posted 10 years ago #

    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

  13. Anonymous
    Unregistered
    Posted 10 years ago #

    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>

  14. Anonymous
    Unregistered
    Posted 10 years ago #

    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">

    </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>

  15. Anonymous
    Unregistered
    Posted 10 years ago #

    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">

    </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]

  16. Anonymous
    Unregistered
    Posted 10 years ago #

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

  17. Randy
    Member
    Posted 10 years ago #

    code goes between backticks. Also, the url to the text file is http://www.freepgs.com/protegechris/code.txt

  18. Anonymous
    Unregistered
    Posted 10 years ago #

    thank you soooo much!
    One last thing.
    How can I get rid of the "Filed Under: General" part, and the weird symbols before "dj protege" on the frame on http://freepgs.com/protegechris/index2.html ?
    thanks again

  19. Anonymous
    Unregistered
    Posted 10 years ago #

    sorry for double post, but I also noticed the comments page is still using the old template, what would be the code to use there?
    By the way, I got rid of the weird symbols I mentioned myself

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.