Revolution Elements Help (2 small issues)
-
Issue 1. I’m still VERY new to PHP code and, though I have a basic understanding of the way it works, I’m not ready to start writing it myself.
I have tried searching google for tutorials, but I guess my keywords are bad, because I’m not finding any help on this issue.
The Revolution Elements theme has post thumbnails on the home page and archive pages, but I need a way to display a default “no image” image when there is no thumbnail available for a certain post.
I know it would be something like:
(this is crude, so don’t laugh :P)
if "thumbnail" custom field key is available... post the thumbnail else post the default "noimage" image
Could someone be ever so kind as to help me out? *bats eyelashes*
Issue 2. When using the search bar on my site I’m getting the following error:
Parse error: syntax error, unexpected T_ENDIF in /home/steampun/public_html/createsharp.com/wp-content/themes/elements_10/search.php on line 48
My (currently still under construction) site is here: https://createsharp.com
Here is the code from my search.php:
<?php get_header(); ?> <div id="main"> <div id="content"> <div id="single"> <div class="breadcrumb"> <?php if(class_exists('bcn_breadcrumb_trail')) { //Make new breadcrumb object $breadcrumb_trail = new bcn_breadcrumb_trail; //Setup options here if needed //Fill the breadcrumb trail $breadcrumb_trail->fill(); //Display the trail $breadcrumb_trail->display(); } ?> </div> </div> <!-- Loop Begins --> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="intro"> <span class="thumbnail"> <a href="<?php the_permalink() ?>" class="thetip" title="<?php the_title() ?> :: <?php the_content_rss('', TRUE, '', 50); ?>"><img src="<?php $key="thumbnail"; echo get_post_meta($post->ID, $key, true); ?>" alt="thumb"/></a> </span> <div class="intropost"> <h3><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h3> <p class="introcontent"><?php the_content_rss('', TRUE, '', 50); ?> <div class="introinfo"> <a href="<?php the_permalink() ?>#comments"><span class="comments"><?php comments_number('0', '1', '%'); ?> </span></a> <span class="date"><?php the_time('F j, Y'); ?> </span> </div> </div> </div> <?php endwhile; else: ?> <?php endif; ?> <!-- Loop Ends --> <div class="intro"> <span class="thumbnail"> <img src="<?php bloginfo('template_url'); ?>/images/404.jpg"/> </span> <div class="intropost"> <h3>Sorry, Nothing Here by That Name</h3> You seem to have found a mis-linked page or search query with no associated results. Please trying your search again. If you feel that you should be staring at something a little more concrete, feel free to email the author of this site or browse the archives. </div> </div> <?php endif; ?> </div> <?php get_sidebar(); ?> </div> <?php get_footer(); ?>
- The topic ‘Revolution Elements Help (2 small issues)’ is closed to new replies.