$(document).ready(function () {
functuion resizeSubmenu() {
...
}
resizeSubmenu();
$(window).on('resize', function(){
resizeSubmenu();
});
});
$warsztaty_q = new WP_Query(array(
'post_type' => array('kalendarium', 'warsztaty')
<?=do_shortcode(get_post()->post_content)?>
RewriteEngine On
RewriteCond %{ENV:HTTPS} !on
RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
php_flag log_errors on
# BEGIN WordPress
# Строки между `BEGIN WordPress` и `END WordPress` были созданы автоматически.
# Они могут быть изменены только фильтрами WordPress.
# Все изменения между этими отметками будут перезаписаны.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>
# END WordPress
php_value upload_max_filesize 50M
php_value post_max_size 51M
<div class="wrapper">
<?php wp_nav_menu( array(
'sort_column' => 'menu_order',
'theme_location' => 'primary-menu',
'container' => false,
'menu_class' => 'navigation_menu',
'walker' => new My_Walker_Nav_Menu()
) ); ?>
</div>
// Главное меню
class My_Walker_Nav_Menu extends Walker_Nav_Menu {
function start_lvl(&$output, $depth = 1, $args = Array()) {
$indent = str_repeat("\t", $depth);
$output .= "\n$indent<ul class=\"navigation_submenu-".$depth."\">\n";
}
public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
$t = '';
$n = '';
} else {
$t = "\t";
$n = "\n";
}
$indent = ( $depth ) ? str_repeat( $t, $depth ) : '';
$classes = empty( $item->classes ) ? array() : (array) $item->classes;
$classes[] = 'menu-item-' . $item->ID;
$args = apply_filters( 'nav_menu_item_args', $args, $item, $depth );
$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args, $depth ) );
$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
$id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args, $depth );
$id = $id ? ' id="' . esc_attr( $id ) . '"' : '';
$output .= $indent . '<li' . $id . $class_names .'>';
$atts = array();
$atts['title'] = ! empty( $item->attr_title ) ? $item->attr_title : '';
$atts['target'] = ! empty( $item->target ) ? $item->target : '';
$atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
$atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args, $depth );
$attributes = '';
foreach ( $atts as $attr => $value ) {
if ( ! empty( $value ) ) {
$value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
$attributes .= ' ' . $attr . '="' . $value . '"';
}
}
$title = apply_filters( 'the_title', writeTitle($item->title), $item->ID );
$title = apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth );
if ($depth == 1) {
$writeIcon = '<div class="submenu__icon">
<div class="submenu__icon__img" style="background-image: url('.get_illImg($item->object_id)['url'].');"></div>
</div> ';
} else {
$writeIcon = '';
}
$item_output = $args->before;
if (($depth == 1) && (get_field('activity', 'category_' .$item->object_id) == 'inactive')) {
$item_output .= '<div' .addTooltip($item->object_id). '>';
$item_output .= $writeIcon;
$item_output .= $title;
$item_output .= '</div>';
} else {
$item_output .= '<a'. $attributes .'' .addTooltip($item->object_id). '>';
$item_output .= $writeIcon;
$item_output .= $args->link_before . $title . $args->link_after;
$item_output .= '</a>';
}
$item_output .= $args->after;
$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
}
}
<div class="main-news">
<?php
$pc = new WP_Query('cat=14&orderby=date&posts_per_page=3');
while ($pc->have_posts()) :
$pc->the_post();?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php endwhile; ?>
</div>
GROUP BY user_to, user_from
GROUP BY MAX(user_to, user_from), MIN(user_to, user_from)
GROUP BY if(user_to = :user_id, user_from, user_to)
Как узнать при сколе на какой странице находишься в данный момент?
Как осуществить переход по страницам?
body{
background-image: url("https://dwstroy.ru/lessons/les3397/demo/img/ep_naturalwhite.png");
}
.social{
position: fixed;
top: 50px;
right: 0;
z-index: 1000;
}
.dws-button{
background-color: #3b5998;
width: 100px;
height: 25px;
padding: 5px;
transition: all 0.5s;
}
a{
color: #ffffff;
text-decoration: none;
}
a i.fa{
font-size: 25px;
text-align: center;
display: block;
}
.dws-share{
float: right;
width: 40px;
}
.dws-text{
float: left;
font-size: 20px;
position: relative;
top: 2px;
left: 5px;
}
.dws-facebook {background-color: #3b5998;}
.dws-vk {background-color: #507299;}
.dws-twitter {background-color: #33bdf1;}
.dws-youtube {background-color: #e62117;}
.dws-odnoklassniki {background-color: #ee8208;}
.dws-envelope-o {background-color: #656766;}
.dws-button{
width: 40px;
height: 25px;
padding: 5px;
overflow: hidden;
margin-left: auto;
}
.dws-button:hover{
background-color: #000;
width: 50px;
padding-right: 15px;
}
.dws-facebook:hover{width: 75px}
.dws-vk:hover,.dws-youtube:hover{width: 95px}
.fixed-top {
position: fixed;
}
@media only screen and (max-width: 1024px)
.bee3D--effect__carousel {
transform: scale(0.9);
margin: -38px 0;
}
@media only screen and (max-width: 786px)
.bee3D--effect__carousel {
transform: scale(0.8);
margin: -65px 0;
}
@media only screen and (max-width: 610px)
.bee3D--effect__carousel {
transform: scale(0.67);
margin: -93px 0;
}
@media only screen and (max-width: 480px)
.bee3D--effect__carousel {
transform: scale(0.55);
margin: -120px 0;
}
$text = preg_replace('/[\s]+/s', ' ', $text);
$text = preg_replace('/[\s\-]*-[\s\-]*/s', '-', $text);
echo $text ;
@import url("");