$query = new WP_Query( array(
'orderby' => array(
'title' => 'DESC',
'ID' => 'DESC',
),
) );
<?php get_header(); ?>
<?php if (function_exists('setPostViews')) setPostViews(get_the_ID()); ?>
<div class="newsListFull">
<?php while ( have_posts() ) : the_post(); ?>
<h3 class='newsTitles'><?php the_title() ?></h3>
<div class="border_news">Автор: <?php the_author_link(); ?>, <?php the_date('d-m-Y') ?></div>
<div class='news_content'><?php the_content() ?></div>
<div class='border_news'>
<div class='vk'><!-- Put this script tag to the <head> of your page -->
<script type="text/javascript" src="//vk.com/js/api/openapi.js?116"></script>
<script type="text/javascript">
VK.init({apiId: 4956833, onlyWidgets: true});
</script>
<div id="vk_like"></div>
<script type="text/javascript">
VK.Widgets.Like("vk_like", {type: "mini"});
</script>
</div>
</div>
<h3 class="newsTitlesB_2">Другие новости</h3>
<div class='other_news'>
<?php
$the_query = new WP_Query( 'showposts=3' );
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post(); ?>
<a href="<?php the_permalink(); ?>">
<div class='postBoxs'><?php echo get_the_post_thumbnail( $post->ID, 'thumbnail', array('class' => 'images') ); ?>
<h3><?php the_title(); ?></h3>
</div>
</a>
<?php
}
}
wp_reset_postdata();
?>
<div style='clear: both;'></div>
</div>
<?php
}
}
wp_reset_query();
} ?>
<?php
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
<?php endwhile; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
function add_extra_links( $user )
{
?>
<h3>Ссылки</h3>
<table class="form-table">
<tr>
<th><label for="custom_link">Оценки:</label></th>
<td><span name="custom_link" class="regular-text"><a href="#">www.ocenki.com</a></span></td>
</tr>
</table>
<?php
}
if($current_user->ID == 1) {
add_action( 'show_user_profile', 'add_extra_links' );
add_action( 'edit_user_profile', 'add_extra_links' );
}
<ul>
<li ng-repeat="(i, items) in collection">
<ul>
<li ng-repeat="(j, item) in items">
{{i}} — {{j}}
Чекбокс: <input type="checkbox" name="field[{{i}}][{{j}}]">
<button ng-click="doSomething(i, j)">Клацнуть</button>
<button ng-click="buyItem(item.id)">Купить</button>
</li>
</ul>
</li>
</ul>