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
jQuery(document).ready(function( $ ) { | |
// your code 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
<!-- | |
Truncating and revealing text – The Show More and Read More patterns | |
Customized by GDN from source https://justmarkup.com/articles/2017-01-12-truncating-and-revealing-text-the-show-more-and-read-more-patterns | |
--> | |
<!-- Add this to the Code Block > HTML Section --> | |
<article> | |
<?php | |
$content = get_the_content(); |
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 | |
/* | |
* Put this in a code block | |
* Replace `custom_post_slug` with the current slug name | |
*/ | |
// list the speakers without links | |
//$terms = wp_get_post_tags( $post->ID ); | |
//For custom taxonomy use this line below |
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 | |
// use class .gal-single for additional styling | |
// get pods object | |
$custom_field_name = 'custom_portlofio_gallery'; | |
$mypod = pods( $post->post_type, $post->ID ); | |
if ($mypod->field($custom_field_name)) { | |
foreach( $mypod->field('custom_portlofio_gallery', true) as $picture) { | |
echo '<div><img src="' . $picture['guid'] . '" class="gal-single" width="100%" height="auto" alt="' . $picture['post_title'] . '" /></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 | |
/** | |
* Retrieves the thumbnail from a youtube or vimeo video | |
* @param - $src: the url of the "player" | |
* @return - string | |
* | |
**/ | |
function get_video_thumbnail( $src ) { | |
$url_pieces = explode('/', $src); | |
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 | |
// Search only Posts or Pages | |
//Exclude pages from WordPress Search | |
function wpb_search_filter( $query ) { | |
if ( ! is_admin() && $query->is_main_query() && $query->is_search() ) { | |
$query->set( 'post_type', [ 'post', 'page' ] ); | |
} | |
} |
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
printf( '<pre>%s</pre>', print_r( $wp_query, 1 ) ); |
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
html body { | |
display: flex; | |
align-items: stretch; | |
align-content: flex-start; | |
background-position: 200px 50%; | |
background-color: #ffffff; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; |
OlderNewer