<?php
$id=44; // ID заданной рубрики
$n=10; // количество выводимых записей;
$i = 1;
$recent = new WP_Query("cat=$id&showposts=1");
while($recent->have_posts()) : $recent->the_post();
if($i == 1) :
?>
//другой стиль
<?php else : ?>
<div class="uk-grid" style="margin-top: 5px;">
<div class="uk-width-1-10" style="width: 50px;"><a href="<?php the_permalink();?>" title="<?php the_title(); ?>"><?php echo get_the_post_thumbnail( $post->ID, array(30,30) ); ?></a></div>
<div class="uk-width-9-10 uk-text-large"><a href="<?php the_permalink();?>" title="<?php the_title(); ?>"><?php the_title(); ?> <span class="uk-text-small uk-text-muted"><?php the_date('Y-m-d', '[', ']'); ?></span></a></div>
</div>
<?php endif; $i++; ?>
<?php endwhile; ?>
<?php echo get_field('text_after_post_programs', $taxonomy . '_' . $term_id); ?>
Подскажите пожалуйста, как мне узнать с помощью Inspect Element, в каком именно файле прописаны слова View my Wishlist?
Я конечно могу взять Notepad++ и найти те 9 файлов где это слово прописано.
// retrieves the attachment ID from the file URL
function pippin_get_image_id($image_url) {
global $wpdb;
$attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $image_url ));
return $attachment[0];
}
// set the image url
$image_url = 'http://yoursite.com/wp-content/uploads/2011/02/14/image_name.jpg';
// store the image ID in a var
$image_id = pippin_get_image_id($image_url);
// retrieve the thumbnail size of our image
$image_thumb = wp_get_attachment_image_src($image_id, 'thumbnail');
// display the image
echo $image_thumb[0];
img {
max-width: 120%;
margin-left: -10%;
margin-right: -10%;
height: auto !important;
}