mciarlo
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: 2.8.3 footer frequently injected with link farmWe were running 2.7.1 before the upgrade. We are not using anything like the code you describe in our template.
I will take a look at your directions and implement as many as I can.
Would a re-install of WordPress and recreation of the DB be recommended?
Forum: Fixing WordPress
In reply to: Creating Project Management Site for Multiple Indep. EntitiesSo, it appears I would have to edit the wp-config file to select the correct database, if each project were on a unique subdomain.
The code looks something like:
$host = $_SERVER['HTTP_HOST'];
$parts = explode('.',$host);
if ($parts[3] = "") {
$domain = $parts[0];
} else {
$domain = $parts[1];
}switch ($domain) {
case "domain1":
$db = "database1";
break;
case "domain2":
$db = "database2";
break;
}define('DB_NAME', $db);
define('DB_USER', 'user');
define('DB_PASSWORD', 'password');
define('DB_HOST', 'hostname');Taken from here.
Forum: Fixing WordPress
In reply to: Static Page w/ latest postGot this to work:
<?php
global $more;
// set $more to 0 in order to only get the first part of the post$lastposts = get_posts(‘numberposts=1’);
foreach($lastposts as $post) :
setup_postdata($post);
$more = 0;
?>
<h3>< a href=”<?php the_permalink(); ?>” id=”post-<?php the_ID(); ?>”><?php the_title(); ?></h3>
<?php the_content(__(‘Read more’));?>
<?php endforeach; ?>