Adding a “Report the post” button/form?

To use the plugin in the question you linked to: Copy the code into notepad or an equivalent program Save the file using the extension .php (make sure your operating system has file endings turned on so it doesn’t save as filename.php.txt Put the file into a compressed (or zipped) folder. How you do this … Read more

Correct Syntax for uploading files to custom directory in WordPress

(Update to answer: 05.27.15) What finally worked is using ABSPATH: $folderPath = “/jobtracking/files/standard/{$projID}”; mkdir(ABSPATH.$folderPath, 0755, true); $filename = basename($_FILES[‘Attach_Files’][‘name’]); $filetype = $_FILES[‘Attach_Files’][‘type’]; $datei = “files/standard/{$projID}/{$filename}”; $target_path = ABSPATH.$folderPath . “https://wordpress.stackexchange.com/” . $filename; if(move_uploaded_file($_FILES[‘Attach_Files’][‘tmp_name’], $target_path)) { mysql_query(“INSERT INTO files (files.name, files.project, files.user, files.added, files.datei, files.type, files.folder, files.visible) VALUES(‘{$filename}’, ‘{$projID}’, 5, UNIX_TIMESTAMP(now()), ‘{$datei}’, ‘{$filetype}’, 0, ‘ ‘)”); … Read more

jQuery Live Form Validation in WordPress

Your page through javascript errors. Try loading the validation scripts on footer (before closing </body> tag) rather than within header (within <head> tag). If that doesn’t work, then try editing the jquery.validate.js file, and replace the first line (function(jQuery){ with (function($){. It should work.

jQuery form plugin, submit in the wordpress way

If you want to use the WordPress functions in your process.php file then there is a way for you. simply put these two lines of code at the top of your process.php file $blogheader = explode(“wp-content”,$_SERVER[“SCRIPT_FILENAME”]); include $blogheader[0].”wp-blog-header.php”; Now you can use the WordPress functions in your file and do what you want. Will that … Read more

upload images on front by user using form

If all you do is update ACF fields with your form, why not use the built-in function to generate the form? Create a new ACF field for the images, or simply use the Gallery field type, then display the form using acf_form: <?php acf_form(array( ‘post_id’ => ‘new_post’, ‘new_post’ => array( ‘post_type’ => ‘vendre’, ‘post_status’ => … Read more

Submitting a plugin form to database in admin page

[UPDATE] You should have the page divided in two section- 1. One dealing with AJAX request and Post Method 2. Displaying form data Here is outline <?php if (strtolower($_SERVER[‘HTTP_X_REQUESTED_WITH’]) == ‘xmlhttprequest’ or $_SERVER[‘REQUEST_METHOD’] == ‘POST’){ // Process AJAX Request or POST Method } if (strtolower($_SERVER[‘HTTP_X_REQUESTED_WITH’]) != ‘xmlhttprequest’){ // HTML Code here which will not be … Read more

Get Video Attachment to post

Video from video clud, like youtube.com, vimeo? If true – use text field or textarea field. User fill youtube share code in this field and you will add this to post_content. Or create custom iframe and tell users insert video link.