Last active
April 7, 2016 09:52
-
-
Save olkunmustafa/279bbe7d0d733b89585b933a8f2b333f to your computer and use it in GitHub Desktop.
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 ( is_category() ) { | |
echo "<script>console.log( 'Cat ID : " . $cat . "' )</script>"; | |
} | |
?> |
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 ( is_category() ) { | |
$category = get_the_category( $cat ); | |
$parent = $category[0]->category_parent; | |
switch( $parent ){ | |
case 5: | |
echo "<script>console.log( 'Parent No 5 olan reklam modeli' )</script>"; | |
break; | |
} | |
} | |
?> |
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 ( is_category() ) { | |
switch ( $cat ) { | |
case 45: | |
case 46: | |
case 47: | |
echo "<script>console.log( 'Reklam Modeli 1' )</script>"; | |
break; | |
case 48: | |
case 49: | |
case 50: | |
echo "<script>console.log( 'Reklam Modeli 2' )</script>"; | |
break; | |
default: | |
echo "<script>console.log( 'Reklam Modeli Default' )</script>"; | |
break; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment