Forums

Only First Letter of Post Showing (17 posts)

  1. katbob
    Member
    Posted 4 years ago #

    I'm working on a WP powered site and recently, the entire post has stopped showing up. Only the first letter shows up. It's a Page and I copied the code from the default page.php into my template:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    <h2><?php the_title(); ?></h2>
    <div class="entrytext">
    <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>

    <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>

    </div>
    </div>
    <?php endwhile; endif; ?>
    <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>

    What am I doing wrong? I am a WP newbie, by the way, so I'd appreciate any help you can offer.

    Thanks!
    kat

  2. katbob
    Member
    Posted 4 years ago #

    umm...and that link would be....

    http://www.createworship.org/d6/?page_id=12

  3. katbob
    Member
    Posted 4 years ago #

    I just tried switching themes, and the default theme works. So the problem must be in the code above. Can anyone tell if anything looks off? The weird thing is that I copied this straight from the default theme. I really need some help on this one. Thanks!
    kat

  4. TechGnome
    Moderator
    Posted 4 years ago #

    That is weird.... try this....
    Change you call to the_content.... from this:
    <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>

    To this:
    <?php the_content('Read the rest of this page &raquo;'); ?>

    Just to rule out that having any impact on this.

    Also are you trying to actualy display a post, or a page? That may have an impact on how the_content works.

    Tg
    btw: Nice site... like the colors and the layout.

  5. katbob
    Member
    Posted 4 years ago #

    TechGnome,
    I'm trying to display a page. I tried the code you suggested, but that didn't seem to help. Might you have any other ideas?

    Thanks so much for your help! I really hope to get this figured out.

    Thanks
    kat

  6. TechGnome
    Moderator
    Posted 4 years ago #

    Hmmm.... I get a TON of javascript errors when I view the page. What plugins do you have running? Try disabling all of them and check to see if the page re-appears. If it does, then re-active ayour plugins one at a time, checking the page between each activation. When it disappears, odds are, that's the plugin that is interfering.

    Tg

  7. katbob
    Member
    Posted 4 years ago #

    Will do. I'll let you know what happens. Thanks so much for your help!

    kat

  8. katbob
    Member
    Posted 4 years ago #

    Well, as it turns out I only had one plugin installed. I uninstalled it and I still have the same issue.

    I use firefox, and I didn't see any javascript errors listed. I may not be looking at the right thing though.

    Here's the code for the entire page, perhaps one of you all powerful and knowledgeable people could look it over and let me know if something looks awry.

    Thanks!

    <!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/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <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 wp_head(); ?>
    </head>

    <body>
    <div id="pagecontainer">
    <!-- BEGIN NAVIGATION -->
    <div id="header">
    <div id="pagenavigation">
    <ul>
    <?php
    $pages = wp_list_pages('sort_column=menu_order&title_li=<ul><li><a href="http://www.createworship.org/d6/" title="Home">Home</a></li></ul>&echo=0');
    echo stripslashes($pages);
    ?>
    </ul>
    </div>
    </div>
    <!-- END NAVIGATION -->
    <!-- BEGIN CONTENT2 -->
    <div id="pagecontent">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    <h2><?php the_title(); ?></h2>
    <div class="entrytext">
    <?php the_content('Read the rest of this page &raquo;'); ?>
    <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
    </div>
    </div>
    <?php endwhile; endif; ?>
    <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    </div>
    <!-- END CONTENT2 -->
    <!-- BEGIN FOOTER -->
    <div id="footer">
    test
    <?php wp_footer(); ?>
    &nbsp;
    </div>
    <!-- END FOOTER -->
    </div>
    </body>
    </html>

    Thanks again!
    kat

  9. katbob
    Member
    Posted 4 years ago #

    I've found the problem. It's this code here:
    <?php
    $pages = wp_list_pages('sort_column=menu_order&title_li=<ul><li><a href="http://www.createworship.org/d6/" title="Home">Home</a></li></ul>&echo=0');
    echo stripslashes($pages);
    ?>

    From what I understand, this code will allow me to have a home page link on every page even when using the Pages menu. Is there any other way to accomplish this without this code or are there any errors in this code that I need to fix?

    Thanks!
    kat

  10. moshu
    Member
    Posted 4 years ago #

    <a href="<?php bloginfo('url'); ?>">Home</a> wouldn't work everywhere?

  11. TechGnome
    Moderator
    Posted 4 years ago #

    remove the ul & li tags from the title_li parameter.... The only other thing I can see that may cause a problem is the " in the a href tag.....

    Tg

  12. TechGnome
    Moderator
    Posted 4 years ago #

    moshu - it does, in fact that's how I do it, but he's tryuing to get it included as part of the Pages listing, by turning the header into the Home tag.

    Tg

  13. katbob
    Member
    Posted 4 years ago #

    moshu,
    I haven't actually tried it, but I think that code would put the Home link outside of the Pages Menu list because the Pages menu is in a UL. I want it to look like one clean menu and not have the Home link sitting outside the list or weirdly to the left of it.

    Please correct me if I'm wrong.

    Thanks,
    kat

  14. moshu
    Member
    Posted 4 years ago #

    Sorry, I was half-sleeping... disregard.
    But the code looks very similar to the one that works for others:
    http://wordpress.org/support/topic/33102#post-188424

  15. TechGnome
    Moderator
    Posted 4 years ago #

    kt - are you sure that's the problem spot? Seems like a weird spot to be causing problems with the post showing.

    Tg

  16. katbob
    Member
    Posted 4 years ago #

    Well, I took it out and it all seems to be working. Also, as I recall, that was about the point that I had problems.

    Ok. I just put it back it and it all seems to be working fine now. That's really weird! Now I'm very confused and have no idea what caused it. It's working now, though, so I suppose I shouldn't complain.

    Thanks everyone for your help!

    kat

  17. TechGnome
    Moderator
    Posted 4 years ago #

    It was probably a small typo.. ????? I guess if it's working now, it's all good.

    Tg

Topic Closed

This topic has been closed to new replies.

About this Topic