Export all post from database to JSON only when the database gets updated

it’s file_put_contents which saves the data then it have to be in the hook and not in the body of the plugin : function export_posts_in_json () { $args = array( ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => -1, ); $query = new WP_Query( $args ); … $data = json_encode($posts); $folder=”wp-content/themes/bootstrap/library/”; $file_name = date(‘Y-m-d’) . … Read more

Export User Info to CSV from Front End

Nevermind, I figured out a way to make it work. I just removed the need for a url altogether. Here’s what I did in case anybody else wants to know. I changed the link to an form input button: <form method=”post”> <input type=”submit” name=”bc_export” class=”btn btn-export” value=”Export Store List for ‘.$atts[‘value’].'” /> </form> And changed … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)