Tag Info

Hot answers tagged

3

I'm pretty sure that you ARE incorrect. Let's taka a closer look at this code you mentioned in your question. In first line it sets $where variable: $where = 'WHERE ID IN (' . substr(str_repeat('%d,', count($my_options['acf_posts'])), 0, -1) . ')'; So what this line really does is: get the number of some options (let's call it 'N') repeats %d ...


1

Since you've used the true argument for get_post_meta, $blogimages will be a single array, not a multidimensional one. So instead of $blogimages[0]['blog-image-inside'], just use $blogimages['blog-image-inside']. For absolute sanity, you might also want to check $blogimages before you use it: 'exclude' => [ $thumb_ID, isset( ...


1

It means Wordpress is outputting something to the browser too early. The file indicated seems to be your own session file (php stores user sessions in small text files in the tmp directory). Check first the wp-config.php file. Remove the final closing php tag. Make sure you're not outputting anything in that file (look for print_r, var_dump, echo, print, ...


1

It looks like your $categories is an empty array. To solve this always check if the array is empty or not. In line 117 add code to check if array is empty <?php if( !empty( $categories ) ){ ?> and in line number 167 replace <?php } ?> with <?php } } ?> If you want to permanently remove any error or warning message you can use the ...


1

Ok, I've narrowed this down. Always check if_user_logged_in() before constructing a new WP_User from the current user's ID. Simply put, don't call: new WP_User(0); or you'll get the warning above.



Only top voted, non community-wiki answers of a minimum length are eligible