Subversion Repository Public Repository

wpbsav

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php get_header(); ?>
<div class="row">
	<div class="col-md-12">

		<?php
		if ( have_posts() ) :
		    while (have_posts()) : the_post();
			?>
				<div class="col-md-7">
					<div class="news-img">
						<?php
						if (has_post_thumbnail())
						{
							the_post_thumbnail('full');
						}
						?>
					</div>
			        <div class="bsav-detail-new">
				        <a class="wp-green-color" href="<?php the_permalink() ?>" style="text-decoration:none">
							<h2 class="news-title"><?php the_title() ?></h2>
						</a>
						<div><h5 class="text-muted"><?php the_time('d F Y') ?></h5></div><br>
						<div class="text-muted"><strong><?php the_excerpt() ?></strong></div><br>
			        	<?php the_content() ?>
			        </div><br><br>

			    </div>
				<?php
			endwhile;
		endif;
		?>

		<?php
		global $wpdb;
		$table = $wpdb->prefix . "posts";
        $query = "SELECT *
        			 FROM bsav_posts
        			 WHERE post_type = 'noticies'
        			 AND post_status = 'publish'
        			 AND DATE_FORMAT(post_date,'%Y') = ".get_the_time('Y')."
        			 ORDER BY post_date DESC";
		$relatedPosts = $wpdb->get_results($query, OBJECT);
		if ( $relatedPosts )
		{
		?>
		<div class="col-md-5 news-sidebar">
		<?php
			foreach ( $relatedPosts as $post )
			{
				setup_postdata( $post );
				?>
					<h4 class="news-title-sidebar">
						<span class="text-muted news-date-sidebar"><?php the_time('Y m d') ?> - </span>
						<a class="wp-green-color" href="<?php the_permalink(); ?>" rel="bookmark" title="Permalink: <?php the_title(); ?>">
							<?php the_title(); ?>
						</a>
					</h4>
				<?php
			}
		?>
		</div>
		<?php
		}
        ?>


	</div>

</div>

<?php get_footer(); ?>

Commits for wpbsav/SagreraWP/wp-content/themes/bsav/single-noticies.php

Diff revisions: vs.
Revision Author Commited Message
37 iparra picture iparra Thu 23 Apr, 2015 14:24:10 +0000

Add single-noticies.php