- Create project in Local by Flywheel
- Pull git project to ~/Local Sites/(project name)/app/public
- Go to Local by Flywheel, right click the project > Open Site SSH
- cd ./app/public folder
- Import the database using: wp db import xxxxx (If it comes in .sql.gz form, we may need to run 'gunzip' on the file first)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form role="search" method="get" id="searchform" | |
class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>"> | |
<div> | |
<label class="screen-reader-text" for="s"><?php _x( 'Search for:', 'label' ); ?></label> | |
<input type="text" value="<?php echo get_search_query(); ?>" name="s" id="s" /> | |
<input type="submit" id="searchsubmit" | |
value="<?php echo esc_attr_x( 'Search', 'submit button' ); ?>" /> | |
</div> | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add ACF Columns | |
function add_new_events_column($columns) { | |
$columns['event_date'] = 'Event Date'; | |
return $columns; | |
} | |
add_filter('manage_events_posts_columns', 'add_new_events_column'); | |
function add_new_events_admin_column_show_value( $column, $post_id ) { | |
if ($column == 'event_date') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reference: https://stackoverflow.com/questions/57901493/pyspark-defining-custom-schema-for-a-dataframe | |
table_schema = StructType([StructField('ID', StringType(), True), | |
StructField('Name', StringType(), True), | |
StructField('Tax_Percentage(%)', IntegerType(), False), | |
StructField('Effective_From', TimestampType(), False), | |
StructField('Effective_Upto', TimestampType(), True)]) | |
df = spark.read.format(file_type) \ | |
.option("header", "true") \ |
OlderNewer