public function widget($args, $instance) { global $post; ?> <div class="skc-container row"> <div class="page-header"> </div> <?php if (have_posts()) { $c = 0; while ($c < $instance['nb_post']) { the_post(); ?> <div class="col-sm-6 col-md-4"> <main class="thumbnail"> <img src="<?php the_post_thumbnail_url(); ?> " alt="<?php the_title(); ?> - featured image"> <div class="caption"> <div class="page-header"> <h3><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h3> </div> <p><?php the_content(); ?> </p> </div> </main> </div> <?php $c++; } wp_reset_postdata(); } else { echo 'It seems that no posts have been created now!'; } ?> </div> <?php }
<div class="mdl-cell mdl-cell--12-col"> <div class="mdl-card mdl-cell mdl-cell--12-col"> <div class="mdl-card__media mdl-color-text--grey-50" style="background-image: url(<?php the_post_thumbnail_url('thumbnail'); ?> );"> <h3><a href="<?php echo get_permalink(); ?> "><?php the_title(); ?> </a></h3> </div> <div class="mdl-color-text--grey-600 mdl-card__supporting-text"> <?php the_content('Lire la suite...'); ?> </div> <div class="mdl-card__supporting-text meta mdl-color-text--grey-600"> <div class="minilogo" style="background-image: url(<?php echo get_avatar_url($post->post_author); ?> );"></div> <div> <strong><?php echo get_the_author_meta('display_name'); ?> </strong> <span><?php the_time(get_option('date_format'));
$meet_location = sb_meet_location(get_field("meet_location")); $meet_theme = !empty($meet_location["locality"]) ? strtolower($meet_location["locality"]) : "severn"; ?> <li class="search-results__item" data-theme="<?php echo $meet_theme; ?> "> <a class="search-results__link" href="<?php the_permalink(); ?> "> <?php if (has_post_thumbnail()) { ?> <img class="search-results__image" alt="" src="<?php echo the_post_thumbnail_url('search-result'); ?> "> <?php } ?> <div class="search-results__body"> <div class="search-results__type"> Meet </div> <h2 class="search-results__title"> <?php echo sb_search_highlight(get_search_query(), get_the_title()); ?> </h2> <div class="content search-results__content">
<?php /** * The headerContent file, containing the head of the pages * @package grahlie */ if (get_the_post_thumbnail($post->ID)) { ?> <div class="header-image" style="background-image: url('<?php the_post_thumbnail_url('featured-image'); ?> ');"> <div class="site-branding"> <?php echo grahlie_use_logotype(); ?> </div> <nav id="site-navigation" class="main-navigation" role="navigation"> <input type="checkbox" id="nav-trigger"> <label for="nav-trigger" id="navopen"></label> <?php wp_nav_menu(array('theme_location' => 'primary', 'menu_id' => 'primary-menu', 'menu_class' => 'navigation', 'container' => '')); ?> </nav> </div> <?php } else {
<div class="bxsliderWrapper" style="visibility: hidden;"> <ul class="latest-news"> <?php $post_objects = get_field('featured_news'); if ($post_objects) { ?> <?php foreach ($post_objects as $post) { ?> <?php setup_postdata($post); ?> <li class="news-item" style="background-image:url('<?php the_post_thumbnail_url("full"); ?> ')"> <?php the_post_thumbnail('large', ['class' => 'visible-xs img-responsive']); ?> <div class="latest-news-info"> <div class="clearfix"> <div class="latest-news-header pull-left">Latest News</div> <div class="latest-news-nav pull-right"> <div class="news-next"></div> <div class="news-prev"></div> </div> </div>
<div class="col-md-9"> <?php global $wp_query; query_posts(array_merge($wp_query->query, array('orderby' => 'title', 'order' => 'ASC'))); if (have_posts()) { ?> <div class="row"> <?php while (have_posts()) { the_post(); ?> <div class="col-sm-6"> <figure class="product-block effect-sarah"> <div class="product-img" style="background-image:url('<?php the_post_thumbnail_url(full); ?> ')"></div> <figcaption> <h2><?php the_title(); ?> </h2> <p> <span class="view-more">Find out more →</span> </p> <a href="<?php the_permalink(); ?> ">View more</a> </figcaption>
<!-- Encabezado --> <div class="modal-header"> <h3 class="text-left">Características del producto</h3> </div> <!-- Cuerpo --> <div class="modal-body"> <!-- row1 --> <div class="row"> <!-- Izquierda --> <div class="col-md-6 col-sm-6 col-xs-6 azul-izq"> <!-- Imagen con su titulo --> <div class="row"> <div class="col-md-12 thumb"> <img src="<?php the_post_thumbnail_url() ?>" class="img-responsive img-diseno"> <?php //get_post_thumbnail( get_the_ID() ); echo '<p class="nombre">'; the_title(); echo '</p>'; ?> </div> </div> <div class="row"> <div class="col-md-12"> <p>Incluye:</p> <p>Tu nombre en cada página interior o el de quien quieras.</p> </div> <div class="col-md-12 colores">
/** * @ticket 33070 */ function test_the_post_thumbnail_url() { $GLOBALS['post'] = self::$post; ob_start(); the_post_thumbnail_url(); $actual = ob_get_clean(); $this->assertEmpty($actual); ob_start(); the_post_thumbnail_url(); $actual = ob_get_clean(); $this->assertEmpty($actual); set_post_thumbnail(self::$post, self::$attachment_id); ob_start(); the_post_thumbnail_url(); $actual = ob_get_clean(); $this->assertEquals(wp_get_attachment_url(self::$attachment_id), $actual); }
<?php } else { // Set the Featured Image as the Background Image on Archive Pages ?> <article id="post-<?php the_ID(); ?> " <?php post_class(); ?> <?php if ('' != get_the_post_thumbnail()) { ?> style="background: white url(<?php echo the_post_thumbnail_url('jinn-featured-image'); ?> );" <?php } ?> > <?php } ?> <div class="post-content <?php echo has_post_thumbnail() ? 'post-thumbnail' : ''; ?> ">
<div class="top-bar" id="top-bar-menu"> <div class="top-bar-left float-left"> <ul class="menu"> <li class="site-text"> <?php if (is_page_template('page-projects.php') && !is_page('other-projects-of-interest')) { ?> <a href="<?php bloginfo('url'); ?> "><h1 style="background:url(<?php the_post_thumbnail_url('medium'); ?> ) no-repeat; background-size: contain;"><span class="screen-reader-text"><?php bloginfo('name'); ?> </span></h1></a> <?php } else { ?> <a href="<?php bloginfo('url'); ?> "><h1 style="background:url(<?php echo get_theme_mod('tcx_logo_image'); ?> ) no-repeat; background-size: contain;"><span class="screen-reader-text"><?php bloginfo('name'); ?> </span></h1></a>
$argumentos = array('tag__in' => $tagsIDs, 'post__not_in' => array($post->ID), 'posts_per_page' => 6, 'caller_get_posts' => 1); $queryRel = new wp_query($argumentos); if ($queryRel->have_posts()) { while ($queryRel->have_posts()) { $queryRel->the_post(); ?> <div class="col-sm-2 col-xs-6 texto-centro"> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "> <div class="imagenPR" style="background-image: url('<?php the_post_thumbnail_url(array(120, 120)); ?> ');"></div> <h4><?php the_title(); ?> </h4> </a> </div> <?php } } $post = $postOriginal; wp_reset_query(); } ?>
<div class="container-fluid recientes"> <?php $original_laPija = $post; $postRecientes = get_posts('numberposts=5&order=DESC&orderby=date'); foreach ($postRecientes as $post) { ?> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "> <div class="row xxx"> <div class="col-xs-6 col-sm-4 thmb" style="background-image: url('<?php the_post_thumbnail_url(array(60, 60)); ?> ');"> </div> <div> <p><?php the_title(); ?> </p> </div> </div> </a> <?php } $post = $original_laPija; ?>
$image = get_the_post_thumbnail_url(); $excerpt = get_the_excerpt(); $link = get_the_permalink(); ?> <!-- article --> <article id="post-<?php the_ID(); ?> " <?php post_class(); ?> > <div class="row no-margin"> <div class="konkurs clearfix"> <!-- <div class="col-5 konkurs-left" style="background-image: url(<?php the_post_thumbnail_url('konkurs'); ?> );"> --> <div class="col-5 konkurs-left" style="background-image: url('<?php echo $konkurs_list_image ? $konkurs_list_image : get_template_directory_uri() . "/img/post1.jpg"; ?> ')"> <div class="konkurs-time pull-left"> <?php if ($konkurs_time > 0) { ?> <span>još</span> <p><?php echo $konkurs_time; ?> </p>
<!-- The Query --> <?php query_posts(array('tag' => 'principal', 'posts_per_page' => -1)); ?> <section class="posts row"> <ul id="slider-main"> <?php if (have_posts()) { while (have_posts()) { the_post(); ?> <li class="item" data-thumb="<?php the_post_thumbnail_url(array(160, 90)); ?> "> <a href="<?php the_permalink(); ?> " id="permalink"> <?php the_post_thumbnail('full'); $content = get_the_content(); $content = trim(preg_replace("/<img[^>]+\\>/i", " ", $content)); ?> <div class="item-info"><?php
if (is_sticky()) { continue; } ?> <div class='block-thumb col-xs-6 col-md-4 '> <a href='<?php the_permalink(); ?> ' title="<?php the_permalink(); ?> " class='block-avatar col-xs-12'> <?php if (has_post_thumbnail()) { echo "<img class='img-responsive center-block thumbnail' src='"; the_post_thumbnail_url(array(200, 200)); echo "' alt='"; the_title(); echo "' title='"; the_title(); echo "' />"; } else { echo "<img class='img-responsive center-block thumbnail' src='' title='404' alt='404' />"; } ?> </a> <div class='block-text col-xs-12'> <div class='intro center-block text-center'> <?php the_title(); ?>
<!-- Add background-image style if is_front_page --> <?php if (is_front_page()) { ?> <header class="banner" style="background-image: url('http://demo.ghost.io/content/images/2014/09/testimg-home-1.jpg')"> <?php } else { ?> <!-- Select thumbnail size according to wp_is_mobile --> <header class="banner" style="background-image: url('<?php if (wp_is_mobile()) { the_post_thumbnail_url('medium'); } else { the_post_thumbnail_url(''); } ?> ')"> <?php } ?> <div class="container"> <a class="brand" href="<?php echo esc_url(home_url('/')); ?> "><?php bloginfo('name'); ?> </a> <nav class="nav-primary"> <?php
} ?> <div id="post-<?php the_ID(); ?> " <?php post_class(); ?> > <div class="entry-outer" <?php if (has_post_thumbnail($post->ID)) { ?> style="background-size: cover; background-position: center; background-image: url('<?php the_post_thumbnail_url('large'); ?> ');" <?php } ?> > <?php if ('link' != $format) { the_title('<h2 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">', '</a></h2>'); } if (has_excerpt($post->ID)) { ?> <div class="entry-summary"> <?php
<div class="projects row <?php echo $slug; ?> -category"> <?php if ($projects->have_posts()) { while ($projects->have_posts()) { $projects->the_post(); $link = get_the_permalink(); $pFields = get_fields(); $pId = $post->ID; ?> <div class="project col-sm-12 col-md-6 col-lg-3 animate-in" data-image="<?php the_post_thumbnail_url($size); ?> "> <div class="inner"> <div class="image animate-element animate-up"> <a href="<?php echo $link; ?> "> <?php echo the_post_thumbnail('project-thumbnail'); ?> <div class="after"><img src="<?php echo $imageFolder . 'after.svg'; ?>
<?php /* Template Name: mainPage */ get_header(); ?> <div id="maincontent"> <!-- print all posts--> <?php if (have_posts()) { while (have_posts()) { the_post(); ?> <!-- featured image div--> <div id="post_featured" style="position: static; background-image:url('<?php the_post_thumbnail_url(); ?> '); background-repeat: no-repeat; background-size: contain;padding:3%;padding-top: 13%; padding-bottom:13%;width:100%;height:auto; margin: 0 auto;"> <a class="blog_excerpt_title" href="<?php the_permalink(); ?> "> <?php the_title(); ?> </a> <div class="blog_excerpt_content"><?php the_content(); ?> </div> </div>
<?php // If a featured image is set, insert into layout and use Interchange // to select the optimal image size per named media query. if (has_post_thumbnail($post->ID)) { ?> <header id="featured-hero" role="banner" data-interchange="[<?php echo the_post_thumbnail_url('featured-small'); ?> , small], [<?php echo the_post_thumbnail_url('featured-medium'); ?> , medium], [<?php echo the_post_thumbnail_url('featured-large'); ?> , large], [<?php echo the_post_thumbnail_url('featured-xlarge'); ?> , xlarge]"> </header> <?php }
<?php /** * Template part for displaying page content in page.php. * * @link https://codex.wordpress.org/Template_Hierarchy * * @package Jinn */ if ('' != get_the_post_thumbnail()) { ?> <div class="index-post-thumbnail" style="background: url( <?php the_post_thumbnail_url('full'); ?> )"> <a href="<?php the_permalink(); ?> "> <?php //the_post_thumbnail( 'jinn-featured-image' ); ?> </a> </div> <?php } ?> <article id="post-<?php the_ID(); ?>
the_title(); echo '</p>'; ?> </div> <div class="col-md-12 colores"> <h4 class="text-left">ELIGE EL COLOR</h4> <?php do_action("woocommerce_tm_epo_fields"); ?> </div> </div> <div class="row" style="display:none;"; > <div class="col-md-12 thumb"> <img src="<?php the_post_thumbnail_url() ?>" class="img-responsive img-interior"> </div> </div> </div> <!-- fin de Izquierda --> <!-- Derecha --> <div class="col-md-6 col-sm-6 col-xs-6 blanco-der"> <div class="notif-cont"> <i class="fa fa-calendar"></i><span class="notificacion"></span><span class="cs">AGENDAS SELECCIONADAS</span> </div> <h4 class="text-left">ELIGE EL TIPO DE AGENDA</h4> <!-- <p>¡Selecciona varios tamaños al mismo tiempo!</p> -->