Dani Llewellyn
Forum Replies Created
-
Forum: Plugins
In reply to: [A-Z Listing] only display listing of clicked letterHi @girdy74, it looks like the path to the javascript is wonky. I set the path to include
/js/when it should be/scripts/. The fix is coming in 2.1.0.Forum: Plugins
In reply to: [A-Z Listing] only display listing of clicked letterWhile completely hiding the posts isn’t an out-of-the-box feature, you can use the “tab”-like functionality by adding a small bit of code into your theme’s
functions.php:<?php add_filter( 'a_z_listing_tabify', '__return_true' );If the file already exists you won’t need to add the
<?phpbecause it will already be in the file. You need to make sure that theadd_filterline appears directly after the<?phpline at or near the top of the file.Forum: Plugins
In reply to: [A-Z Listing] A-Z Multi Column No longer workingawesome! I’m really glad it’s working for you now 🙂
(I’ll mark this thread as resolved, but come back if something else goes awry or you would like me to help any further)
Forum: Plugins
In reply to: [A-Z Listing] A to z site map not workingWould it be possible for you to take a screen shot of the widget configuration form for me please? I’m thinking that the “Site map A-Z page” field is confused somewhere.
The way it works is you should type some or all of the title of the page you want to link to into the field. The plugin will show you all posts matching that title as you type. Click one of the posts when you see the one you want and that will lock-in the setting.
Note that the field should not contain an address or post-ID.
Forum: Plugins
In reply to: [A-Z Listing] display of grid when being logged in as adminCan you expand a bit on that? I’m not sure what you are referring to. A screenshot of your site showing the problem might help me.
I’m sure my lack of understanding is my fault, and I’m sorry I can’t help directly in this reply :-(.
Forum: Plugins
In reply to: [A-Z Listing] After update, the field ACF not appear in pageThe code you shared in the previous post does not call
the_post_thumbnailorget_the_post_thumbnail, nor does it check that there is a thumbnail withhas_post_thumbnail. You still need to do those bits. They need to appear after this line:$post = $a_z_query->get_the_item_object( 'I understand the issues!' );Forum: Plugins
In reply to: [A-Z Listing] Exclude posts not working after updateCan you share the shortcode you’re using to exclude posts? It should be similar to:
[a-z-listing display="posts" post-type="page" exclude-posts="5,6,7"]Versions 2.0.5 and 2.0.6 didn’t include any changes to the code that excludes posts, so I’m not sure why it would stop working for you….
Forum: Plugins
In reply to: [A-Z Listing] Page listing is not workingThere’s currently a limitation that prevents using terms to filter a listing of pages. This is due to my usage of the function
get_pages()from WordPress core. I am working on some code that will reduce the usage of that function, but it will still be a problem if the plugin thinks it needs to display only children and grandchildren of a specific post.Forum: Plugins
In reply to: [A-Z Listing] Show specific categoriesYou’re right – good catch. There’s a limitation with taxonomies against pages.
I can alleviate that, partly, by updating the plugin to use
get_pageson a more limited basis – currently it usesget_pagesfor any listing that requests pages as the post type. I’ve worked up some code which I’ll put into a new version 2.1.0 in the coming week, but there will still be an issue if the plugin thinks it needs to show child and grandchild pages of a specific post.Forum: Plugins
In reply to: [A-Z Listing] A to z site map not workingLooking at your site, I see that you’re not using the A-Z widget from my plugin. Have you disabled it specifically because of the problem or do you have multiple A-Z widgets and might have selected one from another plugin accidentally?
Forum: Plugins
In reply to: [A-Z Listing] A-Z Multi Column No longer workingHi,
I’ve promoted the multi-column mode, with some changes, to be the default output.
The CSS has changed, however, so the old template won’t display correctly any more, as you found out..
If you haven’t modified the template when you copied it into your theme, you can just delete the file and everything should work out of the box now. Alternatively, if you have modified the template you’ll need to compare to the default template at
wp-content/plugins/a-z-listing/templates/a-z-listing.phpand merge your custom code into a copy of this file in your theme like you did with the old multi-column template.Forum: Plugins
In reply to: [A-Z Listing] After update, the field ACF not appear in pageI mistyped, and you copied verbatim.
Try replacing
has_thumbnailwithhas_post_thumbnailto get past that specific undefined function error.Forum: Plugins
In reply to: [A-Z Listing] URGENT! NEW FEATURE NEEDED – A-Z by posts with ThumbnailsI’m working on a 2.1.0 version which will add two new filters for overriding the index letters and titles of items. Rather than trying to memorise or copy my implementation of the heavily nested array structure, you will be able to instead hook the filters
a_z_listing_pre_index_item_titleanda_z_listing_item_index_letter.Their implementation will be as follows:
add_filter( 'a_z_listing_pre_index_item_title', 'my_override_titles', 10, 3 ); function my_override_titles( $title, $item, $type ) { // $title is the title of the item as used for the index // set $title to your preferred format. This will then be indexed by the // default extraction - i.e. the first letter of the new title will be // the index letter used for this item // delete Mr and Mrs from the start of titles (presume they're names): $title = preg_replace( '^((Mr)|(Mrs))\s+', '', $title ); return $title; } add_filter( 'a_z_listing_item_index_letter', 'my_override_index_letter', 10, 3 ); function my_override_index_letter( $letters, $item, $type ) { // $letters is an array of letters to use for the item in the index // any item can be indexed under any number of letters if ( 15 === $item->ID ) { // let's index this item under P and Z. $letters = array( 'P', 'Z' ); } return $letters; }- This reply was modified 7 years, 8 months ago by Dani Llewellyn. Reason: added example of overriding $title
- This reply was modified 7 years, 8 months ago by Steven Stern (sterndata).
Forum: Plugins
In reply to: [A-Z Listing] URGENT! NEW FEATURE NEEDED – A-Z by posts with ThumbnailsThat’s a curious discovery, @tjebe, thanks for sharing. The format of the
$this->current_item['item']value changed in 2.0.0 but I have just realised that if a site has hooked thea_z_listing_item_indicesfilter then they might be returning the old style whereitemwas aWP_PostorWP_Termobject.If you have such a hook implemented then you can immediately fix it by changing your filter function to something like:
add_filter( 'a_z_listing_item_indices', 10, 3 ); // the last number is different! function my_item_indices_hook( $indices, $item, $type ) { $indices = array(); // this empties the default index if ( 'terms' === $type ) { $title = $item->name; $item_id = $item->term_id; $permalink = get_term_link( $item ); } else { $title = get_the_title( $item ); $item_id = $item->ID; $permalink = get_the_permalink( $item ); } // replace the next line with your logic to determine the index letter $index = mb_substr( $title, 0, 1, 'UTF-8' ); $indices[ $index ][] = array( 'title' => $title, 'item' => ( 'terms' === $type ) ? "term:{$item_id}" : "post:{$item_id}", 'link' => $permalink, ); return $indices; }I will also roll a new release to fix the situation where a site has customised the index returning a
WP_Postobject in the old style.Forum: Plugins
In reply to: [A-Z Listing] 2.0.6 not available – sitemap not workingI’ve just seen it, thank you very much 🙂