$('parent_static').on('event', 'children_dinamic', handler);
# BEGIN WordPress
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
$id = icl_object_id(get_the_ID(), 'page', false,ICL_LANGUAGE_CODE);
is_page($id){//id page about
//include template page-about
}else{
//include template page-default
}
// SHARE BTN
//===============js======================
function socialopen(url){
var winpar='width=500,height=400,left=' + ((window.innerWidth - 500)/2) + ',top=' + ((window.innerHeight - 400)/2) ;
window.open(url,'tvkw',winpar);
}
$('a.bt').click(function(){
var url = $(this).attr('href');
socialopen(url);
return false;
});
//===============html=====================
<ul class="social_share">
<li>
<a class="bt" href="https://twitter.com/share?url=<?php the_permalink(); ?>&text=<?php the_title(); ?>">
<i class="fa fa-twitter" aria-hidden="true"></i>
</a>
</li>
<li>
<a class="bt" href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>&title=<?php the_title(); ?>">
<i class="fa fa-facebook" aria-hidden="true"></i>
</a>
</li>
<li>
<a class="bt" href="http://vkontakte.ru/share.php?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>">
<i class="fa fa-vk" aria-hidden="true"></i>
</a>
</li>
</ul>
Список с классом .social_share вставляется в каждую конкретную запись в цикле. $info = get_the_category()[0]->cat_ID
$query = new WP_Query( array(
'post_type' => 'post',
'cat'=>$info,
'post__not_in' =>get_the_ID(),
) );
if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
<div class="card col-6 text-center"><div class="text-center"><?php the_post_thumbnail('thumbnail');?></div><div class="card-body"><a class="permlinccat" href="<?php the_permalink() ?>" title="Перейти к посту: <?php the_title(); ?>" ><div class="card-title h5"><?php the_title(); ?></div></a></div></div>
<?php endwhile; else: ?>
Постов не найдено
<?php endif; wp_reset_query(); ?>
<?php
require_once 'assets/theme_setup.php';
require_once 'assets/helpers.php';
require_once 'assets/post_types.php';
require_once 'assets/shortcodes.php';
require_once 'assets/ajax.php';
if (is_admin())
require_once 'assets/admin_panel_functions.php';
$('.click-link-btn').on('click', function(){
var $this = $(this),
product = $this.closest('.product'),
product_title = product.find('.product-title').text();
$('.modal-body #hidden_title').val('product_title');
});
UPDATE wp_options SET option_value = replace(option_value, 'http://denwerhost', 'http://newdomain.ru') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://denwerhost','http://newdomain.ru');
UPDATE wp_posts SET post_content = replace(post_content, 'http://denwerhost', 'http://newdomain.ru');
http://denwerhost
" заменить на ваш старых домен, а "http://newdomain.ru
" на новый и выполнить запрос, тогда все заработает.