Articles of front end

Why is WordPress serving the 1024px version of my image and not the original on a 1920×1080 screen?

I have uploaded an image that is 2100px wide into a post, and inserted that image in the post body. I’m building a custom theme based on WordPress’ Twenty Sixteen. The HTML looks OK: <img class=”alignnone wp-image-2669 size-full” src=”http://…/wp-content/uploads/2017/07/GrillSommer1.jpg” alt=”” width=”2100″ height=”904″ /> in the frontend, WordPress does what I assume is its “responsive image” […]

Modify front-end delete button to publish pending posts

I’ve found this helpful snippet to make a delete post link on the front-end: <?php if (current_user_can(‘edit_post’, $post->ID)) echo “<a href='” . wp_nonce_url(“/wp-admin/post.php?action=delete&amp;post=$id”, ‘delete-post_’ . $post->ID) . “‘>Delete</a>” ?> What I am wondering if there is a way to modify this code and create a complementary Publish link, which would publish a pending post, from […]

frontend user with custom profile pages

i am building a website where the frontend users can register and they need to have custom profile pages – not the standard WordPress backend pages that the admin sees. There they can see their profile (image, name, email, …) and change it, as well as some site specific pages like: statistics, severals lists, … […]

Add new media uploader at frontend for wp 3.5+

I create a form for user to submit content from the frontend. The only problem is I don’t know how to handler the image upload. So, I want to know how to use the WP media uploader in the frontend. The media uploader should be appeared like in the ‘wp-admin/media-new.php’. I don’t want the pop […]

Help with AJAX front end comment moderation

I am implementing a front end AJAX comment moderation system for a site I manage but I am having a hard time getting it to work. Right now clicking on the link that approves the comment runs the proper php script but it reloads the entire page. So it works but I’d like to approve […]

Front End Registration Form Code – Password Field Not Saving

I have a front end registration form which almost works perfect except that the passwords are not being set correctly. In my functions.php I have – /** * Registration form * */ add_action(‘template_redirect’, ‘register_a_user’); function register_a_user(){ if(isset($_GET[‘do’]) && $_GET[‘do’] == ‘register’): $errors = array(); if(empty($_POST[‘user’]) || empty($_POST[’email’])) $errors[] = ‘provide a user and email’; if(!empty($_POST[‘spam’])) […]

wp_editor doesn't work in front end area

I am developing a theme where I would like to have a front-end area, but when I try to include the wp_editor() in the page template I am getting this result: P.S. The wordpress editor works fine in the dashboard. Pietro

Using WordPress only for the backend, and using AngularJS as a frontend

I’m developing a web application for a friend who needs an online portfolio. As a learning experience, I’m trying to do the front-end with AngularJS and using WordPress as a backend with the official API plugin. It works really well, but there’s a problem. I can’t seem to completely hide the WordPress frontend. There might […]

How can I trash multiple posts at once from the front end?

I took a peek at the code in edit.php and am now generating links with this code: wp_nonce_url(“/wp-admin/edit.php?doaction=trash&amp;post_type=post&amp;ids=postIds”, “bulk-posts”) The string “postIds” in the URL gets replaced by comma-separated post IDs via javascript. All this does thus far is redirect me to the edit screen in the backend. How do I need to generate this […]

Get user input from a form

I am trying to create a form that will allow users to update their information on the front end. I am just starting to learn PHP (I know C# very well). If I use this code to create a form on a WordPress page, how do I get the information from the user when they […]