Programmatically Add Page from a WordPress Plugin

In this tutorial, I’ll show you how to make your WordPress plugin automatically create a WordPress page when the plugin is activated from wp-admin. Let’s just dive right in to the PHP code this time! //Add Events page on activation: function install_events_pg(){         $new_page_title = ‘Events’;         $new_page_content = ‘This is your page content that    [Continue Reading]

wp_redirect Causing Page Isn’t Redirecting Properly Error

I was working on a client’s WordPress website today and had to do a redirect after successful login to his WordPress site. I tried to use wp_redirect with several different hooks including init, wp, wp_login, wp_redirect….etc. and none worked. I kept getting an error in Firefox that looked like this saying “The page isn’t redirecting    [Continue Reading]