This file contains hidden or 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
//Create categories for pages | |
function create_pages_taxonomy() { | |
$labels_pages_cat = array( | |
'name' => _x( 'Теги страниц', 'taxonomy general name' ), | |
'singular_name' => _x( 'Тег страницы', 'taxonomy singular name' ), | |
'search_items' => __( 'Искать теги страниц' ), | |
'all_items' => __( 'Все теги страниц' ), | |
// 'parent_item' => __( 'Родительская категория страниц' ), | |
// 'parent_item_colon' => __( 'Родительская категория страниц' ), | |
'edit_item' => __( 'Редактировать' ), |
This file contains hidden or 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 wp_nav_menu( array( 'theme_location' => 'secmenu', 'container_class' => 'secmenu', 'container' => 'nav' ) ); ?> |
This file contains hidden or 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
// Create menu locations | |
register_nav_menus( | |
array( | |
'mainmenu' => 'Место для главного меню' | |
,'footermenu' => 'Место для меню в подвале' | |
) | |
); |
This file contains hidden or 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
// Main thumbnail size | |
set_post_thumbnail_size( 80, 80, true ); | |
//Custom post thumbnail sizes | |
add_image_size( 'miniposter', 96, 130, true ); //(cropped) |
This file contains hidden or 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
function remove_menus(){ | |
remove_menu_page( 'edit-comments.php' );//Comments | |
} | |
add_action( 'admin_menu', 'remove_menus' ); |
This file contains hidden or 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
//http://codepen.io/brenna/pen/hbDqL | |
@mixin hexagon($size: 300px, $background: url(http://placekitten.com/g/650), $shadow: 0 0 20px rgba(0,0,0,0.8), $borderWidth: 3px){ | |
$scaleFactor: tan(30deg); /*this smushes a square into a 60deg/120deg rhombus*/ | |
$inverseScale: 1/$scaleFactor; | |
$sideLength: $size/sqrt(3); | |
$totalHeight: $sideLength + $size; | |
$boxShadow: $shadow; | |
$scaledBorderWidth: $borderWidth/$scaleFactor; | |
$border: solid #{$borderWidth} #fff; | |
$scaledBorder: solid #{$scaledBorderWidth} #fff; |
This file contains hidden or 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
/* ============================================================================ | |
Triangles SASS mixin | |
v1.1 | |
============================================================================ */ | |
//Creates one triangle or two triangles (arrows) pointed to the opposite sides. | |
//Apply to a parent selector (for example, article, not .tags itself). | |
//Takes width, height, direction (top/left...)/orientation (horizontal, vertical), color, and from none up to two selectors arguments. Do not forget to put selector args in quotes if they contain dots, combinators etc. |
This file contains hidden or 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
//This mixin is based on this code https://coderwall.com/p/mqk9ea | |
//It allows for a crossbrowser partial applying of both effects | |
//$toggle powers on and off the effect, $mode can be 'grayscale' or 'sepia' | |
@mixin grayscale( $toggle: "on", $mode:"grayscale", $amount: 1 ) { | |
$svg-type: "matrix"; | |
$svg-value-grayscale: "0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"; | |
$svg-value-sepia: (0.393 + 0.607 * (1 - $amount)) + " " + (0.769 - 0.769 * (1 - $amount)) + " " + (0.189 - 0.189 * (1 - $amount)) + " 0 0 " + (0.349 - 0.349 * (1 - $amount)) + " " + (0.686 + 0.314 * (1 - $amount)) + " " + (0.168 - 0.168 * (1 - $amount)) + " 0 0 " + (0.272 - 0.272 * (1 - $amount)) + " " + (0.534 - 0.534 * (1 - $amount)) + " " + (0.131 + 0.869 * (1 - $amount)) + " 0 0 0 0 0 1 0"; | |
$ie-alpha: alpha(#{"opacity="}round( $amount * 100 ) ); |
This file contains hidden or 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
//Adapted for non-italic 13px Arial text | |
@mixin slanted-highlight($bgcolor, $element: span) { | |
#{$element} {background:$bgcolor;} | |
#{$element}:before {border-bottom:15px solid $bgcolor; border-left:4px solid transparent; content:""; display:inline-block; height:0; left:-4px; top:3px; width:0; position:relative;} | |
#{$element}:after {border-top:15px solid $bgcolor; border-right:4px solid transparent; content:""; display:inline-block; height:0; left:4px; top:3px; width:0; position:relative;} | |
} |
This file contains hidden or 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
<ul class="links"> | |
<?php | |
$bookmarks = get_bookmarks( array( | |
'orderby' => 'name', | |
'order' => 'ASC', | |
'category' => '9' | |
)); | |
// Loop through each bookmark and print formatted output | |
foreach ( $bookmarks as $bm ) { |