Forum Replies Created

Viewing 6 replies - 226 through 231 (of 231 total)
  • Thread Starter ericr23

    (@ericr23)

    I’d still like a simple php error handler (because alongside the WordPress post titles is a sampling of photos from Coppermine), but meanwhile, how does this inelegant hack sound?

    In wp-db.php, I removed everything from the bail($message) function except echo $message; and die();. That should keep it from messing up the page it’s embedded in.

    (I also changed the error message in the wpdb() function to something more relevant to the public, including a note to try again shortly and a mail link to the webmaster if the problem persists.)

    I altered the wp-config (on a not-yet public database) to test it, and it appears to work.

    In fact I asked this question on a new thread just before finding the issue raised here. I was not aware of those lists — many thanks.

    I have the same problem on my home page. The WordPress error page also ends the host page, which makes a mess of the layout. Is there a way to enclose the included WordPress functions in an “onerror” type of control structure?

    I have the same need for a non-profit site. Right now, there’s a news blog and a resource blog — separate WP databases in subdirectories of the main site. I can easily put the latest entries of either on the site’s index.php page with, e.g. (I’ve never included code in a post here before, so I hope it comes out OK):

    <?php
    include_once('./news/wp-blog-header.php');
    $posts = get_posts('numberposts=4&order=DESC&orderby=post_date');
    foreach ($posts as $post) : start_wp(); ?>
    <b><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></b>
    <br><font "style=font-size:92%;"><?php the_category(', ') ?></font>
    <?php endforeach; ?>

    include_once, include, require_once, and require all work. I had hoped the “once” forms would allow repeating the code for the other blog, but doing so still draws on the first included blog.

    So how can I include a 2nd blog?

    A possible example is the News Watch page at National Wind Watch: https://www.wind-watch.org/news/. The main thing, I think, it to simply remove all the “bloggy” or meta items, such as author, comments, links, etc.

    I was new to WordPress a few weeks ago, and had already created a site using Javascript includes for the footer, sidebars, and footer and CSS for formatting.

    For using them with WordPress, I changed all the links to complete URLs instead of relative URLs.

    I created my own theme for WordPress by copying the regular site’s index page for the WordPress index page. I left the header and footer includes, but replaced the sidebar include with a call for WP’s sidebar.

    I did not use the style.css file in the WP template folder (except to define the template) and instead left the call to the main site’s stylesheet.

    Then, of course, I took out the “main” part of the original index page and inserted “the WP loop.”

    I started the WP sidebar file by copying the original sidebar include, then added desired WP features, such as search, categories, and login to the sidebar file.

    After I got all that done, I created a “single” page similar to the index page.

    I use “if” conditionals to determine the heading text on the index page (e.g., if it’s a category or archive page).

Viewing 6 replies - 226 through 231 (of 231 total)