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
/* | |
* Enqueue jQuery when adding/editing a Project Summary | |
*/ | |
function rpt_enqueue_jquery_for_custom_post_type( $hook ){ | |
global $post; | |
// if the current post is not a "project_summary" post type, exit this function | |
if ( 'project_summary' != $post->post_type ) { | |
return; | |
} |
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
/* | |
* Require post title when adding/editing a Project Summary | |
*/ | |
function rpt_require_post_title_for_custom_post_type() { | |
global $post; | |
// only run the code below if this is a "project_summary" post type | |
if ( 'project_summary' == $post->post_type ) { | |
?> | |
<script type='text/javascript'> |
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
// The list of post types that we want to require post titles for | |
$post_types = array( 'post', 'page', 'event', 'project' ); | |
// If the current post is not one of the chosen post types, exit this function | |
if ( in_array( $post->post_type, $post_types ) ) { | |
return; | |
} |
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
/* | |
* Require post title when adding/editing a Project Summary | |
*/ | |
function rpt_require_post_title_for_custom_post_type() { | |
global $post; | |
// only run the code below if this is a "project_summary" post type | |
if ( 'project_summary' == $post->post_type ) { | |
?> | |
<script type='text/javascript'> |
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 id="service-category-select" class="service-category-select" action="<?php echo esc_url( home_url( '/service-category/' ) ); ?>" method="get"> | |
<?php wp_dropdown_categories( array( | |
'orderby' => 'NAME', | |
'taxonomy' => 'service_category', | |
) ); ?> | |
<input type="submit" name="submit" value="view" /> | |
</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
<form id="service-category-select" class="service-category-select" action="<?php echo esc_url( home_url( '/' ) ); ?>" method="get"> | |
<?php wp_dropdown_categories( array( | |
'orderby' => 'NAME', | |
'taxonomy' => 'service_category', | |
'value_field' => 'term_id' | |
) ); ?> | |
<input type="submit" name="submit" value="view" /> | |
</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
<div class="all-tools"> | |
<?php | |
// If the taxonomy term has previously been selected from the dropdowm menu, grab it | |
$term = isset( $_GET[ 'tools' ] ) ? sanitize_text_field( $_GET[ 'tools' ] ) : false; | |
// In this section, set selected and taxonomy_query values before creating the taxonomy dropdown & getting WP_Query results | |
$selected = ''; | |
$tax_query = ''; | |
if ( $term ) { |
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 | |
/* | |
Plugin Name: Add Facebook Conversion Pixel with Custom Post Widget | |
Description: Add Facebook Conversion Pixel with Custom Post Widget | |
Version: 1.0 | |
Author: Kellen Mace | |
Author URI: http://kellenmace.com/ | |
License: GPLv2 or later | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ |
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 id="staff-bio-button" class="staff-bio-button" action="<?php echo esc_attr( get_permalink( get_queried_object_id() ) ); ?>" method="get"> | |
<input type="hidden" name="staff-id" value="<?php echo esc_attr( $post->ID ); ?>" /> | |
<input type="submit" name="submit" value="Bio" /> | |
</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
wp_enqueue_script( 'admin_scripts', DABO_URL . 'assets/js/tenup_dashboard_admin.js', array( 'jquery' ), DABO_VERSION ); | |
wp_enqueue_style( 'admin_styles', DABO_URL . 'assets/css/tenup_dashboard_admin.css', array(), DABO_VERSION); |