Simple steps to add existing project to GitHub.
In Terminal, point to the folder you want to track with Git.
git init
# OS generated files # | |
###################### | |
# Windows image file caches | |
Thumbs.db | |
ehthumbs.db | |
# Folder config file | |
Desktop.ini |
<?php | |
/** | |
* Create and update terms when a post is saved. | |
* Based on the example here: https://brennaobrien.com/blog/2013/11/autopopulating-wordpress-taxonomies.html | |
* | |
* @param int $post_id ID of the post being saved. | |
*/ | |
function fwd_update_terms_on_save( $post_id ) { | |
// Only update terms if the post being saved is in a specific post type. |
// Center block | |
@mixin center-block { | |
display: block; | |
margin-left: auto; | |
margin-right: auto; | |
} | |
// Column width with margin | |
@mixin column-width($numberColumns: 3) { | |
width: calc( map-get($columns, $numberColumns) - ( ( $columns__margin * ( $numberColumns - 1 ) ) / $numberColumns ) ); |
# Use this code if your React App will be in the root directory on the server | |
# Create a .htaccess file in the root directory (public_html folder) | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.html$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-l | |
RewriteRule . /index.html [L] |
# Use this code if your React App will be in a subdirectory/folder on the server | |
# Create a .htaccess file in that subdirectory/folder and copy this code | |
# Replace the word SUBDIRECTORY on lines 6 and 11 with the subdirectory/folder name | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase /SUBDIRECTORY/ | |
RewriteRule ^index\.html$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-l |
# Force HTTPS | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] |
<?php | |
// Remove admin menu links for non-Administrator accounts | |
function fwd_remove_admin_links() { | |
if ( !current_user_can( 'manage_options' ) ) { | |
remove_menu_page( 'edit.php' ); // Remove Posts link | |
remove_menu_page( 'edit-comments.php' ); // Remove Comments link | |
} | |
} | |
add_action( 'admin_menu', 'fwd_remove_admin_links' ); |
<?php | |
/** | |
* Lower Yoast SEO Metabox location | |
*/ | |
function yoast_to_bottom(){ | |
return 'low'; | |
} | |
add_filter( 'wpseo_metabox_prio', 'yoast_to_bottom' ); |