Setting up a wordpress site using Local (for local development)
The process to set up a local wordpress site is quite simple. There are, however, certain settings that need to be changed during the initial setup: Webserver: Apache PHP Version: 7.4.30 Database: MySQL 5.4
Continue Reading Setting up a wordpress site using Local (for local development)
Install Website from Duplicator Pro Backup
Upload backup files to the public folder of your host On the front end, navigate to the domain. Sometimes you need to include the file name of the installer.php file included in your backup Insert Database name Username User email Validate Run
WordPress Development Environment Setup and Ongoing Development
Setup local version for site development using LocalWP Create github repositories to store repo’s for folders you will develop, typically a plugin you are developing Create a file changelog.md Add all changes to the change log After each development stage, commit changes to the Github Repo When ready, create a dev site on the hosting…
Continue Reading WordPress Development Environment Setup and Ongoing Development
Exclude page from caching via .htaccess
# EXCLUDE URI’s from caching <If “%{THE_REQUEST} =~ m#/page_name#”> <IfModule mod_headers.c> Header set Cache-Control “private” </IfModule> </If>
wp_get_current_user()
Purpose Retrieves the current user object. Implementation Include in Plugin functions.php of active theme <?php $current_user = wp_get_current_user(); Example of output of Object $current_user WP_User Object ( [data] => stdClass Object ( [ID] => 8 [user_login] => subscriber [user_pass] => {Users Password} [user_nicename] => subscriber [user_email] => subscriber@sblik.com [user_url] => [user_registered] => 2023-05-02 19:41:27 [user_activation_key]…
WordPress Get Logged In User Info for Front End
Objective Get logged in user information to use in javascript. In order to use user information on the front end with Javascript or jQuery, you can use wp_localize_script wp_localize_script creates a Javascript object that can be accessed by javascript. function: wp_localize_script($handle, $nameOfObject, $dataStoredInObject) $handle: script handle the data will be attached to $nameOfObject: Name of…
Continue Reading WordPress Get Logged In User Info for Front End