Someone else designed and set up our wordpress site and I'm a bit of a novice with wordpress and html. We have a broken link on our homepage that I cannot fix. There is a gray box on our homepage with some text and a "more" link - when you click on "more," you get a 404 error. I think the gray box is a widget, but it's not in our list of active or inactive widgets. I have no idea how to fix this problem. Any advice about where to start is greatly appreciated!
Can you share the URL? We're shootin' blind.
Of course - I'm new to the forum, so thanks for letting me know you need more information:-)
Our web address is http://www.rebuildingtogether-twincities.org. The little gray box has a heading that says "Current Projects" (bottom right next to the "media gallery").
Okay. The broken link is http://www.rebuildingtogether-twincities.org/?p=329
The CORRECT URL is http://www.rebuildingtogether-twincities.org/?page_id=114
Looking at the source of your page, that's part of the Current Project Module. <!-- Current Project Module Starts Here --> Does that sound like somethign your theme has?
Yes - in the Main Index Template of the theme:
<!-- Current Project Module Starts Here -->
<div class="current_p_wrapper">
<div class="current_p_top"></div>
<div class="current_p_mid">
<div class="content">
<div class="heading_c">Current projects</div>
<?php
$querystr_cp = "
SELECT <code>post_content</code>, ID,post_title
FROM <code>wp_posts</code>
WHERE <code>post_parent</code> =114
ORDER BY <code>post_date</code> DESC
LIMIT 1
";
$pageposts_cp = $wpdb->get_results($querystr_cp, OBJECT);
if ($pageposts_cp):
foreach ($pageposts_cp as $post):
setup_postdata($post); ?>
<span class="bluetext"><b>
<?php the_title(); ?>
</b></span>
<?php $content_project = get_the_content();
$words_project = explode(' ', $content_project);
echo $home_projects = implode(' ', array_slice($words_project, 0, 25)); ?>
<div align="right"><a>" class="green_cp">more ></a>
<?php endforeach;
endif; ?>
</div>
</div>
<div class="current_p_bottom"></div>
</div>
<!-- Current Project Module Starts Here -->
</div>
Yeah you can't just post code in the forums without using the code tag (see the button on the message menu? it makes a BACKTICK, not <code> tags).
Basically this section:
<?php $content_project = get_the_content();
$words_project = explode(' ', $content_project);
echo $home_projects = implode(' ', array_slice($words_project, 0, 25)); ?>
<div align="right"><a>" class="green_cp">more ></a>
I think that last line is what's wrong but I'm PRETTY sure that's not actually what it looks like.