This file contains 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 | |
/** | |
* Page Sitemap | |
* [page_sitemap title="" class=""] | |
*/ | |
function yourfunction_page_sitemap($atts) { | |
ob_start(); | |
extract( shortcode_atts( array( |
This file contains 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 | |
/** | |
* Get Post Category | |
* | |
* Shortcode: [post_category] | |
*/ | |
function shortcode_post_category($atts=array()) { | |
// get taxonomy by post type | |
$tax = get_object_taxonomies(get_post_type()); |
This file contains 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 | |
add_filter('wpseo_json_ld_output', '__return_empty_array'); |
This file contains 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 | |
/** | |
* Shortcode: EDD Product Version | |
* | |
* [edd_product_version] | |
* You can add id="post_id_here" to display the version number of a defined product. | |
*/ | |
function shortcode_edd_product_version($atts) { | |
$atts = shortcode_atts(array( |
This file contains 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 image title dynamically | |
jQuery(document).ready(function($) { | |
$("img").attr("title", function() { | |
return $(this).attr("alt"); | |
}); | |
}); |
This file contains 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: PLUGIN_NAME_HERE | |
* Plugin URI: PLUGIN_URI_HERE | |
* Description: PLUGIN_DESC_HERE | |
* Version: 0.0.1 | |
* Author: AUTHOR_HERE | |
* Author URI: AUTHOR_URI_HERE | |
* Text Domain: TEXT_DOMAIN_HERE | |
*/ |
This file contains 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 | |
add_filter('acf/load_field/name=gravity_form_id', function($field) { | |
if (class_exists('GFFormsModel')) { | |
$choices = []; | |
foreach (\GFFormsModel::get_forms() as $form) { | |
$choices[$form->id] = $form->title; | |
} |