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 // based on https://support.advancedcustomfields.com/forums/topic/how-do-i-filter-and-sort-event-posts-with-start-and-end-date/ | |
$query_args = array( | |
//'paged' => 1, | |
'post_type' => 'termine', | |
'post_status' => 'publish', | |
'orderby' => 'meta_value_num', | |
'order' => 'ASC', | |
'posts_per_page' => -1, | |
'meta_key' => 'event_start_date', | |
'meta_query' => array( |
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 | |
// How to disable the single view for a custom post type | |
// see https://wordpress.stackexchange.com/questions/128636/how-to-disable-the-single-view-for-a-custom-post-type | |
add_action( 'template_redirect', 'wpse_128636_redirect_post' ); | |
function wpse_128636_redirect_post() { | |
$queried_post_type = get_query_var('post_type'); | |
if ( is_single() && 'my_post_type_name' == $queried_post_type ) { |
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 ppai_quotebox( $atts ) { | |
$templateDirectory = get_bloginfo('template_directory'); | |
extract( shortcode_atts( array( | |
'imgpath' => $templateDirectory.'/images/quote-dummy.jpg', | |
'quote' => 'Ohne ein Zitat sehe ich scheisse aus', | |
'author' => 'Die Zitatbox', |
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
// see Source | |
// http://blog.ostryweb.cz/2017/05/pass-values-from-shortcode-in-contact.html | |
// in Contact Form 7 Admin | |
[text my-extra-field default:shortcode_attr readonly] | |
// in Wordpress Template | |
<?php | |
$my_extra_field = "This can be dynamic"; | |
$shortcode = '[contact-form-7 id="123" title="Name of the form" my-extra-field="'.$my_extra_field'"]'; |
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
UPDATE wp_options SET option_value = REPLACE(option_value, 'http://test.rudrastyh.com', 'https://rudrastyh.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://test.rudrastyh.com', 'https://rudrastyh.com'); | |
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'http://test.rudrastyh.com','https://rudrastyh.com'); | |
UPDATE wp_comments SET comment_content = REPLACE (comment_content, 'http://test.rudrastyh.com', 'https://rudrastyh.com'); | |
UPDATE wp_comments SET comment_author_url = REPLACE (comment_author_url, 'http://test.rudrastyh.com','https://rudrastyh.com'); | |
UPDATE wp_posts SET guid = REPLACE (guid, 'http://test.rudrastyh.com', 'https://rudrastyh.com') WHERE post_type = 'attachment'; | |
// https://rudrastyh.com/tools/sql-queries-generator |
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
/* Repeating items (3 in a row) | |
-------------------------------------------------------------------------------------------------- */ | |
ul.row-of-three { | |
margin: 0; | |
padding: 0; | |
list-style: none; | |
} | |
ul.row-of-three li { | |
float: left; | |
margin-right: 2%; |
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
# Wordpress Stuff (Single or Multisite) | |
# Disallow Directoy Browsing | |
Options -Indexes | |
# Enanble File Compression | |
# Quelle: http://magazin.phlow.de/wordpress/beschleunigen/ | |
<ifModule mod_gzip.c> | |
mod_gzip_on Yes |
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 if( have_rows('mede_events') ): while ( have_rows('mede_events') ) : the_row(); ?> | |
<hr/> | |
<h2><i class="fa fa-flag"></i> <?php the_sub_field('med_event_title'); ?></h2> | |
<?php the_sub_field('med_event_copy'); ?> | |
<?php $images = get_sub_field('med_event_gallery'); ?> | |
<?php if( $images ): foreach( $images as $image ): ?> | |
<a href="<?php echo $image['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 if( have_rows('show_hide_repeater') ): ?> | |
<h2><?php the_field('show_hide_repeater_headline'); ?></h2> | |
<?php while ( have_rows('show_hide_repeater') ) : the_row(); ?> | |
<div class="open-close"> | |
<a class="infobox-button close" href="#"> | |
<h3 title="Projekt öffnen/schließen"><?php the_sub_field('show_hide_title'); ?></h3> | |
<span class="more"><i title="Projekt öffnen" class="fa fa-chevron-down"></i></span> | |
<span class="hide"><i title="Projekt schließen" class="fa fa-chevron-up"></i></span> | |
</a> |
NewerOlder