• Resolved colonialreview

    (@colonialreview)


    Hi
    With the new update, it appears the post count next to each of my posts in the A-z section of my site have disappeared. Is there a fix for this? Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Dani Llewellyn

    (@diddledani)

    Did you perhaps previously edit the template without copying it into your theme? If you did, then your edits will be overwritten by the update.

    Other than that there should be no reason for the feature to stop working.

    Are there any error messages either shown when you load the page or in your server’s error_log? These can help to narrow down the cause if there are any.

    Thread Starter colonialreview

    (@colonialreview)

    Thanks for the quick response, I did not copy it into my theme. I apologize as I am pretty new to this, but is there an easy way of going about adding that into my theme?

    Also it appears the support article I used for editing the template is gone now, ie which number (54?) on the template to cut and paste. I believe it was something like get_the_item_post_count and the_item_post_count But don’t remember which one of those to use and replace with. Love this plugin and all it has done for my site- Let me know, thanks!

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    Copy the template from wp-content/plugins/a-z-listing/templates/a-z-listing.php into your theme (e.g. copy it to wp-content/themes/<your-theme>/a-z-listing.php).

    Now you can edit the copy in your theme to change line 58 that reads <?php $a_z_query->the_title(); ?>. You should get suitable results by changing it to:

    <?php $a_z_query->the_title(); ?> (<?php $a_z_query->the_item_post_count(); ?>)
    

    It is worth noting that if your theme is not one that you created yourself (such as one of the default WordPress themes, a theme from www.ads-software.com, or one from a third-party) then you likely will benefit from creating a child theme so that any updates to the theme aren’t going to cause this situation from happening again.

    Thread Starter colonialreview

    (@colonialreview)

    This worked perfectly! I also appreciate the advice for the child theme as well- took a little trial error but now I don’t have to worry about the update issues in the future!

    One last question- this isn’t really a big issue, but I am wondering if there is a way to remove certain posts in my A-Z page that have not yet been posted, but are scheduled to. Specifically, the ones that have the count (0) next to them. Please let me know if this is possible, and if it should be added under 58 as well.

    Thanks again!

    Plugin Author Dani Llewellyn

    (@diddledani)

    If you add hide-empty-terms="yes" to your shortcode then the ones with no posts should be hidden.

    • This reply was modified 5 years, 6 months ago by Dani Llewellyn. Reason: grammar correction
    Thread Starter colonialreview

    (@colonialreview)

    That worked- thanks again for all your help and development on this plugin!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Post Count’ is closed to new replies.