Forum Replies Created

Viewing 15 replies - 1 through 15 (of 57 total)
  • Thread Starter pradg

    (@pradg)

    @welcher

    Thanks Ryan. Waiting for a fix for this issue

    Thread Starter pradg

    (@pradg)

    Figured it out.

    Looks like even if I update the template, only new posts I create get the wpdiscuzz block. It doesnt show up on older already published posts.

    Thread Starter pradg

    (@pradg)

    Quick test indicates this is working.

    Thanks for the update @welcher

    Thread Starter pradg

    (@pradg)

    @threadi

    I deactivated all plugins once more and cleared all cache both in local browser and server and for some reason it worked. I manually activated each plugin again and tested this and the same issue is not present anymore. strange.

    using 2025 theme.

    Thread Starter pradg

    (@pradg)

    Thread Starter pradg

    (@pradg)

    I tried adding the Query Loop on a new Page or Post, I am seeing that all blocks inside the Post Template inside the Query Loop have no settings available. Also I am not able to add any groups, rows, columns etc inside the Query Loop.
    Also observing that none of the Query loop default designs are available to choose. Even if I click on the Change Design button, the list shows me “no results found” for all the available designs.

    Tried this on a Local WP installation and no issues

    Not sure what is breaking the Query Loop. Cleared cache both on the browser and server but to no avail. Have also tried with disabling all plugins

    • This reply was modified 1 year ago by pradg.
    • This reply was modified 1 year ago by pradg.

    @cashable

    Install Advanced Custom Fields and setup a new “Field Group”. Make it of type number, name it whatever you want (let’s call it Number). Assign this to the post type or page.
    Open your post or Page. you will see the ACF field. Enter 1 2 3 for each of the post or page. So 01. America Airlines post you enter 1 and 02. America Airline you enter 2 in the ACF field. Update all posts/pages by entering the appropriate number.

    Wherever you add the Advanced Query Loop, go to “Post Meta Query” section. For “Meta Key’, enter the ACF field name – Number as I named it in this example. And then for “Post Order By” select Meta Value Num and your list will be properly sorted. Don’t bother with any other setting.

    you don’t even need to add a zero before 1-9.

    you will get the list sorted as 1, 2, 3 properly.

    Thread Starter pradg

    (@pradg)

    Issue#2

    Let’s say I add 2 AQL blocks on the same page. both have the same settings. but the second AQL block, only shows posts from the Additional Post Types and completely ignores the primary post type.
    for example, if i choose ABC as the primary post type in the second AQL and XYZ as the Additional Post type, this block only displays posts from XYZ and completely ignores posts from ABC. if I reverse that and choose XYZ as primary post type and ABC as additional post type, it shows all posts from ABC completely ignoring XYZ, even though as detailed in the above Issue#1 that the posts under XYZ were published more recently.

    To summarise both issues –

    Issue#1
    If 2 or more additional post types are chosen in the AQL, it only displays the posts from the post type which has the most recent published posts. If recently pubslished posts of a single post type are more than the max Items per Page, then only posts from this Post Type are shown.
    This should show a mix of posts from all Post types and the Date argument should be considered for each individual post type.

    On my site I have a News and Editorial section. I will update the News section more as there are more articles to be written but on the Home Page where I have a AQL grid, I want x recent posts from News and y recent posts from Editorial irrespective of when they were published as long as the most recent ones from each post type are fetched (when user chooses Date argument)

    Issue#2
    If a second AQL block is added on the same page, then it only displays posts from the post type(s) selected under the Additional Post Types completely ignoring the primary post type. and if there are multiple post types selected under the Additional Post types, then Issue#1 crops up among these post types.

    Please look into these. AQL is a fantastic plugin and is a big part of the site I am building but these issues need to be addressed.

    Thread Starter pradg

    (@pradg)

    Upon further investigation, it looks like when I created the Child theme, something broke and now I am unable to select the “Default” option. I activated the parent theme and everything works as expected but not on the Child Theme.

    Any idea how I can fix this? Cos I have my complete design on the Child theme.

    as long as your Custom Post Type is exposed via the REST API and the Custom Fields are pointed to the Custom Post Type, the above steps should work.

    Hopefully this worked for you.

    @labemi

    I assume you’re using ACF for your custom post types and custom fields (any other plugin should also work the same).

    So 2 Custom Post types – Services and Testimonials.
    Let’s say you have posts of type Services called Car Cleaning Services and Window Cleaning Services. And on your Testimonials CPT, you have a Custom Field named “Services Offered” and when you create your Testimonial Posts, you input either Car Cleaning Services or Window Cleaning Services in the custom field section.


    TO accomplish what you’re looking for, on your Services post, add the Advanced QUery Loop Plugin, choose “Testimonial” as the Post Type and in the “Post Meta Query” click on Add meta query and under the Meta Key field add the Field Name of the Custom field you want to filter for (which would be Services Offered) and under the Meta Value you can input Car Cleaning Service or Window Cleaning Service.

    So on your Car Cleaning Services post, you add the AQL and choose Post Type as Testimonial, Meta Key as Services Offered and Meta Value as Car Cleaning Service, it will fetch all the posts associated with Car Cleaning Services custom field.

    @n_feragnoli

    by default, WP Archive TEmplate doesn’t accept Custom Post Type posts. The Archive template query only accepts the default post type. That’s why you won’t see the posts created under a Custom Post type show up on an Archive Page of a Category or a Tag.

    You’ll need to add a bit of code to your functions.php so that the Archive template accepts posts from Custom Post Types.

    //code to accept all cusomt post types to be shown in category/tag archives
    function include_all_taxed_post_types($query) {
    if (
    ($query->is_tag() || $query->is_category()) &&
    $query->is_main_query() &&
    !is_admin()
    ) {
    $taxonomy = $query->is_tag() ? 'post_tag' : 'category';
    $post_types = [];

    foreach (get_post_types(['public' => true], 'objects') as $post_type) {
    if (is_object_in_taxonomy($post_type->name, $taxonomy)) {
    $post_types[] = $post_type->name;
    }
    }

    $query->set('post_type', $post_types);
    }
    }
    add_action('pre_get_posts', 'include_all_taxed_post_types');
    Thread Starter pradg

    (@pradg)

    I even changed the themes to check if that fixes but to no avail. And I pasted the Cover block from another template but the height of the cover block is totally incorrect and stretching beyond limits. Same settings on my Local WP doesn’t do this.

    Thread Starter pradg

    (@pradg)

    @multitalentedmommy

    yes i have checked this with clearing cache and on multiple browsers.

    All other blocks seem to be working. I have tried this now on multiple browsers, cleared cache on all browsers, deactivaated all plugins but nothing seems to be fixing this. 

    I even spun up a new Local WP setup and tested on the same browsers and everything is working and the Cover block is doing exactly what it is supposed to be doing. Not sure what broke on this particular WP site. If i access the Editor of the broken site and a test site, the Cover block in the test site works but not my broken site.

    Thread Starter pradg

    (@pradg)

    @bcworkz

    I have no problem in assigning templates. Issue is that it seems templates are not editable. Let’s say I have a website about smartphones. I wnt to create a Brand page for each manufacturer like Samsung, Apple, Nokia etc. So my initial thought was to create 1 template which would have the title at the top, a featured image below that (where I would put the logo of the brand), a query loop which fetches all the posts associated with that brand. But if i create such a template, then none of the above except the title and Featured Image are editable when i create a page and use that template.
    i then tried adding the query loop as a pattern but even that is not possible. So basically it looks like I will have to create a separate template for each brand even though the design is the same, which sort of defeats the purpose of a template.

    or is there a way I can create 1 template for “brands” and then create multiple pages, one each for a brand and use this template and still be able to edit the parts I want like the Query Loop?

    thanks.

    • This reply was modified 1 year, 1 month ago by pradg.
Viewing 15 replies - 1 through 15 (of 57 total)