Guest User

sasa

a guest
Jan 25th, 2011
246
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (is_archive()) {
  2. if (is_desc_cat("internet") ) { echo '<script type="text/javascript">var default_section = "internet"</script>'; $tren = 'internet'; }
  3. elseif (is_desc_cat("vesti")) { echo '<script type="text/javascript">var default_section = "vesti"</script>'; $tren = 'vesti'; }
  4. elseif (is_desc_cat("sigurnost")) { echo '<script type="text/javascript">var default_section = "sigurnost"</script>'; $tren = 'sigurnost'; }
  5. elseif (is_desc_cat("tech")) { echo '<script type="text/javascript">var default_section = "tech"</script>'; $tren = 'tech'; }
  6. elseif (is_desc_cat("drustvene-mreze") || is_category('339')) { echo '<script type="text/javascript">var default_section = "internet"</script>'; $tren = 'drustvene-mreze'; }
  7. elseif (is_desc_cat("dizajn") || is_category('4')) { echo '<script type="text/javascript">var default_section = "dizajn"</script>'; $tren = 'dizajn'; }
  8. }
  9. elseif (is_single()) {
  10. if ( is_single() && in_category( 'sigurnost' ) ||  post_is_in_descendant_category( get_term_by( 'name', 'sigurnost', 'category' )) || is_category('56') ) {
  11. $tren = 'sigurnost'; echo '<link rel="stylesheet" href="http://baguje.com/wp-content/themes/baguje/style-sigurnost.css" type="text/css" media="screen" />'; }
  12. elseif ( is_single() && in_category( 'vesti' ) ||  post_is_in_descendant_category( get_term_by( 'name', 'vesti', 'category' )) || is_category('70') ) {
  13. $tren = 'vesti';echo '<link rel="stylesheet" href="http://baguje.com/wp-content/themes/baguje/style-vesti.css" type="text/css" media="screen" />';}
  14. elseif (  is_single() && in_category( '746' ) ||  post_is_in_descendant_category( get_term_by( 'name', 'vlog', 'category' )) || is_category('746') ) {
  15. $tren = 'vlog';}
  16. elseif (  is_single() && in_category( 'dizajn' ) ||  post_is_in_descendant_category( get_term_by( 'name', 'dizajn', 'category' )) ) {
  17. $tren = 'dizajn';echo '<link rel="stylesheet" href="http://baguje.com/wp-content/themes/baguje/style-dizajn.css" type="text/css" media="screen" />';}
  18. elseif (  is_single() && in_category( 'internet' ) ||  post_is_in_descendant_category( get_term_by( 'name', 'internet', 'category' )) || is_category('21') ) {
  19. $tren = 'internet';echo '<link rel="stylesheet" href="http://baguje.com/wp-content/themes/baguje/style-internet.css" type="text/css" media="screen" />';}
  20. elseif (  is_single() && in_category( 'tehnologija' ) ||  post_is_in_descendant_category(get_term_by( 'name', 'tehnologija', 'category' )) || is_category('tehnologija') ) {
  21. $tren = 'tech';echo '<link rel="stylesheet" href="http://baguje.com/wp-content/themes/baguje/style-tehnologija.css" type="text/css" media="screen" />';}
  22. elseif (  is_single() && in_category( '339' ) ||  post_is_in_descendant_category('drustvene-mreze') ) {
  23. $tren = 'social'; echo '<link rel="stylesheet" href="http://baguje.com/wp-content/themes/baguje/style-social.css" type="text/css" media="screen" />';}
  24. elseif (is_page() || is_home() || is_tag() || is_page('o-nama') || is_page('zarada') || is_page('autori') || is_page('arhiva') || is_page('kontakt') || is_page('prijava') || is_page('widget') || is_page('autori-faq') ) {
  25. echo '<script type="text/javascript">var default_section = "pocetak"</script>'; $tren = 'pocetak';}
  26. }
  27.  
  28. if ($tren == sigurnost || $tren == tech || $tren == dizajn || $tren == internet || $tren == social )  {
  29. echo '<script type="text/javascript">';
  30. echo 'var default_section = "' .$tren. '";';
  31. echo '$(function() {';
  32. echo '$("ul#nav-sprites a.nav-sprites-'. $tren .'").addClass("aktuelno");';
  33. echo '});';
  34. echo '</script>';
  35. }
  36. elseif ($tren == vesti || $tren == vlog ) {
  37. echo '<script type="text/javascript">';
  38. echo 'var default_section = "pocetak";';
  39. echo '$(function() {';
  40. echo '$("ul#secondary_nav a.'. $tren .'-m").addClass("aktuelno");';
  41. echo '});';
  42. echo '</script>';
  43. }
RAW Paste Data