Support » Plugins » Search Photos with theme search

  • Hi,

    I know that this has been answered in other places, but my question is not if, but how come I am not doing it right?

    I have this link that shows how to integrate the search photos widget with the template search. I have the WP Photo Album Plus 4.7.6.

    First off, I would like to know if this hack still works? maybe with the newer versions, it doesnt or if there is a different way to achieve what I need.

    Second, my search.php code is not the same as how he describes it

    my code looks like

    <?php global $theme; get_header(); ?>
    <div id=”main”>

    <?php $theme->hook(‘main_before’); ?>

    <div id=”content”>

    <?php $theme->hook(‘content_before’); ?>

    <h2 class=”page-title”><?php _e( ‘Search Results for:’, ‘themater’ ); ?> <span><?php echo get_search_query(); ?></span></h2>

    if (have_posts()) : while (have_posts()) : the_post();

    * The default post formatting from the post.php template file will be used.
    * If you want to customize the post formatting for your search pages:
    * – Create a new file: post-search.php
    * – Copy/Paste the content of post.php to post-search.php
    * – Edit and customize the post-search.php file for your needs.
    * Learn more about the get_template_part() function:

    get_template_part(‘post’, ‘search’);

    else : ?>
    <div class=”entry”>
    <p><?php printf( __( ‘Sorry, but nothing matched your search criteria: %s. Please try again with some different keywords.’, ‘themater’ ), ‘‘ . get_search_query() . ‘‘ ); ?></p>

    <div id=”content-search”>
    <?php get_search_form(); ?>
    <?php endif;

    </div><!– #content –>

    <?php get_sidebars(); ?>

    <?php $theme->hook(‘main_after’); ?>

    </div><!– #main –>

    <?php get_footer(); ?>

    So again, i am sorry to ask a question I know has been asked before but I have been on this for multiple hours and struggle to find the answer.

    thank you


  • The topic ‘Search Photos with theme search’ is closed to new replies.