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
a[target="_blank"]:not([href*="pineco.de"])::after { | |
/* You can style it anyway you want... */ | |
content: ''; | |
display: inline-block; | |
background: transparent url(external-arrow.svg) no-repeat center center; | |
background-size: cover; | |
width: 1rem; | |
height: 1rem; | |
margin-left: 0.3rem; | |
} |
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
document.addEventListener( 'wpcf7mailsent', function( event ) { | |
if ( '101' == event.detail.contactFormId ) { | |
location = 'https://www.example.com/thank-you-page-one/'; | |
} else { | |
location = 'https://www.example.com/thank-you-page-two/'; | |
} | |
}, false ); |
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 | |
function pine_add_page_slug_body_class( $classes ) { | |
global $post; | |
if ( isset( $post ) ) { | |
$classes[] = 'page-' . $post->post_name; | |
} | |
return $classes; |
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 | |
function cone_change_infinite_scroll_btn_text() { | |
if ( is_home() || is_archive() ) { ?> | |
<script type="text/javascript"> | |
var textCaption = ''; | |
if ( 'en-US' == $( 'html' ).attr( 'lang' ) ) { | |
textCaption = 'Load More Posts'; | |
} else { |
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 | |
function pine_feed_add_image( ) { | |
global $post; | |
$output = ''; | |
if( get_post_type() !== 'post' ) { | |
return; | |
} |
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 | |
function pine_post_thumbnails_in_feeds( $content ) { | |
global $post; | |
if( has_post_thumbnail( $post->ID ) ) { | |
$content = '<div>' . get_the_post_thumbnail( $post->ID, 'your-image-size' ) . '</div>' . $content; | |
} | |
return $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
.break_long_text { | |
word-break: break-all; | |
word-break: break-word; | |
hyphens: auto; | |
} |
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
.button { | |
display: inline-block; | |
color: #fff; | |
padding: 20px 30px; | |
text-transform: uppercase; | |
font-weight: 700; | |
border-radius: 3px; | |
cursor: pointer; | |
background-image: linear-gradient(45deg, #ffc459, #ff6638); |
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 the Terms(s) columns to the snippets post type | |
function set_custom_edit_snippets_columns($columns) { | |
$columns['terms'] = __( 'Term(s)', 'pine' ); | |
return $columns; | |
} | |
add_filter( 'manage_snippets_posts_columns', 'set_custom_edit_snippets_columns' ); | |
// Add the data to the snippet's Term(s) column |
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 | |
$title = sanitize_title('Slugify Any Text in WordPress with sanitize_title() Function'); | |
echo $title; // slugify-any-text-in-wordpress-with-sanitize_title-function |
NewerOlder