View difference between Paste ID: ma0Egfsb and
SHOW: | | - or go back to the newest paste.
1-
1+
<?php
2
/**
3
 * The template for displaying My Classifieds page.
4
 * You can override this file in your active theme.
5
 *
6
 * @package Classifieds
7
 * @subpackage UI Front
8
 * @since Classifieds 2.0
9
 */
10
get_header();?>
11
<!-- INNERPAGE -->
12
	<div id="innerpage">
13
	    <!-- Content -->
14
	    <div class="content">    
15
    	<h2><?php the_title(); ?></h2>
16
    
17
    </div>
18
	  <?php while(have_posts()):the_post();?>  
19
	    
20
	    </div>
21
	    <!-- /Content -->
22
	</div>
23
	<!-- /INNERPAGE -->
24
25
	<!-- MAIN -->
26
	<div id="main" class="innerpage">
27
	    <!-- Content of Main -->
28
	    <div class="content">
29
	    
30
	        <!-- page -->
31
	<div id="page" class="design fullwidth">
32
            <div id="content" class="cf-bp-wrap" role="main">
33
                
34
            <?php /* For BuddyPress compatibility */ ?>
35
            <?php global $bp; if ( isset( $bp ) ): ?><div class="cf-padder"><?php endif; ?>
36
37
                <h3><?php the_title(); ?></h3>
38
39
                <?php query_posts( array( 'post_status' => 'publish' , 'post_type' => array( 'classifieds' )  ) ); ?>
40
41
                <?php if ( !have_posts() ): ?>
42
                        <br />
43
                        <div class="info" id="message">
44
                            <p><?php _e( 'No Classifieds found.', 'classifieds' ); ?></p>
45
                        </div>
46
                    <?php endif; ?>
47
                        
48
                <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
49
50
                    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
51
52
                        <div class="entry-content">
53
54
                            <div class="cf-ad">
55
56
                                <div class="cf-image"><?php echo get_the_post_thumbnail( get_the_ID(), array( 200, 150 ) ); ?></div>
57
                                <div class="cf-info">
58
                                    <table>
59
                                        <tr>
60
                                            <th><?php _e( 'Title', 'classifieds' ); ?></th>
61
                                            <td>
62
                                                <a href="<?php the_permalink(); ?>"><?php echo $post->post_title; ?></a>
63
                                            </td>
64
                                        </tr>
65
                                        <tr>
66
                                            <th><?php _e( 'Posted By', 'classifieds' ); ?></th>
67
                                            <td>
68
                                                <?php /* For BuddyPress compatibility */ ?>
69
                                                <?php if ( isset( $bp ) ): ?>
70
                                                <a href="<?php echo bp_core_get_user_domain( get_the_author_meta('ID') ) . 'classifieds/';?>" alt="<?php the_author(); ?> Profile" >
71
                                                <?php else: ?>
72
                                                    <a href="<?php echo get_author_posts_url( get_the_author_meta('ID') ); ?>" alt="<?php the_author(); ?> Profile" >
73
                                                <?php endif; ?>
74
75
                                                <?php the_author(); ?></td>
76
77
                                                </a>
78
                                        </tr>
79
                                        <tr>
80
                                            <th><?php _e( 'Categories', 'classifieds' ); ?></th>
81
                                            <td>
82
                                               <?php $taxonomies = get_object_taxonomies( 'classifieds', 'names' ); ?>
83
                                               <?php foreach ( $taxonomies as $taxonomy ): ?>
84
                                                   <?php echo get_the_term_list( get_the_ID(), $taxonomy, '', ', ', '' ) . ' '; ?>
85
                                               <?php endforeach; ?>
86
                                            </td>
87
                                        <tr>
88
                                        <tr>
89
                                            <th><?php _e( 'Expires', 'classifieds' ); ?></th>
90
                                            <td><?php if ( class_exists('Classifieds_Core') ) echo Classifieds_Core::get_expiration_date( get_the_ID() ); ?></td>
91
                                        </tr>
92
                                    </table>
93
                                </div>
94
95
                            </div>
96
97
                        </div><!-- .entry-content -->
98
                    </div><!-- #post-## -->
99
100
                <?php endwhile; ?>
101
                <?php wp_reset_query(); ?>
102
103
104
            <?php /* For BuddyPress compatibility */ ?>
105
            <?php if ( isset( $bp ) ): ?>
106
                </div><!-- .cf-bp-wrap -->
107
            <?php endif; ?>
108
                
109
			</div><!-- #content -->
110
        </div><!-- #page .design fullwidth -->
111
        <!-- /page -->    
112
    
113
    <br class="clear" />
114
    
115
    </div>
116
    <!-- /Content of Main -->
117
</div>
118
<!-- /MAIN -->
119
<?php endwhile;get_footer();?>