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
<?php | |
function exampleAjaxResponse() | |
{ | |
die(); // or exit; or wp_die(); | |
} | |
// Note you need both of them to work for logged in & not logged in users. | |
add_action('wp_ajax_your_action_name', 'exampleAjaxResponse'); |
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
<?php | |
$image = get_field( 'image' ); | |
if ( ! empty( $image ) ) { | |
// thumbnail | |
$size = 'medium'; | |
$thumb = $image['sizes'][ $size ]; | |
} else { | |
$thumb = '/wp-content/themes/topfloor-parcel/assets/images/placeholder.png'; | |
} ?> |
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
.content li:before { | |
font-family: "Font Awesome 5 Pro"; | |
content: "\f00c"; | |
margin: 0 7px 0 -26px; | |
color: #9a7ba3; | |
} |
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
<?php | |
//ACF Admin Options | |
if( function_exists('acf_add_options_page') ) { | |
acf_add_options_page([ | |
'page_title' => 'Theme Settings', | |
'menu_title' => 'Theme Settings', | |
'menu_slug' => 'theme-settings', | |
'capability' => 'edit_posts', |
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
// make sure to add this line to disable the editor | |
define( 'DISALLOW_FILE_EDIT', true ); |
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
// Register Custom Post Type | |
function careers_job_detail() { | |
$labels = array( | |
'name' => _x( 'Jobs', 'Post Type General Name', 'text_domain' ), | |
'singular_name' => _x( 'Job', 'Post Type Singular Name', 'text_domain' ), | |
'menu_name' => __( 'Jobs', 'text_domain' ), | |
'name_admin_bar' => __( 'Job', 'text_domain' ), | |
'archives' => __( 'Job Archives', 'text_domain' ), | |
'attributes' => __( 'Job Attributes', 'text_domain' ), |
NewerOlder