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

File operations should use the WP_Filesystem methods instead of direct PHP filesystem calls. The WordPress coding styles require that you make use of the WP Filesystem instead of using direct PHP file functions. You can replace your file_get_contents call easily with: $response = wp_remote_get($feed_url); $file_content = $response['body']; For more ...



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