• Resolved sun12345

    (@sun12345)


    I saw the post from 2 weeks ago where you instructed: “Try disabling shortcode expansion in Relevanssi”. It didn’t work for me, or perhaps I didn’t do it correctly. I tried to trouble shoot by changing to the 2015 WordPress theme and it worked.
    I’m indexing the portfolio categories, and it doesn’t come up with results.
    Many thanks in advance, as this will greatly help with my theme’s capability.
    Here is my search.php page:

    <?php get_header(); ?>
    <?php
    $sidebar_exists = true;
    $container_class = ”;
    $timeline_icon_class = ”;
    $post_class = ”;
    $content_class = ”;
    $sidebar_exists = false;
    $sidebar_left = ”;
    $double_sidebars = false;

    $sidebar_1 = Avada()->settings->get( ‘search_sidebar’ );
    $sidebar_2 = Avada()->settings->get( ‘search_sidebar_2’ );
    if( $sidebar_1 != ‘None’ && $sidebar_2 != ‘None’ ) {
    $double_sidebars = true;
    }

    if( $sidebar_1 != ‘None’ ) {
    $sidebar_exists = true;
    } else {
    $sidebar_exists = false;
    }

    if( ! $sidebar_exists ) {
    $content_css = ‘width:100%’;
    $sidebar_css = ‘display:none’;
    $content_class= ‘full-width’;
    $sidebar_exists = false;
    } elseif(Avada()->settings->get( ‘search_sidebar_position’ ) == ‘Left’) {
    $content_css = ‘float:right;’;
    $sidebar_css = ‘float:left;’;
    $sidebar_left = 1;
    } elseif(Avada()->settings->get( ‘search_sidebar_position’ ) == ‘Right’) {
    $content_css = ‘float:left;’;
    $sidebar_css = ‘float:right;’;
    $sidebar_left = 2;
    }

    if($double_sidebars == true) {
    $content_css = ‘float:left;’;
    $sidebar_css = ‘float:left;’;
    $sidebar_2_css = ‘float:left;’;
    } else {
    $sidebar_left = 1;
    }
    ?>
    <div id=”content” class=”<?php echo $content_class; ?>” style=”<?php echo $content_css; ?>”>
    <?php if ( have_posts() && strlen( trim(get_search_query()) ) != 0 ) : ?>

    <?php
    if ( Avada()->settings->get( ‘search_new_search_position’ ) == ‘bottom’ ) {
    get_template_part( ‘templates/blog’, ‘layout’ );
    ?>
    <div class=”fusion-clearfix”></div>
    <?php
    }
    ?>

    <?php if ( Avada()->settings->get( ‘search_new_search_position’ ) != ‘hidden’ ) : ?>
    <div class=”search-page-search-form search-page-search-form-<?php echo Avada()->settings->get( ‘search_new_search_position’ ); ?>”>
    <?php
    // Render the post title
    echo avada_render_post_title( 0, FALSE, __( ‘Need a new search?’, ‘Avada’ ) ); ?>
    <p><?php echo __(‘If you didn\’t find what you were looking for, try a new search!’, ‘Avada’); ?></p>
    <form class=”searchform seach-form” role=”search” method=”get” action=”<?php echo home_url( ‘/’ ); ?>”>
    <div class=”search-table”>
    <div class=”search-field”>
    <input type=”text” value=”” name=”s” class=”s” placeholder=”<?php _e( ‘Search …’, ‘Avada’ ); ?>”/>
    </div>
    <div class=”search-button”>
    <input type=”submit” class=”searchsubmit” value=”” />
    </div>
    </div>
    </form>
    </div>
    <?php endif; ?>
    <?php
    if ( Avada()->settings->get( ‘search_new_search_position’ ) == ‘top’ || Avada()->settings->get( ‘search_new_search_position’ ) == ‘hidden’ ) {
    get_template_part( ‘templates/blog’, ‘layout’ );
    }
    ?>
    <?php else: ?>
    <div class=”post-content”>
    <?php
    $title = __( ‘Couldn\’t find what you\’re looking for!’, ‘Avada’ );
    echo do_shortcode( sprintf( ‘[title size=”2″ content_align=”left” style_type=”default”]%s[/title]’, $title ) );
    ?>
    <div class=”error-page”>
    <?php
    // First column
    echo do_shortcode( sprintf( ‘[one_third last=”no” spacing=”yes”]<h1 class=”oops %s”>%s</h1>[/one_third]’, ( $sidebar_css != ‘display:none’) ? ‘sidebar-oops’ : ”, __( ‘Oops!’, ‘Avada’ ) ) );

    // Second column
    $subheading = sprintf( ‘<h3>%s</h3>’, __( ‘Here are some useful links:’, ‘Avada’ ) );
    $iconcolor = strtolower( Avada()->settings->get( ‘checklist_icons_color’ ) );
    $list_css = sprintf( ‘<style type=”text/css”>.post-content #checklist-1 li:before{color:%s !important;}.rtl .post-content #checklist-1 li:after{color:%s !important;}</style>’, $iconcolor, $iconcolor );
    $useful_links_menu = wp_nav_menu( array( ‘theme_location’ => ‘404_pages’, ‘depth’ => 1, ‘container’ => false, ‘menu_id’ => ‘checklist-1’, ‘menu_class’ => ‘list-icon circle-yes list-icon-arrow’, ‘echo’ => 0 ) );

    echo do_shortcode( sprintf( ‘[one_third last=”no” spacing=”yes” class=”useful-links”]%s%s%s[/one_third]’, $subheading, $list_css, $useful_links_menu ) );

    // Third column
    $subheading = sprintf( ‘<h3>%s</h3>’, __( ‘Try again!’, ‘Avada’ ) );
    $info_text = sprintf( ‘<p>%s</p>’, __( ‘If you want to rephrase your query, here is your chance:’, ‘Avada’ ) );
    $search_form = get_search_form( FALSE );

    echo do_shortcode( sprintf( ‘[one_third last=”yes” spacing=”yes”]%s%s%s[/one_third]’, $subheading, $info_text, $search_form ) );
    ?>
    </div>
    </div>
    <?php endif; ?>
    </div>
    <?php if( $sidebar_exists == true ): ?>
    <?php wp_reset_query(); ?>
    <div id=”sidebar” class=”sidebar” style=”<?php echo $sidebar_css; ?>”>
    <?php
    if($sidebar_left == 1) {
    generated_dynamic_sidebar($sidebar_1);
    }
    if($sidebar_left == 2) {
    generated_dynamic_sidebar_2($sidebar_2);
    }
    ?>
    </div>
    <?php if( $double_sidebars == true ): ?>
    <div id=”sidebar-2″ class=”sidebar” style=”<?php echo $sidebar_2_css; ?>”>
    <?php
    if($sidebar_left == 1) {
    generated_dynamic_sidebar_2($sidebar_2);
    }
    if($sidebar_left == 2) {
    generated_dynamic_sidebar($sidebar_1);
    }
    ?>
    </div>
    <?php endif; ?>
    <?php endif; ?>
    <?php get_footer();

    // Omit closing PHP tag to avoid “Headers already sent” issues.

    https://wordpress.org/plugins/relevanssi/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Which version of Avada are you using?

    Thread Starter sun12345

    (@sun12345)

    I’m using the most recent version Avada 3.8.5. Thanks!

    Plugin Author Mikko Saari

    (@msaari)

    It should work with Relevanssi. Could you explain your problem with more detail? What doesn’t work? Can you show me the site?

    Can you add a

    global $wp_query; var_dump($wp_query->query_vars);

    somewhere in the search results template, do a search that doesn’t work and let me know what is printed out?

    Thread Starter sun12345

    (@sun12345)

    Thanks for your response. I added the information you gave, and it didn’t work. I’m not sure what I’m doing wrong or how the other person figured it out. I may have to contact the Avada team to determine what the issue could be. Found out that I’m using Avada 3.8.6., just updated it a day ago. Hope that helps.

    Here is what the search results stated after doing a search:
    I submitted keywords for one of my portfolio categories.
    Hopefully it will work out! Thanks for creating this plugin.


    Couldn’t find what you’re looking for!
    Oops!
    Here are some useful links:

    About Us
    FAQ
    Services
    Contact
    Try again!

    If you want to rephrase your query, here is your chance:

    Thread Starter sun12345

    (@sun12345)

    Got it to work! Read some comments on Avada forum and went into the search field options in the theme. I adjusted some things and it is working great.

    I am using avada theme version 3.5.3. The search bar in blog is not working. It shows “oops” for search query. I have done “global $wp_query; var_dump($wp_query->query_vars);” step. Could you help me out. The result is below :

    array(64) { [“s”]=> string(6) “vmware” [“posts_per_page”]=> int(10) [“paged”]=> int(0) [“error”]=> string(0) “” [“m”]=> string(0) “” [“p”]=> int(0) [“post_parent”]=> string(0) “” [“subpost”]=> string(0) “” [“subpost_id”]=> string(0) “” [“attachment”]=> string(0) “” [“attachment_id”]=> int(0) [“name”]=> string(0) “” [“static”]=> string(0) “” [“pagename”]=> string(0) “” [“page_id”]=> int(0) [“second”]=> string(0) “” [“minute”]=> string(0) “” [“hour”]=> string(0) “” [“day”]=> int(0) [“monthnum”]=> int(0) [“year”]=> int(0) [“w”]=> int(0) [“category_name”]=> string(0) “” [“tag”]=> string(0) “” [“cat”]=> string(0) “” [“tag_id”]=> string(0) “” [“author”]=> string(0) “” [“author_name”]=> string(0) “” [“feed”]=> string(0) “” [“tb”]=> string(0) “” [“comments_popup”]=> string(0) “” [“meta_key”]=> string(0) “” [“meta_value”]=> string(0) “” [“preview”]=> string(0) “” [“sentence”]=> string(0) “” [“fields”]=> string(0) “” [“menu_order”]=> string(0) “” [“category__in”]=> array(0) { } [“category__not_in”]=> array(0) { } [“category__and”]=> array(0) { } [“post__in”]=> array(2) { [0]=> int(22103) [1]=> int(22121) } [“post__not_in”]=> array(0) { } [“tag__in”]=> array(0) { } [“tag__not_in”]=> array(0) { } [“tag__and”]=> array(0) { } [“tag_slug__in”]=> array(0) { } [“tag_slug__and”]=> array(0) { } [“post_parent__in”]=> array(0) { } [“post_parent__not_in”]=> array(0) { } [“author__in”]=> array(0) { } [“author__not_in”]=> array(0) { } [“post_type”]=> string(4) “post” [“ignore_sticky_posts”]=> bool(false) [“suppress_filters”]=> bool(false) [“cache_results”]=> bool(true) [“update_post_term_cache”]=> bool(true) [“update_post_meta_cache”]=> bool(true) [“nopaging”]=> bool(false) [“comments_per_page”]=> string(2) “50” [“no_found_rows”]=> bool(false) [“search_terms_count”]=> int(1) [“search_terms”]=> array(1) { [0]=> string(6) “vmware” } [“search_orderby_title”]=> array(1) { [0]=> string(35) “wp_posts.post_title LIKE ‘%vmware%'” } [“order”]=> string(4) “DESC” }

    Plugin Author Mikko Saari

    (@msaari)

    Please start a new thread instead of posting to something 11 months old. Before that, try disabling other plugins and switching themes in order to rule out other compatibility issues.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Not working with Avada Theme’ is closed to new replies.