Forum Replies Created

Viewing 15 replies - 46 through 60 (of 927 total)
  • Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    Are your NES games saved as a particular post type, or as a post with a specific term assigned? Depending on which way they are saved to your database you want something like, either:

    [a-z-listing display="posts" post-type="your-nes-post-type"]
    

    or

    [a-z-listing display="posts post-type="post" taxonomy="the-taxonomy-containing-the-nes-games-term" terms="the-nes-games-term"]
    
    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    The plugin doesn’t have any code to handle “out of stock” products. The plugin thinks the terms are not empty because the products are still published.

    Can you note which commerce plugin you’re using so that I may investigate?

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    Can you rephrase your question, because I’m not sure what you’re asking for?

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    filtering by terms from multiple taxonomies is not possible as the plugin stands right now.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    Your layout is wonky/broken due to the shortcode having been inserted to the post inside a “preformatted text” region. This causes WordPress to wrap the listing in <code> and <pre> tags leading to the breakage.

    It is currently not possible to have multiple listings on the same page for the reason you highlight with the links pointing to duplicate IDs so the second listing won’t be linked correctly. The best solution for now is to include each listing on separate pages.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    I don’t understand the question or how it relates to the A-Z Listing plugin. Can you elaborate how the plugin isn’t working as expected or otherwise rephrase the question to relate to this plugin?

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    What does the error say? Are there any more details in your server’s Error Log file?

    How have you configured the A-Z Listing shortcode?

    Does the error occur on any page, or only the page with the shortcode?

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    To filter terms from a listing showing category names you want something like:

    [a-z-listing display="terms" taxonomy="category" exclude-terms="4,8,12"]
    

    This will show all the categories without the categories with term-ID of 4, 8, and 12. You can get the term-ID by going to the categories list in wp-admin and inspecting the link for the category(ies) you want to filter. The link will look like this:

    https://example.com/wp-admin/term.php?taxonomy=category&amp;tag_ID=1&post_type=post&wp_http_referer=%2Fwp-admin%2Fedit-tags.php%3Ftaxonomy%3Dcategory

    The term-ID is the bit highlighted in bold. You want just the number after the = symbol.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    You’ve tried two different shortcodes. The top one explicitly sets the post-type to post meaning “Posts”, while the bottom one by not specifying a post-type will select page i.e. “Pages”.

    I believe you want the following:

    [a-z-listing display="posts" post-type="wiki" taxonomy="feature" terms="character"]
    
    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    While you can display the brands stored in a WooCommerce product attribute type, the URL will be wrong. I need to figure out why the URLs are wrong and fix them for this to work correctly. If you don’t mind the URLs pointing to 404 (Not Found) pages, then this will work:

    [a-z-listing display="terms" taxonomy="pa_brands"]
    

    Depending on your brands product attribute name it might be pa_brand (singular) or you might have a completely different name for it beginning with pa_.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    You want a shortcode like:

    [a-z-listing display="posts" post-type="post" taxonomy="category" terms="term-slug"]
    

    The term-slug should be the “slug” of your category that you have assigned to the posts. This is discoverable in the categories list table.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    Sorry I lost track of this thread. The title can be manipulated with the the_title filter, which is a WordPress default thing; or you can use a custom A-Z Listing template page by copying the file from wp-content/plugins/a-z-listing/templates/a-z-listing.php into your theme alongside the style.css. In the custom template you will want to replace:

    <?php $a_z_listing->the_title(); ?>
    

    With something like this:

    <?php
    $title = $a_z_listing->get_the_title();
    $post = $a_z_listing->get_the_item_object( 'I understand the issues!' );
    $title = preg_replace( '/^' . $post->post_name . '/i', $title );
    echo $title;
    ?>

    Note the text 'I understand the issues!' must state exactly that, and indicates that you’re aware that using the feature on larger listings (more posts) may be slow or break the page entirely with memory exhaustion or timeouts.

    If you go the the_title route you want to do something like this in your functions.php file:

    add_filter( 'the_title', 'override_a_z_titles', 10, 2 );
    function override_a_z_titles( $title, $post_id ) {
        if ( ! is_page( $page_id_or_title_or_slug_of_a_z_listing_page ) ) {
            return $old_title;
        }
        $post = get_post( $post_id );
        $title = preg_replace( '/^' . $post->post_name . '/i', '', $title );
        return $title;
    }

    The big caveat is I have written this from memory, without double checking that either example is correctly coded.

    Plugin Author Dani Llewellyn

    (@diddledani)

    This requires a bit of custom PHP to hook the filter a-z-listing-item-index-letter

    Something like this might work:

    add_filter( 'a-z-listing-item-index-letter', 'override_a_z_index_letter', 10, 2 );
    function override_a_z_index_letter( $previous_indices, $item ) {
        return array( mb_substr( $item->post_name, 0, 1, 'UTF-8' ) );
    }
    Plugin Author Dani Llewellyn

    (@diddledani)

    You should be able to test for the post_type with this (I hope):

    <?php
    $post_type = get_post_type( $a_z_listing->get_the_item_id() );
    if ( 'dlm_download' === $post_type ) {
        // do the download bits here
    }
    ?>
    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    The A-Z Listing plugin uses inbuilt WordPress functionality to get the permalink. If your download plugin has a different method of generating the links there’s not much I can do. Ideally they’d hook the post_type_link filter so that it works out of the box but I suspect they aren’t doing this if the link is wrong.

Viewing 15 replies - 46 through 60 (of 927 total)