matheuskps
Forum Replies Created
-
I solve this, changing the file that contains the function to the enqueue scripts in the front-end.
/* Add javascript and css for front end */ function pix_enqueue_script() { // I PUT THIS CONDITION, IF PAGE IS BLOG (page slug or id), execute the script if(is_page('blog')) { $enable_infinite_load=pix_get_option('enable_infinite_load'); if(!empty($enable_infinite_load)){ wp_enqueue_style( 'pix-infiniteload', INFINITE_LOAD_URL . '/css/infiniteload.css' ); wp_enqueue_script( 'pix-infiniteload-lib', INFINITE_LOAD_URL . '/js/jquery.infiniteload.js', array('jquery'),false,true); wp_enqueue_script( 'pix-infiniteload', INFINITE_LOAD_URL . '/js/infiniteload.js', array('jquery','pix-infiniteload-lib'),false,true); wp_localize_script( 'pix-infiniteload', 'pix_infiniteload', array('navSelector'=>pix_get_option('navigation_selector'),'contentSelector'=>pix_get_option('content_selector'),'nextSelector'=>pix_get_option('next_selector'),'itemSelector'=>pix_get_option('item_selector'),'paginationType'=>pix_get_option('pagination_type'),'loadingImage'=>pix_get_option('loading_image'),'loadingButtonLabel'=>pix_get_option('button_label'),'loadingButtonClass'=>pix_get_option('button_class'),'loadingFinishedText'=>pix_get_option('finished_msg')) ); } } } add_action( 'wp_enqueue_scripts', 'pix_enqueue_script' );
Forum: Plugins
In reply to: [WordPress Infinite Scroll - Ajax Load More] Search with custom fieldsYes!
if I remove the search = “” of the shortcode , it works .. the post with custom field appears , but if I leave the search = ” ” and the meta_key , meta_value the same shortcode doesnt work. Not appear any post.
Forum: Plugins
In reply to: [WordPress Infinite Scroll - Ajax Load More] Search with custom fieldsWorks:
<?php echo do_shortcode('[ajax_load_more post_type="produto" posts_per_page="6" meta_key="ref" meta_value="999" search="'. $term .'" scroll="false" button_label="Mostrar mais resultados"]'); ?>
Doesnt work:
<?php echo do_shortcode(‘[ajax_load_more post_type=”produto” posts_per_page=”6″ meta_key=”ref” meta_value=”‘. $term .'” search=”‘. $term .'” scroll=”false” button_label=”Mostrar mais resultados”]’); ?>
The meta_value should be dinamic.
Forum: Plugins
In reply to: [WordPress Infinite Scroll - Ajax Load More] Search with custom fieldsmeta value is dinamically, like search term.
I would like to search for terms and custom fields, you understand?
Forum: Plugins
In reply to: [WordPress Infinite Scroll - Ajax Load More] Search with custom fieldsHi!
<?php $term = $_GET['term']; ?> <?php echo do_shortcode('[ajax_load_more repeater="repeater5" post_type="produto" posts_per_page="6" meta_key="ref" meta_value="" search="'. $term .'" scroll="false" button_label="Mostrar mais resultados"]'); ?>
Forum: Plugins
In reply to: [WordPress Infinite Scroll - Ajax Load More] Search with custom fieldsSorry, i write something wrong.
EDIT:
I try use the search query with meta_key and meta_value, but if these parameters are together with search parameter, the search doesn’t work.