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_filter('comment_post_redirect', 'redirect_after_comment'); | |
function redirect_after_comment(){ | |
wp_redirect('/thank-you-page/'); | |
exit(); | |
} | |
?> |
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 title_text_input( $title ){ | |
return $title = 'Enter new title'; | |
} | |
add_filter( 'enter_title_here', 'title_text_input' ); | |
?> |
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_filter('the_content', 'my_addlightboxrel'); | |
function my_addlightboxrel($content) { | |
global $post; | |
$pattern ="/<a(.*?)href=('|\")(.*?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i"; | |
$replacement = '<a$1href=$2$3.$4$5 rel="lightbox" title="'.$post->post_title.'"$6>'; | |
$content = preg_replace($pattern, $replacement, $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
<?php | |
add_action('admin_head', 'excerpt_textarea_height'); | |
function excerpt_textarea_height() { | |
echo' | |
<style type="text/css"> | |
#excerpt{ height:500px; } | |
</style> | |
'; | |
} | |
?> |
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 | |
// Der Query für die Seite mit der ID 97 (als Beispiel) | |
$my_new_query = new WP_Query( 'page_id=97' ); | |
// Loop starten | |
while ( $my_new_query->have_posts() ) : $my_new_query->the_post(); | |
the_content(); | |
endwhile; | |
// Und ein Reset - wichtig! | |
wp_reset_postdata(); | |
?> |
NewerOlder