Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Forum: Fixing WordPress
    In reply to: category error
    Thread Starter jbjaaz

    (@jbjaaz)

    Okay, I seem to have “solved” the issue.

    I had one user/pass setup for all databases on my server.

    I added a new user/pass strictly for wordpress and the error went away, categories printed out and archives list printed out.

    Now, I was doing the single user/pass for all databases just to make it easier to remember. Is it best practice to use a different user/pass for every database? Why did having a single user/pass cause problems for wordpress. I mean posts printed out fine. Why were the categories and archives list any different?

    Thanks for listening.

    Forum: Fixing WordPress
    In reply to: category error
    Thread Starter jbjaaz

    (@jbjaaz)

    I’m at a loss. Anybody!

    if I run “echo $wpdb->print_error();” I get the following

    WordPress database error: []
    SELECT cat_ID, cat_name, category_nicename, category_description, category_parent FROM wp_categories WHERE cat_ID > 0 ORDER BY cat_name asc

    Which is weird because all posts print out correctly. I would think that means the database is accessible.

    Forum: Fixing WordPress
    In reply to: category error
    Thread Starter jbjaaz

    (@jbjaaz)

    here’s the relevant php code;

    <h2>Categories</h2>
    <ul>
    <?php wp_list_cats('sort_column=name'); ?>
    </ul>

    <h2>Archives</h2>
    <ul class="last">
    <?php wp_get_archives('type=monthly'); ?>
    </ul>

    Forum: Fixing WordPress
    In reply to: category error
    Thread Starter jbjaaz

    (@jbjaaz)

    whoops, sorry for the late response.

    I added ‘sort_column=name’ but I still get the error.

    The site is, https://communitydevelopmentsc.org/news/

    Forum: Fixing WordPress
    In reply to: category error
    Thread Starter jbjaaz

    (@jbjaaz)

    okay I just noticed “wp_get_archives” doesn’t actually print out the archive list either.

    What could be wrong with my installation?

    Forum: Fixing WordPress
    In reply to: category error
    Thread Starter jbjaaz

    (@jbjaaz)

    anybody??? I have no idea why this is happening.

    I just upgraded to the latest version and still get the same error.

    Forum: Fixing WordPress
    In reply to: apostrophes
    Thread Starter jbjaaz

    (@jbjaaz)

    Thanks for helping me out.

    I discovered a solution, but I’m still at a lose for what the real problem is. Anyway, it seems like php is not detecting the character set of the feed properly. If I manually set the encoding type to ‘utf-8’ the apostrophes look as they should.

    weird!

    Forum: Fixing WordPress
    In reply to: apostrophes
    Thread Starter jbjaaz

    (@jbjaaz)

    I’m using php and a Pear class, class XML_RSS.

    Forum: Fixing WordPress
    In reply to: apostrophes
    Thread Starter jbjaaz

    (@jbjaaz)

    oh thanks for the feedburner article and upgrade link. I’ll get to those in due time.

    Forum: Fixing WordPress
    In reply to: apostrophes
    Thread Starter jbjaaz

    (@jbjaaz)

    If you look on the homepage of the website… under “news & updates”, the last item, has the question mark where it should be an apostrophe.

    I am using htmlspecialchars, so its something else.

    Forum: Fixing WordPress
    In reply to: apostrophes
    Thread Starter jbjaaz

    (@jbjaaz)

    https://communitydevelopmentsc.org

    The feed does validate, so I guess its gotta be a php issue.

    Forum: Plugins
    In reply to: wpdb in a plugin
    Thread Starter jbjaaz

    (@jbjaaz)

    nevermind. I assumed because…

    $wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);

    …was at the end of the class file, I didn’t have to create the object. But upon adding the line, the error goes away. Sorry for taking up space in the forum.

    Thread Starter jbjaaz

    (@jbjaaz)

    Thanks for the code. I actually didn’t use the wp_get_archives function. Once I realized that include("/news/wp-blog-header.php"); takes care of all the initialization and database querying, I was able to pull code from index.php to output a more customized list than what wp_get_archives would give me.

Viewing 13 replies - 1 through 13 (of 13 total)