Forum Replies Created

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter esilk

    (@esilk)

    I added the line of code but it did nothing:
    http://electricsilk.com/dev/loewen/index.php/dealers/

    Thread Starter esilk

    (@esilk)

    This did not work – it listed the countries in the same wrong order, and only the first letter of each country displayed in the dropdown.

    http://electricsilk.com/dev/loewen/index.php/dealers/

    Thread Starter esilk

    (@esilk)

    @michael – is_single(2164) almost seems to work. Here’s what I’m trying to accomplish:

    <?php if (in_category('4')): ?>
    <?php elseif (is_single(2164)): ?>
                    <h1 class="post-title"><?php the_title(); ?></h1>
    <?php else: ?>
                    <h1 class="post-title"><?php the_title(); ?></h1>
    <?php endif; ?>
    <?php if (!is_single(2164)): ?>
                    <div id="detailslink"><a id="down1" class="down link" href="#details"><img src="/wp-content/themes/rally/images/details.gif" width="139" height="35" alt="More Details" /></a></div>
    <?php endif; ?>

    So on post 2164, the detailslink div does NOT show up, and it does appear on all other posts. However, the title does NOT display as it should.

    I can force the title this way, but I thought there should be something a little more elegant:

    <?php $postid = get_the_ID(); ?>
    <?php if ($postid == 2164): ?>
                    <h1 class="post-title"><?php the_title(); ?></h1>
    <?php endif; ?>
    <?php if (in_category('4')): ?>
    <?php elseif (is_single(2164)): ?>
                    <h1 class="post-title"><?php the_title(); ?></h1>
    <?php else: ?>
                    <h1 class="post-title"><?php the_title(); ?></h1>
    <?php endif; ?>
    <?php if ($postid != 2164): ?>
                    <div id="detailslink"><a id="down1" class="down link" href="#details"><img src="/wp-content/themes/rally/images/details.gif" width="139" height="35" alt="More Details" /></a></div>
    <?php endif; ?>
    Thread Starter esilk

    (@esilk)

    This is resolved. Here is the code I used:

    <div class="projects category">
    	<h1><?php echo get_cat_name(7); ?></h1>
    	<p><?php echo category_description(7); ?></p>
    		<?php $the_query = new WP_Query(array( 'post_type' => 'projects', 'category_name' => 'pod-current-projects', 'posts_per_page' => -1 )); ?>
    		<?php if ( $the_query->have_posts() ) : ?>
    		<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
    		<div class="col2">
    		<div class="col2">
    			<?php if ( has_post_thumbnail() ) { ?>
    			<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_post_thumbnail('full', array('class' => 'alignnone')); ?></a>
    			<?php } ?>
    		</div>
    	<div class="col2">
    		<p class="category"><?php echo get_cat_name(7); ?> </p>
    		<h1 class="proj"><?php the_title(); ?></h1>
    		<div class="proj-desc"><?php the_field(short_description); ?></div>
    		<p class="more-link"><a href="<?php the_permalink() ?>">Learn More</a></p>
    	</div>
    	</div>
    	<?php endwhile; ?>
    	<?php else: ?>
    		<p>Sorry, no posts matched your criteria.</p>
    	<?php endif; ?>
    	<?php wp_reset_postdata(); ?>
    </div>
    <div class="projects category">
    	<h1><?php echo get_cat_name(6); ?></h1>
    	<p><?php echo category_description(6); ?></p>
    		<?php $the_query = new WP_Query(array( 'post_type' => 'projects', 'category_name' => 'pod-coming-soon', 'posts_per_page' => -1 )); ?>
    		<?php if ( $the_query->have_posts() ) : ?>
    		<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
    		<div class="col2">
    		<div class="col2">
    			<?php if ( has_post_thumbnail() ) { ?>
    			<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_post_thumbnail('full', array('class' => 'alignnone')); ?></a>
    			<?php } ?>
    		</div>
    	<div class="col2">
    		<p class="category"><?php echo get_cat_name(6); ?> </p>
    		<h1 class="proj"><?php the_title(); ?></h1>
    		<div class="proj-desc"><?php the_field(short_description); ?></div>
    		<p class="more-link"><a href="<?php the_permalink() ?>">Learn More</a></p>
    	</div>
    	</div>
    	<?php endwhile; ?>
    	<?php else: ?>
    		<p>Sorry, no posts matched your criteria.</p>
    	<?php endif; ?>
    	<?php wp_reset_postdata(); ?>
    </div>
    <div class="projects category">
    	<h1><?php echo get_cat_name(8); ?></h1>
    	<p><?php echo category_description(8); ?></p>
    		<?php $the_query = new WP_Query(array( 'post_type' => 'projects', 'category_name' => 'pod-past-projects', 'posts_per_page' => -1 )); ?>
    		<?php if ( $the_query->have_posts() ) : ?>
    		<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
    		<div class="col2">
    		<div class="col2">
    			<?php if ( has_post_thumbnail() ) { ?>
    			<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_post_thumbnail('full', array('class' => 'alignnone')); ?></a>
    			<?php } ?>
    		</div>
    	<div class="col2">
    		<p class="category"><?php echo get_cat_name(8); ?> </p>
    		<h1 class="proj"><?php the_title(); ?></h1>
    		<div class="proj-desc"><?php the_field(short_description); ?></div>
    		<p class="more-link"><a href="<?php the_permalink() ?>">Learn More</a></p>
    	</div>
    	</div>
    	<?php endwhile; ?>
    	<?php else: ?>
    		<p>Sorry, no posts matched your criteria.</p>
    	<?php endif; ?>
    	<?php wp_reset_postdata(); ?>
    </div>
    Thread Starter esilk

    (@esilk)

Viewing 5 replies - 16 through 20 (of 20 total)