Skip to content

Instantly share code, notes, and snippets.

@lposen
lposen / cloudSettings
Last active Nov 6, 2019
cloudSettings
View cloudSettings
{"lastUpload":"2019-11-06T21:41:50.702Z","extensionVersion":"v3.4.3"}
View Install Composer to use MAMP's PHP.md

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line:

View page-api.php
<?php
/*
* Sample code for using WordPress as a REST API endpoint (vs AJAX Admin)
* Author: Pete Nelson @GunGeekATX
*
* 1) Create a page called API in WordPres
* 2) Create a file called page-api.php in your theme directory
* 3) Add code as-needed
*
*/