• hello, i am having a very confusing problem with the categories widget. I have added some functions to the functions.php file of my theme to handle custom shortcodes. The shortcodes work just fine, however my categories no longer show up in the sidebar. I tried downloading the AVH Categories Widget plugin just to see if that would help but the exact same thing happens. at first i thought it had to do with the theme but the Categories Widget is not a part of my theme so i feel like it has something to do with wordpress itself…? i have been working on this problem for two days and am completely stumped. any help would be greatly appreciated, i can supply with code/additional info if needed but its your standard custom shortcode code, nothing fancy or any tricks, thank you

    P.S. Using WordPress 3.5.1

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter wotto

    (@wotto)

    i think im onto something. while handling the shortcode, i have to connect to an old database (non-WP) to pull the information needed. I think this is causing the problem as WP is looking for categories in a non-WP database. how would i go about reconnecting to my WP database?

    For non-WP db, you can create another instance for that query, so it won’t affect default WP db connection

    $non_wp_db = new $wpdb( 'username', 'password', 'db name', 'hostname' );
    $q = $non_wp_db->get_results( 'SELECT * FROM vars' );
    var_dump( $q ); /* do something with the results */
    Thread Starter wotto

    (@wotto)

    awesome thank you! i will test this out today

    Thread Starter wotto

    (@wotto)

    worked perfectly, thanks again !

    Glad it worked, have a nice day!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘issues with categories widget’ is closed to new replies.