• Resolved artsyalicatt

    (@artsyalicatt)


    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(); ?>
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter artsyalicatt

    (@artsyalicatt)

    Anyone? I would even appreciate suggestions on keywords to search google for help.

    Just so you know, bumping threads actually hurts your chances of getting help, because your post no longer appears in the “No Replies” list.

    If you want default thumbnails for the Elements theme, I suggest you lift that feature from one of the other Revolution themes. Check out the Lifestyle theme, it has default thumbnails on the homepage, you could use that code in Elements easily I am sure.

    For any advanced problems that pertain specifically to a Revolution theme, their support forum is going to be the best place to turn to. They do offer commercial support, so I am not sure how much is publicly available in their forums, you will have to poke around, or ask them.

    As far as search goes, I don’t think that it could be anything with their theme, I have used some of them and had no problems. First thing I would do, is switch back to the default theme, and test your search to figure out if it is a problem with the theme or not.

    Thread Starter artsyalicatt

    (@artsyalicatt)

    Thanks for the tip, I’ll be sure to remember that in the future.

    I guess I’ll go plinking around in the lifestyle theme to see how complicated swiping the default image code will be.

    Also your comment about “advanced problems” which are theme specific…I wouldn’t really consider either of these questions very advanced. If I personally was a PHP wiz, I would be more than happy to quickly plop out a little help for someone who’s trying to make their way around the PHP world…especially if said beginner expressed a desire to continue learning more about the language.

    I was under the impression that the very spirit of the WP community is sharing of knowledge and thus would find a supportive ear in these two tiny issues.

    I’m not asking for handouts or handholding, but a polite nudge in the right direction is greatly appreciated.

    And as for the search.php issue, yes it WAS in fact an issue with the revolution elements theme file itself. Looking at the error, with my small amount of php knowledge I was able to troubleshoot this issue myself. It seems that there is an extra endif in the search.php template file:

    I have highlighted the bit of code that should be deleted from the search.php if anyone else happens to run across this issue.

    <?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>" 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>"><?php the_title() ?></a></h3>
                        <p class="introcontent"><?php the_content_rss('', TRUE, '', 50); ?>
    
                        <div class="introinfo">
                            <a>#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; ?> *********DELETE THIS LINE TO FIX THE SEARCH ERROR*********
                <!-- 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(); ?>'

    It should be pretty simple to swipe that code and use it in the Elements theme. If you have trouble figuring out which bit of code you need, I’d be more than happy to show you.

    I wasn’t trying to imply that your questions were too advanced or that you shouldn’t expect assistance. I just wanted to give you fair warning that the Revolution themes can be rather complex, and the best support for any really advanced problems would come from the theme’s developers.

    You are correct, the WordPress community is an open and sharing one! But much of the information and support you will find in these forums pertains more to WordPress itself, and the themes and plugins that are listed in the official directories.

    Each theme or plugin developer supports their products in a different way though. Some use these forums, others use a forum of their own, others may handle support through comments in their blog, or some might not support their work at all.

    It’s good to hear that you solved your search problem. If you did indeed find a bug in this theme, I am sure that the developers would greatly appreciate you reporting it to them.

    Thanks for the help. I was running into the same issue with this theme good thing I found this thread. I removed the code and the search works perfectly now! =D

    Still working on my site but if you want to check it out here’s the working link: https://www.floodgatestudios.org/blog

    Thanks again.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Revolution Elements Help (2 small issues)’ is closed to new replies.