Skip to content

Instantly share code, notes, and snippets.

View yevhenkobzar's full-sized avatar

Eugene yevhenkobzar

View GitHub Profile
<?php
$idObj = get_category_by_slug('s_about');
$id = $idObj->term_id;
echo get_cat_name($id);
?>
<?php
$tags = get_tags();
if ($tags) {
foreach ($tags as $tag) {
echo '<p>Tag: <a href="' . get_tag_link( $tag->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $tag->name ) . '" ' . '>' . $tag->name.'</a> </p> ';
}
}
?>
<?php
$tags = wp_get_post_tags($post->ID);
<?php echo get_post_meta($post->ID, 'year', true); ?>
@yevhenkobzar
yevhenkobzar / post-thumbnail.html
Created June 5, 2017 07:39 — forked from agragregra/post-thumbnail.html
WordPress Post Thumbnail URL
<?php $url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large' ); $url = $url['0']; ?>
<?php if ( have_posts() ) : query_posts('p=1');
while (have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php the_content(); ?>
<?php the_post_thumbnail(array(100, 100)); ?>
<? endwhile; endif; wp_reset_query(); ?>
function montharr(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11) {
this[0] = m0;
this[1] = m1;
this[2] = m2;
this[3] = m3;
this[4] = m4;
this[5] = m5;
this[6] = m6;
this[7] = m7;
this[8] = m8;
@yevhenkobzar
yevhenkobzar / calc.js
Last active April 1, 2017 08:47
jQuery calculator what calculation price
$(document).ready(function(){
$('.calc select').change(function(){
$edition = $('select#card_edition').val();
$paper = $('select#card_paper').val();
$color = $('select#card_color').val();
$print_file = $('select#card_color option:selected').attr('data-print-file');
$paper_ratio = $('select#card_paper option:selected').attr('data-paper-ratio');
$color_format = $('select#card_color option:selected').attr('data-color');
$print = $('select#card_color option:selected').attr('data-print');
$division = 30;
$(".toggle_mnu").click(function() {
if ($(".top_mnu").is(":visible")) {
$(".top_mnu").fadeOut(600);
}
else {
$(".top_mnu").fadeIn(600);
}
});
.toggle_mnu
width: 60px
height: 60px
float: right
position: relative
z-index: 100
border: none
@yevhenkobzar
yevhenkobzar / jQuery height resize
Last active March 23, 2017 15:55
This code make a scroll for mobile device and make image for full window
function heightDetect() {
$(".main_head").css("height", $(window).height());
};
heightDetect();
$(window).resize(function() {
heightDetect();
});