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 | |
$content = get_the_content('read more', true); | |
$content = substr($content,0,900); | |
$content = apply_filters('the_content', $content ); | |
$content = $content . '<a href="'.get_permalink().'">(Read More...)</a>'; | |
echo $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 $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?> | |
<header class="intro-header" style="background-image: url('<?=$url?>')"> |
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 | |
$video = get_post_meta($post->ID, "video_id", true); | |
while ( $video_query->have_posts() ) : | |
$video_query->the_post(); | |
echo wp_oembed_get( 'https://vimeo.com/' . $video ); | |
endwhile; | |
?> |
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
@font-face { | |
font-family: Wendy; | |
src: local("Wendy"), | |
url(wendy.ttf); | |
} |
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
.video-container { | |
position: relative; | |
padding-bottom: 56.25%; | |
padding-top: 30px; height: 0; overflow: hidden; | |
} | |
.video-container iframe, | |
.video-container object, | |
.video-container embed { | |
position: absolute; |
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
$my_query = new WP_Query($freereads_args); | |
$post_count = $my_query->found_posts; |
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
git clean -f =>DELETES untracked WARNING!!!!! | |
git reflog -- summary with commit #, then: | |
GO BACK TO PREV COMMIT: | |
git reset ---hard <filename> | |
REMOVE COMMITTED: | |
git reset HEAD <file> | |
UN-ADD files => git reset FILE | |
RESTORE PREV VER OF 1 FILE=> |
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 | |
//Nature News loop, featured article with thumbnail | |
$args = array ( | |
'posts_per_page' => '1', | |
'page_id' => '4444' | |
); | |
$query = new WP_Query( $args ); | |
echo '<h3 class="title">The Title</h3>'; | |
// The Loop |
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
var viewportWidth = $(window).width(); | |
if (viewportWidth < 481){ } |
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
function externalLinks() { | |
var url_test = false; | |
var anchors = document.getElementsByTagName("a"); | |
for (var i=anchors.length; i>=0; i--) { | |
var anchor = anchors[i]; | |
anchor_url = encodeURI(anchor); | |
url_test = /baynature/.test(anchor_url); | |
// baynature is the name of the site | |
if (url_test == false){ | |
if (anchor_url != "undefined"){ |
NewerOlder