Skip to content

Instantly share code, notes, and snippets.

@dn7734
dn7734 / section-service.blade.php
Created April 8, 2019 08:21
Апартаменты section-service
<section class="section-service">
<div class="container">
<h2 class="title">Наш сервис</h2>
<h4 class="sub-title">Только наивысшее качество</h4>
<div class="row">
<div class="col-md-6">
<div class="tab-content d-none d-md-block">
<div class="tab-pane animated fadeInLeft active " id="home" role="tabpanel"><img class="img-fluid" src="@asset('images/serv-photo.jpg')" alt=""></div>
<div class="tab-pane animated fadeInLeft" id="profile" role="tabpanel"><img class="img-fluid" src="@asset('images/serv-photo.jpg')" alt=""></div>
<div class="tab-pane animated fadeInLeft" id="messages" role="tabpanel"><img class="img-fluid" src="@asset('images/serv-photo.jpg')" alt=""></div>
@dn7734
dn7734 / custom-post.php
Created January 23, 2019 12:39
Register Custom Post Type
<?php
// Register Custom Post Type video
if ( ! function_exists('videos_post_type') ) {
function videos_post_type() {
$labels = array(
'name' => _x( 'Відеогалерея', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Video', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Відеогалерея', 'text_domain' ),
'name_admin_bar' => __( 'Відеогалерея', 'text_domain' ),
@dn7734
dn7734 / qTranslate-X
Created July 17, 2017 10:09
як в шаблонах виводити потрібний язик qTranslate-X
<?php if (qtranxf_getLanguage() == 'ua') {
// run code here if the current language is ua
echo 'Всі новини';
} elseif (qtranxf_getLanguage() == 'ru') {
// run code here if the current language is ru
echo 'Все новости';
} ?>
@dn7734
dn7734 / archive-photogallery.php
Created June 13, 2017 08:38
The template for displaying archive photogallery
<?php
/**
* The template for displaying archive pages.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*/
get_header(); ?>
<div class="content">
<div class="fotogallery-row row">
@dn7734
dn7734 / single-photogallery.php
Created June 12, 2017 08:14
ACF + isotope-layout + magnific-popup.js = gallery
<?php
do_action('get_header');
//get_template_part('templates/header');
?>
<?php //get_template_part('templates/partials/breadcrumbs'); ?>
<?php //get_template_part('templates/base'); ?>
<?php if( have_rows('gallery') ): $i=0;?>
@dn7734
dn7734 / single-portfolio.php
Created June 8, 2017 14:57
wp single for portfolio cpt
<?php
do_action('get_header');
get_template_part('templates/header');
?>
<?php get_template_part('templates/partials/breadcrumbs'); ?>
<?php get_template_part('templates/base'); ?>
@dn7734
dn7734 / archive-portfolio.php
Created June 8, 2017 10:23
wp archive for portfolio cpt
<?php
do_action('get_header');
get_template_part('templates/header');
?>
<?php get_template_part('templates/base'); ?>
<div class="content">
<?php //начало выборки терминов для таксономии portfolio_cat
@dn7734
dn7734 / CPT
Last active June 8, 2017 10:17
Custom post type function.php
// Register Custom Post Type portfolio
if ( ! function_exists('portfolios_post_type') ) {
function portfolios_post_type() {
$labels = array(
'name' => _x( 'Замовники', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Замовники', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Замовники', 'text_domain' ),
'name_admin_bar' => __( 'Замовники', 'text_domain' ),
'archives' => __( 'Замовники', 'text_domain' ),
@dn7734
dn7734 / gist:43d6f9f10d0f26fbfbc0f599f0703d7f
Created June 8, 2017 08:00
ACF + woocomerce tab + qtranslate
/* woocommerce tab Дополнительные возможности*/
add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab_plus' );
function woo_new_product_tab_plus( $tabs ) {
$title = 'title';
// Adds the new tab
if (qtranxf_getLanguage() == 'ua') {
// run code here if the current language is ua
$title = 'Додаткові можливості';
} elseif (qtranxf_getLanguage() == 'ru') {
@dn7734
dn7734 / owl-carusel
Created January 16, 2017 15:26
owl-carusel demo html
<div id="owl-demo" class="owlCarousel">
<div class="item">
<img src="http://realtytech.com/wp-content/uploads/2015/04/idx-customlinks-391x167.jpg" alt="Owl Image" />
</div>
<div class="item">
<img src="http://realtytech.com/wp-content/uploads/2015/04/idx-details-391x167.jpg" alt="Owl Image" />
</div>
<div class="item">
<img src="http://realtytech.com/wp-content/uploads/2015/04/idx-lakedetails-391x167.jpg" alt="Owl Image" />
</div>