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
Testing CLI uplaods to Github |
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 | |
$custom_fields = get_post_custom(985); | |
// Prints out all custom field names and values | |
echo "<p style='line-height:2em;'>"; | |
/* | |
* We only want our special ACF's, | |
* so lets set up a string comparison | |
*/ | |
$findMe = 'gcfx_'; // Notice the naming convention!! All fields you want to use here need this. Should make it into a variable. |
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 | |
// Prints the custom field of your choice | |
$my_custom_field = $custom_fields['gcfx_art_category_field_id']; | |
foreach ( $my_custom_field as $key => $value ) | |
echo $key . " => " . $value . "<br />"; | |
?> |
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 | |
// To wrap it up, lets add our custom field values to the body content of the post so Wordpress search can pick them up (it doesn't include custom fields in search). | |
$new_content = "<h1>$post->post_title</h1>"; | |
$new_content .= "<div id=\"expertise_in\">"; | |
$new_content .= "<div class=\"category_list\"><h2>Expertise:</h2>"; | |
$new_content .= $return; | |
$new_content .= "</div>"; | |
$new_content .= "<div class=\"tag_list\"><h3>Other topics listed:</h3>"; | |
$new_content .= $misc_topics; | |
$new_content .= "</div>"; |
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: Custom WP_Query shortcode | |
Plugin URI: http://goshen.edu/tuts/plugins/custom-wp_query-shortcode/ | |
Description: Adds shortcodes to create custom loops inside posts or pages. Read <a href="http://www.goshen.edu/tuts/plugins/custom-wp_query-shortcode/">usage instructions</a> for more details. | |
Author: Jason Pollock | |
Version: 1.1 | |
Author URI: http://goshen.edu/com-mar/meet-the-staff/ | |
*/ | |
function custom_query_shortcode($atts) { |
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 $image_id = get_post_thumbnail_id(); ?> | |
<?php $image_url = wp_get_attachment_image_src($image_id, 'medium', true); ?> | |
<?php $img = wp_get_image_editor($image_url[0]); ?> | |
<?php | |
if ( ! is_wp_error( $img ) ) { | |
$img->resize( 100, 123, true ); | |
} | |
?> | |
<h3>HERE: </h3> | |
<pre> |
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
// Find all of the checked boxes in the container and map them into an array | |
var searchIDs = $checkboxContainer.find('input:checkbox:checked').map(function() { | |
return $(this).val(); | |
}).get(); | |
// searchIDs is now an array containing the values of the checked boxes. |
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
<div> | |
<span>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</span> | |
</div> |
OlderNewer