Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • Thank you very much Yigit!
    The first is good solution for mu case, but I find the other solution. I make custom form inside function.

    add_action( 'ava_after_main_title', 'add_my_custom_code' );
    function add_my_custom_code() {
      if ( is_front_page() || is_archive() || is_tag() ) {
        echo '<div id="av_section_112" class="avia-section main_color avia-section-default avia-no-border-styling  avia-bg-style-scroll  avia-builder-el-0  el_before_av_button  avia-builder-el-first   container_wrap fullsize" style=" "><div class="container">
    <div class="flex_column av_one_half  flex_column_div av-zero-column-padding first  avia-builder-el-1  el_before_av_one_half  avia-builder-el-first  " style="border-radius:0px; ">';
    
        global $wp;
        echo '<div class="avia_search_element  ">';
        echo '<form action="'. home_url( $wp->request . '/' ) .'" id="searchform_element" method="get" class="av_disable_ajax_search" _lpchecked="1">';
    ?>
        <div class="av_searchform_wrapper" style="border-radius:10px; "><input type="text" value="<?php if(!empty($_GET['s'])) echo get_search_query(); ?>" id="s" name="s" placeholder="Search..." style="border-radius:10px; line-height:44px; height:44px; font-size:16px; " class=" av-input-hasicon"><span class="av-search-icon avia-font-entypo-fontello" style="font-size:16px; "></span><div class="av_searchsubmit_wrapper" style="border-radius:10px; "><input type="submit" value="SEARCH" id="searchsubmit" class="button" style="border-radius:10px; "></div></div>
    
    <?php
        echo '</form></div>';
    
        echo '</div><div class="flex_column av_one_half  flex_column_div av-zero-column-padding   avia-builder-el-3  el_after_av_one_half  avia-builder-el-last  " style="border-radius:0px; "></div></div></div>';
      }
    }

    The code doesn’t change form action of ajax search as default search. I disabled Ajax, it’s not necessary in my web.
    It’s not working when I clicked to list posts of some category (with archive.php). I type something into the main search and with ajax show 6 posts for example. When hit enter show only 2 in search results. I also use relevanssi search plugin, maybe that’s the problem.

    Thanks!

    Any response?

    in reply to: Change columns number from child functions.php #1216048

    It works without “global $posts;” :)

    add_filter('avf_post_slider_args', function($atts, $context){
    	if($context == 'index' || $context == 'archive' || $context == 'tag') { $atts['columns']  = 4;}
    	return $atts;
    }, 10, 2);

    Thanks

    • This reply was modified 4 years, 4 months ago by Martin.
    in reply to: Change columns number from child functions.php #1216021

    It works! Thanks a lot!

    Is this correct?

    add_filter('avf_post_slider_args', function($atts, $context){
    	global $posts;
    	if($context == 'index' || $context == 'archive' || $context == 'tag') { $atts['columns']  = 4;}
    	return $atts;
    }, 10, 2);
    in reply to: How can I list posts by category and custom taxonomy? #1087743

    Hi Rikard,
    I want to filter into the blog page, the archive page also.
    I put the code into loop-index.php, before “if (have_posts()) :”. Also, I try to put on other pages, but not working.

    Regards

    in reply to: How can I list posts by category and custom taxonomy? #1087434

    Thank you very much, Mike.
    I am trying to set up the “Beautiful taxonomy filters” plugin. I must put this code in Enfold child theme “<?php do_action(‘show_beautiful_filters’); ?>”. But I try to put in different files, but nothing happened. Where to put this code in Enfold theme to make working this plugin?

    Regards

    in reply to: Google Page Speed & YSlow Optimization #1040680

    Not working…
    I also try with WP Rocket plugin, the results are the same. Only that image doesn’t shown with .webp extension, because is inserted with css (background-image). In future updates of enfold think about this problem, because google page speed score is very important. Try to make 100/100 for your demo and tell me the hint… :P :)

Viewing 7 posts - 1 through 7 (of 7 total)