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 | |
//Paste this function into your theme's functions.php file to create a duplicate ctc_sermon for each mp_sermon | |
//Set the args for the new query | |
$mp_sermon = array( | |
'post_type' => "mp_sermon", | |
'posts_per_page' => -1, | |
'order' => 'ASC', | |
); |
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
function my_downloadgrid_add_author_to_title( $post_title, $post_id ){ | |
//Get the author of the post in question | |
$post_object = get_post( $post_id ); | |
$author_id = $post_object->post_author; | |
$author_nicename = get_the_author_meta( 'user_nicename', $author_id ); | |
return $post_title . ' | ' . $author_nicename; | |
} |
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
/** | |
* Filter the classes for a postgrid links to make them open in a lightbox | |
* | |
* @since 1.5.0 | |
* | |
* @param string $classes The string containing all of the classes for postgrid links | |
*/ | |
function my_custom_postgrid_classes( $classes ){ | |
return 'mp-stacks-lightbox-link'; | |
} |
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
/** | |
* Filter the permalink for a postgrid posts if it is a custom post type | |
* | |
* @since 1.5.0 | |
* | |
* @param string $permalink The permalink for the post in question | |
* @param int $grid_post_id The post ID in question. | |
* @param int $brick_id The Brick ID containing the post grid | |
*/ | |
function my_custom_permalinks_for_postgrid( $permalink, $grid_post_id, $brick_id ){ |
NewerOlder