Null value given when confirming email’s

Firstly, this isn’t an error, it’s a warning. If it’s causing a page crash rather than a logic bug, thats because you’re printing your error log to the screen, not logging it to a log file as you should be doing. Turning off display errors should fix this. This still leaves you with the warning, … Read more

WPMU – How to echo only one URL

Ok I was able to eventually figure it out, what I did was exclude the main blog from the code. <?php if(current_user_can( ‘edit_posts’ )) { global $current_user; $blogs = get_blogs_of_user( $current_user->id ); if($blogs) { foreach ( $blogs as $blog ) { if($blog->userblog_id != 1) { echo ‘<li><a href=”http://’ . $blog->domain . $blog->path .’upload-and-manage-documents/”>My Documents</a></li>’; echo … Read more

Open WordPress Page from selected option dropdown

Looks like not many folks do this. Anyway here’s something that works for me to get drop-down select to go to WordPress page” <?php $my_title = $_POST[‘place’]; global $wpdb; $mypost = $wpdb->get_row( “SELECT * FROM wp_posts WHERE post_title=”” . $my_title . “” ” ); $permalink = get_permalink($mypost->ID); echo “<a href=$permalink><BR>Click Here to Go to Selection</a>”; … Read more

Insert into db with foreach problem

(See comments) $wpdb->insert( ‘produse’, array( ‘id’ => $post_id, ‘pret’ => $produs[‘pret’], ‘gramaj’ => $produs[‘gramaj’], ‘numar_produs’ => $produs[‘numar_produs’] ), array( ‘%d’, ‘%s’, ‘%s’, ‘%d’ ) );

Millennial Media PHP Setup ( Code Integration )

I would not put that code into the theme. Create a plugin with the following content: <?php /* Plugin Name: Millennial Media Ads */ add_action( ‘show_ads’, ‘mma_show_ads’ ); function mma_show_ads() { # copy your PHP code into this function. } In your theme choose the place where you want to show the ads and write: … Read more

Category slug inside another php code

There is no need for any kind of (single or double) quotations: … ‘base’ => $cat, … about quotations: https://stackoverflow.com/questions/3446216/what-is-the-difference-between-single-quoted-and-double-quoted-strings-in-php