Multiple Accounts on 1 email – Multisite

You should rethink what you are trying to do as an email address represents with no ambiguity a specific user. Getting many users to be identified by one email can create problems as to who gets to set the password. In general if it a small amount of accounts it is probably easier to create … Read more

WordPress API hook

You would register your ajax-rendering code with the action wp_ajax_{my_action_goes_here} for logged-in users, or wp_ajax_nopriv_{my_action_goes_here} for users not logged in. Something like: add_action(“wp_ajax_nopriv_get_top_4_posts”, function() { $q = new WP_Query(array( “posts_per_page” => 4 )); exit(json_encode($q->posts)); }); This would go in a theme functions file or a plugin of your choice (any location that is evaluated before … Read more

Calling an custom field from theme option at the frontend

I’m not sure how you’ve decided to save your options but if I were to guess based on the code above, you’re saving your ‘aboutBlurb’ as an index in the website_options array which I also assume you’re saving in the actual WordPress Options – website_options[about]. To get that data maybe try this: $website_options = get_option(‘website_options’); … Read more

What’s the preferred method of writing AJAX-enabled plugins?

the “safer and cleaner” way would be to use admin-ajax.php that comes with wordpress and wp_ajax hook to call your processing function from your plugin file and use wp-nonce to check the integrity of the call. for example: your ajax JQuery call would be <script type=”text/javascript” > jQuery(document).ready(function($) { var data = { action: ‘ACTION_NAME’, … Read more

WordPress Overrides folder permissions in Cpanel

i know it’s a bit late but i’m going to answer it. if folder permissions get changed by themselves even after you password-protect them then i assume there is some serious problems with your Cpanel and your hosting. I’ve had a problem like this in my project but not on WordPress and it turned out … Read more

Form submit from wordpress plugin

var_dump() your $_POST, there will never be a [‘submit’]. You don’t have something like: <input name=”submit” type=”submit” /> That is basic HTML 😉 And read more about MVC and putting your HTML-Code in another file. Putting them in strings is something you won’t like in the future! It becomes unreadable and unmaintainable some day.