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
if ( ! function_exists( 'theme_special_nav' ) ) { | |
function theme_special_nav() { | |
// Do something. | |
} | |
} |
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( 'init', 'my_add_excerpts_to_pages' ); | |
function my_add_excerpts_to_pages() { | |
add_post_type_support( 'page', 'excerpt' ); | |
} | |
?> |
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 | |
// disable wordpress 3,6 post formats ui ! | |
add_filter( 'enable_post_format_ui', '__return_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 | |
// mk function to get singular <-> singular link. link between custom tax in pages == to pages order (parent - child) | |
// $a = post_type(string); | |
// $b = post_parent(int); | |
// $c = tax(string); | |
// $d = post_id(int); | |
function mk_get_tax_to_page_link( $a, $b, $c, $d ){ | |
$query = new WP_Query( array('post_type' => $a, 'post_parent' => $b, $c => get_the_term_list( $d, $c ))); |
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 | |
// mk function to get page content by id! | |
// function() -> takes post ID | |
function mk_get_page_content_by_id( $pid ){ | |
$page_id = $pid; | |
$page_data = get_page( $page_id ); | |
$content = apply_filters('the_content', $page_data->post_content); | |
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 | |
// mk function to get all custom tax list items | |
// function() -> GET STRING | |
function mk_custom_tax( $taxstring ){ | |
$terms = get_terms( $taxstring ); | |
$ret = ""; | |
if ($terms) { | |
$ret = "<div class='taxlist'>"; | |
foreach($terms as $term) { |
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
javascript:if(!window.jQuery)(function(d,s){s=d.createElement('script');s.src='https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.js';(d.head||d.documentElement).appendChild(s)})(document); |
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
########################### | |
jquery fn za skrol: | |
jQuery.fn.skrol = function() {$('body').animate({'scrollTop': this.offset().top}, 'slow', 'swing');}; | |
# USE: $('.class').skrol(); | |
########################### |
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
<config> | |
<global> | |
<!-- ... --> | |
</global> | |
<stores> | |
<default> | |
<web> | |
<unsecure> | |
<base_url>http://beispiel.tld/shop/</base_url> | |
</unsecure> |