is_admin() returns true when using admin-ajax.php from front end script

Had a situation today where I was using admin-ajax.php from a front end script. As I understand it this the wp way to make ajax calls (registering my function with the wp_ajax_nopriv_myfunction hook) Seems to me that since admin-ajax.php is on the admin side is_admin() returns true whereas my script calls it from the front … Read more

Front-End Post Submission

I am trying to add a form where users can submit post from front-end. I am Following this tutorial: http:// wpshout.com/wordpress-submit-posts-from-frontend/ What I am doing is adding this code to one of my page-template. The form shows up alright but when I click on the submit button it gives me “Page not found error“ Many … Read more

Localization: I want the backend: english and frontend in defined language

I’d like to have the backend of WordPress in English and use a different locale for the frontend so far I figure out perhaps I could do it by setting in the wpconfig the locale I want to use in the frontend, then add in functions.php something like this: add_filter(‘locale’, ‘mytheme_backendlocale’); function mytheme_backendlocale($locale) { if … Read more

Is it Possible to Extend WP Customize JS Methods?

I’m wondering if it’s possible to extend the methods of the anonymous api object in wp-admin/js/customize-control.js. I need to overwrite one of these methods with my own custom logic but I suspect it’s not possible since it’s wrapped in an immediately invoked function expression: /* globals _wpCustomizeHeader, _wpMediaViewsL10n */ (function( exports, $ ){ // code … Read more

Front end post editing using a form

I have a custom-post type with the standard meta boxes and some custom fields. How could I edit a post through a form in the frontend? 4 s 4 If you want to edit an existing post, try my Front-end Editor plugin. If you want to create new posts, try one of these: http://wordpress.org/extend/plugins/sidebar-post/ http://wordpress.org/extend/plugins/tdo-mini-forms/ … Read more