• ever since i updated my WP, it’s been actin funky. now my categories don’t work. this comes up:

    Fatal error: Call to undefined function the_post_id() in /data/18/1/17/153/1832479/user/1988023/htdocs/risheleonlineblog/wp-content/themes/music/archive.php on line 46

    _______________________

    and heres: line 46….

    <?php if (is_category()) { ?>
    <div class="indent" align="left">
    <h2 align="left"><?php single_cat_title(); ?></h2>
    <ul class="news-list">
    <?php while (have_posts()) : the_post(); ?>
    <?php //the_ID(); ?><?php //the_title(); ?><?php //the_permalink() ?>
    <?php
    $sql=mysql_query("select * from wp_posts where ID='".the_post_ID()."'");
    $row = mysql_fetch_array($sql);
    $sqlimg = mysql_fetch_array(mysql_query("select guid from wp_posts where post_parent = '".the_post_ID()."' and post_type='attachment'"));
    ?>
    <li>
    <? if($sqlimg['guid'] !=""){?><img alt="" src="<?php print $sqlimg['guid']?>" width="194" height="171" /><? }?>
    <h4><?=date("D, M d, H:i",strtotime($row['post_date']))?><br />
    <a href="<?php print bloginfo('url')?>/?page_id=<?=$row['ID']?>"><?=$row['post_title']?></a></h4>
    <p>
    <div><?php //print substr(strip_tags($row['post_content'],'<p><div><b><strong>'),0,180)?>
    <?php the_content_homepage(); ?>
    </div>

    https://risheleonline.com is the site

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator James Huff

    (@macmanx)

    Try deactivating all plugins. If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, try switching to the Twenty Ten theme to rule-out a theme-specific issue.

    Thread Starter rye_ryu

    (@rye_ryu)

    the plug-in’s worked perfectly until I updated to 3.0.1. i will deactivate them, but could that really be the issue?

    update: i deactivated all plug-in’s and the problem still exists.

    Thread Starter rye_ryu

    (@rye_ryu)

    update #2: i switched the theme to Twenty Ten and the problem resolved. So, it is a theme-specific issue. How do I fix it though?

    Moderator James Huff

    (@macmanx)

    Try replacing the theme with a fresh un-edited copy. Backup your copy first.

    Thread Starter rye_ryu

    (@rye_ryu)

    Ok, i re-installed the unedited theme. I started editing it file by file, and when I changed the archive.php, the same error came up. The flaw is in the archive.php file but I’m not sure what it is?

    Thread Starter rye_ryu

    (@rye_ryu)

    to be clear, here is what i am trying to achieve: the category pages have posts listed like the index page.

    Moderator James Huff

    (@macmanx)

    It’s hard to tell without seeing a copy of the theme, but is it possible that the category pages are only showing excerpts and you want them to show full content?

    Thread Starter rye_ryu

    (@rye_ryu)

    no, I want the category pages to show excerpts, with thumbnail image, post title… and just like on the index page.

    Thread Starter rye_ryu

    (@rye_ryu)

    anybody?

    Thread Starter rye_ryu

    (@rye_ryu)

    Hey, can anybody solve this problem I’m still having?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Fatal error?’ is closed to new replies.