Forum Replies Created

Viewing 15 replies - 1 through 15 (of 23 total)
  • @xpertone I just sent you an email. Thanks

    Hi @xpertone can you contact me about doing the automatic calculation? It looks like this isn’t a feature you have added yet, but I might be willing to pay you to do this for me? Really would like to have it.

    Thank you

    Thread Starter Josh

    (@ikjosh)

    I am here, I didn’t get an email, how can I contact you directly?

    Thread Starter Josh

    (@ikjosh)

    Try again, I updated my profile

    Thread Starter Josh

    (@ikjosh)

    You tried to send me an email?

    Thread Starter Josh

    (@ikjosh)

    Excellent, that seems to be working!

    Is there a way to alter the pagination so that it goes like this…

    2013 – 2012 – 2011 … 2009

    Instead of Next > and Prev ?

    Thread Starter Josh

    (@ikjosh)

    <?php
    
    get_header();
    ?>
    <!-- Body -->
    <div class="wrapper">
    	<div id="leftNav">
    		<h4>Menu</h4>
    		<?php wp_nav_menu( array( 'container_class' => '', 'menu' => 'Sidebar Menu', 'depth' => '1' ) ); ?>
        </div>
        <div id="centerCol">
        	<div id="centerBanner">
    		<?php
    			if ( has_post_thumbnail() ) {
    				the_post_thumbnail();
    			}else{
    
    			}
    		?>
    		</div>
            <div id="contentArea">
            	<div class="pad">
    			<div id="speakers">
    
    				<h2>Previous</h2>
    
    				<?php
    					$i = 1;
    					// not needed (plugin takes over pagination)
    					//$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    
    					$args = array(
    						'cat' => '17',
    						'post__not_in' => array( $post_ID ),
    						'order' => 'DESC',
    						'orderby' => 'meta_value_num',
    						'meta_key' => 'event_date',
    						'date_pagination_type' => 'yearly',
    						//'posts_per_page' => '12', why show 12 posts?
    						//'paged' => $paged
    					);
    
    					// the custom query
    					$the_query = new WP_Query( $args );
    
    					// set the max_num_pages variable
    					if ( function_exists( 'km_dp_set_max_num_pages' ) )
    						km_dp_set_max_num_pages( $the_query );
    				?>
    				<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
    				<?php
    					$get_event_date = get_post_meta( $post->ID, 'event_date', true );
    					$get_event_date = substr( $get_event_date, 0, -3 );
    					$event_date = date( "m/d/Y", $get_event_date );
    				?>
    				<div id="<?php echo $i; ?>">
    					<div class="img"><?php the_post_thumbnail('speaker-thumbnail'); ?></div>
    					<div class="info">
    						<span class="title"><strong><?php the_title(); ?></strong></span><br />
    						<span class="date"><?php echo $event_date; ?> - Guest Speaker <?php echo get_post_meta($post->ID, 'Wise Talk Speaker', true) ?></span>
    						<a class="redbutton" href="<?php the_permalink(); ?>" style="margin-top: 10px;">listen</a>
    					</div>
    					<div class="break"></div>
    					<hr />
    				</div>
    				<?php $i++; endwhile; ?>
    				<div class="navigation">
    					<div class="alignleft"><?php previous_posts_link('&laquo; Previous') ?></div>
    					<div class="alignright"><?php next_posts_link('More &raquo;') ?></div>
    				</div>
    				<?php wp_reset_query(); ?>
    				<div class="break"></div>
    
    			  </div>
    		  </div>
            </div>
            <div id="rightSidebar">
            	<?php dynamic_sidebar(); ?>
            </div>
            <div class="break"></div>
        </div>
        <div class="break"></div>
    </div>
    <?php
    get_footer();
    ?>
    Thread Starter Josh

    (@ikjosh)

    Yes it does

    Thread Starter Josh

    (@ikjosh)

    Thanks keesiemeijer… I activated the plugin, used the code above, but all it’s doing now is just listing all the posts on one page. Any ideas?

    Thread Starter Josh

    (@ikjosh)

    Hi keesiemeijer,

    It is a custom page template, and yes they all use the same custom field for the date.

    Here is what I am using..

    <?php
    					$i = 1;
    					$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    					query_posts( array(
    									  'cat' => '17',
    									  'post__not_in' => array($post_ID),
    									  'order' => 'DESC',
    									  'orderby' => 'meta_value_num',
    									  'meta_key' => 'event_date',
    									  'posts_per_page' => '12',
    									  'paged' => $paged
    								 ) );
    				?>
    				<?php while ( have_posts() ) : the_post(); ?>
    				<?php
    					$get_event_date = get_post_meta($post->ID, 'event_date', true);
    					$get_event_date = substr($get_event_date,0,-3);
    					$event_date = date("m/d/Y", $get_event_date); 
    
    				?>
    Thread Starter Josh

    (@ikjosh)

    Anyone? ??

    Thread Starter Josh

    (@ikjosh)

    Here is my query

    function get_url_var($name)
    {
    	$strURL = $_SERVER['REQUEST_URI'];
    	$arrVals = split("/",$strURL);
    	$found = 0;
    	foreach ($arrVals as $index => $value)
    	{
    		if($value == $name) $found = $index;
    	}
    	$place = $found + 1;
    	return $arrVals[$place];
    }
    
    $paged = get_url_var('page');
    
    $url = CurrentPageURL();
    //echo $paged;
    
    //if ( get_query_var('paged') ) $paged = get_query_var('paged');
    //if ( get_query_var('page') ) $paged = get_query_var('page');
    $posts_per_page = 3;
    $args = array(
    	'posts_per_page' => $posts_per_page,
    	'post_type' => 'post_library',
    	'tax_library_cats' => 'blog',
    	'post_status' => 'publish',
    	'paged' => $paged,
    	'caller_get_posts'=> 1
    );
    $the_query = new WP_Query( $args );
    
    $post_count = $the_query->found_posts;
    //print '<pre>'; print_r($the_query); print '</pre>';
    while ( $the_query->have_posts() ) : $the_query->the_post();
    Thread Starter Josh

    (@ikjosh)

    Thanks, that worked.

    However, it doesn’t list the pages, categories and external links that I dragged under main items in the WP Menu System. How do I call those?

    Figured it out – I didn’t have wp_footer() in my custom template

    Thanks

    And will this work with S2member plugin?

Viewing 15 replies - 1 through 15 (of 23 total)