Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)
  • Thread Starter Maniou

    (@maniou)

    The problem is the same with ACF (Advanced Custom Fields Plugin for WordPress).
    There is nothing you can do ? It will be usefull because this plugin is used by a lot of people !

    Thank you !

    Thread Starter Maniou

    (@maniou)

    Thank you for your answer,

    It’s working if i desactivate the plugin “Advanced Custom Fields PRO”

    All my site is built with this plugin, can you provide a fix ?

    Thank you very much,

    Thread Starter Maniou

    (@maniou)

    I can try,
    What you are doing on line 391 is done before the alm_modify_query_args() ?

    Thread Starter Maniou

    (@maniou)

    ajax-load-more.php
    starting at line 391

    if($post_status != 'publish'){
          		// If not 'publish', confirm user has rights to view these old posts.
          		if (current_user_can( 'edit_theme_options' )){
             		$post_status = $post_status;
                } else {
                   $post_status = 'publish';
                }
    			$post_status = $post_status;
             }

    Instead of checking if the user is an admin can we check instead if the user is the owner of the post ?

    It’s important my users need to list their own posts when they are with the status pending or draft. (They can add post from the front office).

    Hello,

    On my side I can see the bug only in Safari (OSX or IOS).

    I get the following in Safari console:

    SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration.
    (anonymous function)ajax-load-more.js:524

    Thank you,

    Thread Starter Maniou

    (@maniou)

    Hi Darren,

    Thank you for you answer, I will try to fire alm_delete_cache() when a post is published / updated and I will let you know.

    Thread Starter Maniou

    (@maniou)

    You think it’s possible to support that ?
    I mean the caching of preloaded post inside ALM Cache in order to display them again after Filering ?

    I simply have that and i would like to display the same result i get from the shortcode when i click back on the fisrt link :

    <ul id="alm-filter-nav">
    		<li class="active selected">
    		<a href="#" data-preloaded="true" data-preloaded-amount="8" data-preloaded="false" data-cache="true" data-cache-id="<?php echo $invID; ?>" data-post-status="">Published</a>
    		</li><li>
    		<a href="#" data-preloaded="false" data-cache="false" data-cache-id="" data-post-status="draft">Draft</a>
    		</li><li>
    		<a href="#" data-preloaded="false" data-cache="false" data-cache-id="" data-post-status="pending" >Pending</a>
    		</li>
    	</ul>
    
    echo do_shortcode('[ajax_load_more posts_per_page="8" preloaded="true" preloaded_amount="8" cache="true" cache_id="'. $invID .'" post_type="recipe" author="'. $user_id .'"]');
    Thread Starter Maniou

    (@maniou)

    Thank you for you answer , it’s great if Paging and Preloaded is on you todo list.

    I’m going to try again Cache and Paging.

    About Cache and Preload i’ve seen that the X Preload Posts are not cached on page-0.html
    There is a way to add the preload posts into this first cached file ?

    It’s because when using filtering, when i try to go back to the original result given by the shortcode i can’t have back the original preloaded posts.

    Thank you,

    Thread Starter Maniou

    (@maniou)

    Everything is fine now, thanks again !

    Thread Starter Maniou

    (@maniou)

    Sorry i didn’t get your first answer, i’m going to change that !

    Thread Starter Maniou

    (@maniou)

    The button :

    <li class="light"><a title="Rice" data-taxonomy_operator="IN" data-taxonomy_terms="rice" data-taxonomy="recipe_category" data-post_type="recipe" data-posts_per_page="6" data-scroll_distance="10" data-repeater="default" href="#"><i class="ico icon-rice"></i> <span>Rice</span></a></li>

    Also when i click on the button, the div alm-listing is taking the button param’s correctly :

    <div class="alm-listing alm-ajax " data-images-loaded="false" data-transition="slide" data-destroy-after="" data-button-class="loading" data-button-label="Older Posts" data-pause="false" data-pause-override="false" data-max-pages="5" data-scroll-distance="150" data-scroll="true" data-lang="" data-posts-per-page="6" data-offset="0" data-orderby="date" data-order="DESC" data-post-status="" data-custom-args="" data-search="" data-exclude="" data-post-not-in="" data-post-in="" data-author="" data-day="" data-month="" data-year="" data-meta-type="" data-meta-relation="" data-meta-compare="" data-meta-value="" data-meta-key="" data-taxonomy-relation="" data-taxonomy-operator="" data-taxonomy-terms="" data-taxonomy="recipe_category" data-tag-not-in="" data-tag="" data-category-not-in="" data-category="" data-post-format="" data-post-type="recipe" data-repeater="default" data-preloaded-amount="6" data-preloaded="true" data-scroll_distance="10" data-posts_per_page="6" data-post_type="recipe" data-taxonomy_terms="rice" data-taxonomy_operator="IN">
    Thread Starter Maniou

    (@maniou)

    Yes you have it just before.
    If you want where i can send you privately the link to see the web page ?

    Thread Starter Maniou

    (@maniou)

    Thank for your response, i was using almFilter this way just to try to see what was going on.

    On the website i’m using it the way you describe :

    The shortcode :
    echo do_shortcode('[ajax_load_more posts_per_page="6" preloaded="true" preloaded_amount="6" post_type="recipe"]');

    The buttons :
    <li class="light"><a title="Rice" data-taxonomy_operator="IN" data-taxonomy_terms="rice" data-taxonomy="recipe_category" data-post_type="recipe" data-posts_per_page="6" data-scroll_distance="10" data-repeater="default" href="#"><i class="ico icon-rice"></i> <span>Rice</span></a></li>

    and below the JS like your example.

    (...)
             var data = el.data(), // Get data values from selected menu item
                 transition = 'fade', // 'slide' | 'fade' | null
                 speed = '300'; //in milliseconds
    
    		 console.log(data);
             jQuery.fn.almFilter(transition, speed, data); // reset Ajax Load More (transition, speed, data)
    (...)

    If i press the button Rice, the call on admin-ajax.php is done with thoses params :

    action=alm_query_posts
    author=
    category=
    category__not_in=
    comments=
    custom_args=
    day=
    exclude=
    lang=
    meta_compare=
    meta_key=
    meta_relation=
    meta_type=
    meta_value=
    month=
    nonce=305b88a578
    offset=0
    order=DESC
    orderby=date
    pageNumber=0
    post__in=
    post__not_in=
    post_format=
    post_status=
    post_type[]=recipe
    posts_per_page=6
    preloaded=true
    preloaded_amount=6
    previous_post=false
    previous_post_id=
    previous_post_taxonomy=
    query_type=standard
    repeater=default
    search=
    seo_start_page=1
    slug=recipe
    tag=
    tag__not_in=
    taxonomy=recipe_category
    taxonomy_operator=
    taxonomy_relation=
    taxonomy_terms=
    theme_repeater=null
    year=

    I can’t figure why taxonomy_terms and taxonomy_relation are empty (and why it’s ok for the others param like taxonomy).

    Thread Starter Maniou

    (@maniou)

    In fact the problem don’t seems related to “cache” but to “filtering’

    When cache is desactivated (main shortcode and filtering buttons).

    If i do :

    jQuery.fn.almFilter('fade', '300', ({repeater:"default", posts_per_page:6, post_type:"recipe", taxonomy:"recipe_category", taxonomy_terms:"rice", taxonomy_operator:"IN"}));

    The request on admin-ajax.php is :

    ?action=alm_query_posts&query_type=standard&nonce=4814945b97&repeater=default&theme_repeater=null&comments=&post_type%5B%5D=recipe&post_format=&category=&category__not_in=&tag=&tag__not_in=&taxonomy=recipe_category&taxonomy_terms=&taxonomy_operator=&taxonomy_relation=&meta_key=&meta_value=&meta_compare=&meta_relation=&meta_type=&author=&year=&month=&day=&post_status=&order=DESC&orderby=date&post__in=&post__not_in=&exclude=&search=&custom_args=&posts_per_page=6&pageNumber=0&offset=0&preloaded=true&preloaded_amount=6&seo_start_page=1&previous_post=false&previous_post_id=&previous_post_taxonomy=&lang=&slug=recipe

    The param taxonomy_terms is empty, it shoud contains “rice”.

    Thread Starter Maniou

    (@maniou)

    Thank you for your fast answer !

Viewing 15 replies - 1 through 15 (of 19 total)