bcmann
Forum Replies Created
-
Forum: Localhost Installs
In reply to: wp-users table missingI just installed a plug-in called “Database Browser” and I can see that there is a wp_users table. But I can’t figure out why I’m not seeing it in phpMyAdmin.
I’ve downloaded another plug-in that’s called ‘wp-dump’ and I exported the database. I’m updating my local copy and hopefully this will work.
Forum: Localhost Installs
In reply to: wp-users table missingNo this is a new client. I know what you’re saying, and I can’t figure out how it’s working. There are 270 tables in this database, I’m guessing that whoever developed this site must have modified the core files to use another table. But I did search the DB for my username and it’s not there. I just don’t understand how this could be working.
I was thinking there may be 2 databases and I just pulled the wrong one, but I used the client’s login to access the DB through their control panel with Media Temple. There’s only one database on their hosting package and the hostname in the wp_config file is a Media Temple site. So I’m not sure where else to look.
Thanks again for your help.
Forum: Localhost Installs
In reply to: wp-users table missingMy bad, I said ‘wp-users’ but I meant ‘wp_users’. There is no ‘wp_users’ table in either site.
I tried copying the wp_users table from another install. But when I try to log-in, I just get a message that says that I don’t have permission to access that page.
I also tried opening the file that I exported from phpMyAdmin and searching for my username, but it wasn’t found.
Is there a PHP file that I can modify to see what database/table the site is actually using for the users?
Thanks!
Forum: Fixing WordPress
In reply to: wp_reset_postdata() not workingIf anyone runs into this, I found a solution. I don’t think it’s the best possible solution, but it works. I’m guessing I should have used the hook pre_get_posts, but get_posts() is working.
Here’s what I did…
function listing_agent( $post ){ $agent = get_post_meta( $post->ID, 'listing_agent', true ); $lm_agents = get_posts( 'post_type=lm_agent' ); ?> <div> <label for='Listing Agent' class='agent'> <select name='listing_agent'> <option value=''>-Select Agent-</option> <?php foreach($lm_agents as $lm_agent) { echo '<option value="' . $lm_agent->ID . '" ' . ( $lm_agent->ID == $agent ? 'selected = "selected"' : '' ) . '>' . $lm_agent->post_title . '</option>'; } ?> </select> </label> </div> <?php } // End Agent BoxHope that helps someone!
Forum: Fixing WordPress
In reply to: WP_Query and post__inHave you tried removing all arguments except ‘post__in’? I’m thinking that your ‘posts_per_page’=>’-1′ is the problem, but I’d try removing ‘post_type’ too. I’d probably leave ‘post_status’ to make it easier to manage your posts.
Forum: Fixing WordPress
In reply to: WP_Query and post__inWhat do you get when you do a print_r on the $include array? Do you only get the three ID’s that you’re expecting?
Forum: Fixing WordPress
In reply to: Add a Note to Tags, Categories and Featured Image on Edit PostDon’t know if this helps at this point, but if anyone else is looking for this, I didn’t like the idea of using jQuery to put in the text, so I altered the meta box.
This is from a Custom Post Type that I developed, I wanted to add some text to remind everyone that proportions that the feature image had to be in, and I also wanted to rename the title on the meta box from “Feature Image” to “Magazine Cover”, so here’s the code that did it:
remove_meta_box( 'postimagediv', 'sd_cover', 'side' ); add_meta_box('postimagediv', __('Magazine Cover'), 'sd_alter_meta_box', 'sd_cover', 'normal', 'high');Then I defined the function “sd_alter_meta_box” here:
function sd_alter_meta_box($post){ $thumbnail_id = get_post_meta( $post->ID, '_thumbnail_id', true ); echo _wp_post_thumbnail_html( $thumbnail_id, $post->ID ); echo "Image must be proportionate to 195px x 260px. Minimum size of 195px x 260px."; }This uses the same code from the function ‘post_thumbnail_meta_box’, I couldn’t figure out a way to call it and add my text to it. If anyone figure’s that out, I’d love to change that part of it.
Hope that helps!