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
Description | |
Filter the widget_tag_cloud_args. | |
apply_filters( 'widget_tag_cloud_args', | |
array( | |
'taxonomy' => $current_taxonomy, | |
'echo' => 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
- Solution for showing entries in the entry viewer 2 in Caldera Forms | |
- ONLY available, when the permalink structure is not /?p=123 | |
Shortcode: | |
[caldera_forms_entry_viewer id="YOURFORMID" role='public' ] |
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
RewriteEngine On | |
RewriteCond %{HTTP:Origin} !^$|http(s)?://(www\.)?DOMAIN\.com$ [NC] | |
RewriteRule \.(woff|woff2|ttf|eot)$ - [NC,L] | |
RewriteCond %{HTTP_REFERER} !. | |
RewriteRule \.(woff|woff2|ttf|eot)$ - [F,NC,L] | |
Options -Indexes |
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 content_export_with_paragraph($content) { | |
return wpautop($content); | |
} | |
add_filter('the_content_export', 'content_export_with_paragraph', 999); |
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 yoast_priamry() { | |
$category = get_the_category(); | |
$useCatLink = false; | |
// If post has a category assigned. | |
if ($category){ | |
$category_display = ''; | |
$category_link = ''; | |
if ( class_exists('WPSEO_Primary_Term') ) | |
{ | |
// Show the post's 'Primary' category, if this Yoast feature is available, & one is set |
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
/** | |
* the real and better post excerpt | |
*/ | |
function the_real_excerpt(){ | |
global $post; | |
if ( has_excerpt() ) : | |
echo get_the_excerpt(); | |
// Is there a more tag? Then use the teaser. () | |
elseif ( strpos( $post->post_content, '<!--more-->' ) ) : |
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 filter_caldera_forms_autopopulate_post_type_args( $args, $field ) { | |
if( 'fld_3126036' === $field[ 'ID' ] ){ // your field ID !!!! | |
$args[ 'meta_query' ] = | |
array( | |
array( | |
'key' => 'status', // ACF field name | |
'value' => 'sold', // ACF field value | |
'compare' => '!=', // in this case every post is NOT sold | |
) |
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 irgendwasenheader(){ | |
$testrequest = wp_remote_get( 'https://www.domain.com/wp-json/wp/v2/CPT/' ); | |
if( is_wp_error( $testrequest ) ) { | |
// Keine Daten | |
return false; | |
} | |
$testbody = wp_remote_retrieve_body( $testrequest ); | |
$irgendwasengesamt = wp_remote_retrieve_header($testrequest, 'x-wp-total' ); | |
$apiseiten = wp_remote_retrieve_header($testrequest, 'x-wp-totalpages' ); | |
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 | |
/** | |
* Set a max length attribute for all paragraph fields in Caldera Forms | |
*/ | |
add_filter( 'caldera_forms_field_attributes-paragraph', function( $attrs ){ | |
$attrs[ 'maxlength' ] = 255; | |
return $attrs; | |
}); |
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 d6bridge_filter_for_results($content){ | |
if (is_archive('gnt-result') || is_archive('nap-result')) { | |
if ( gutenberg_content_has_blocks( $content ) ) { | |
$blocks = gutenberg_parse_blocks( $content ); | |
$content = ''; | |
foreach ($blocks as $block) { | |
if ($block->blockName == 'rsvpbridge/competition-result') { | |
$content .= $block->innerHTML; | |
} | |
} |
OlderNewer