<article id="post-<?php echo $post->ID; ?>" <?php post_class(); ?>>
// содержимое записи
</article>
article.category-foo:before {
width: 30px;
height: 30px;
content: ' ';
background-image: url('%img-url%');
display: block;
position: absolute;
top: -25px;
left: -25px;
}
add_filter('sanitize_file_name', '%ваша функция транслитерации%');
$args = array(
'orderby' => array(
'meta_value_num',
),
'order' => 'ASC',
'meta_key' => '%ключ поля%'
);
$args = unserialize(stripslashes($_POST['query']));
$args['paged'] = $_POST['page'] + 1; // следующая страница
$args['post_status'] = 'publish';
$first_page_post_count = 9;
$empty_pages_post_count = 8;
if ($args['paged'] > 1) {
$posts_per_page = $empty_pages_post_count;
if ($args['paged'] == 2) {
$offset = $first_page_post_count;
} else {
$offset = $first_page_post_count + ( $empty_pages_post_count * ($args['paged'] - 2));
}
} else {
$offset = 0;
$posts_per_page = $first_page_post_count;
}
$args['posts_per_page'] =>$posts_per_page;
$args['offset'] => $offset;
$q = new WP_Query($args);
register_activation_hook(__FILE__, 'activate_options');
add_options_page('RDolls Category Adder', 'RDolls Category Setting', 8, __FILE__, 'plugin_setting_page');
add_options_page('RDolls Category Adder', 'RDolls Category Setting', 'manage_options', __FILE__, 'plugin_setting_page');
<?php
$attachment_id = 8; // attachment ID
$image_attributes = wp_get_attachment_image_src( $attachment_id ); // returns an array
if( $image_attributes ) {
?>
<img src="<?php echo $image_attributes[0]; ?>" width="<?php echo $image_attributes[1]; ?>" height="<?php echo $image_attributes[2]; ?>">
<?php } ?>
<div class="sider_container">
<div class="slide_item">
<?php if( ! empty( $brainiak['opt-slides'] ) ) {
foreach ( $brainiak['opt-slides'] as $val )
echo '<img src="' . $val['image']. '" alt="' . $val['title'] .'" class="img-responsive">';
} ?>
</div>
</div>
printf('<img src="%s" alt="%s" class="img-responsive">', $val['image'], $val['title']);
add_action('init', 'register_script');
function register_script() {
wp_register_script( 'custom_jquery', plugins_url('/js/custom-jquery.js', __FILE__), array('jquery'), '2.5.1' );
wp_register_style( 'new_style', plugins_url('/css/new-style.css', __FILE__), false, '1.0.0', 'all');
wp_enqueue_script('custom_jquery');
wp_enqueue_style('new_style' );
}