Front end post or photo or both

I’ve made a similar form before, and it works whether it has a post or not. This form does not use wp_editor, but you can just modify the code to suit your need. add_action(‘wp_ajax_add_story’, ‘process_story_entry’); function process_story_entry() { global $current_user; if ( empty($_POST) || !wp_verify_nonce($_POST[$current_user->user_login],’add_story’) ) { echo ‘You targeted the right function, but sorry, … Read more

How to get an error message if a form is empty (plugin: Post for site) [closed]

You’ve already got a check for $_POST == empty. **if (!empty($_POST)){ $pfs = pfs_submit($_POST,$_FILES); echo json_encode($pfs); //echo “<pre style=\”border:1px solid #ccc;margin-top:5px;\”>”.print_r($pfs, true).”\n”; wp_redirect(“http://domda.se/tack/”); exit; } else { /* TODO: translate following */ _e(‘Den här sidan hade du inte behövt se, något är fel.’,’pfs_domain’); echo “<a href=””.get_bloginfo(“url’).”‘>” . __(‘Go home?’,’pfs_domain’) . “</a>”; }** Add an error … Read more

Cannot Create a new Post [closed]

You can try each one of these: Go to WordPress Dashboard > Settings > Permalinks and simply hit Save Changes. Make sure there’s no index.html in your website’s root directory (i.e. the directory in which WordPress files are located). Create an .htaccess file in your wp-admin directory with the following contents: <IfModule mod_security.c> SecFilterEngine Off … Read more

How to create a loop that will display one post and stop?

query_posts() can alter the WP query even when it is executed and it should be placed at least before you start the loop i.e. have_posts(). Currently you are placing it after setting up post data i.e. the_post(). Which is resulting in unexpected behavior. Example: global $query_string; //Get current query arguments query_posts($query_string.”&featured=yes”); if (have_posts()) { while … Read more

Windows 10 Printer that Sends to WordPress [closed]

Not a print to WordPress plugin as such, but this will import the PDF text into the editor. https://wordpress.org/plugins/aspose-pdf-importer/ Or use a custom PHP class such as: http://www.phpclasses.org/package/9423-PHP-Convert-PDF-to-HTML-using-Poppler.html which will convert the pdf to html, hopefully with styles. You’d need to create a page template for the html if you want to change the entire … Read more