Forum Replies Created

Viewing 15 replies - 361 through 375 (of 927 total)
  • Forum: Plugins
    In reply to: [A-Z Listing] Tag Count
    Plugin Author Dani Llewellyn

    (@diddledani)

    You can do this now by first updating to version 3.0.0 and then copying the file from wp-content/plugins/a-z-listing/templates/a-z-listing.php into your theme. For example, if your theme is called my-awesome-theme then copy the file to wp-content/themes/my-awesome-theme/a-z-listing.php.

    Once you’ve copied the template into your theme you need to edit it to change line 58 from:

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

    To:

    <?php $a_z_query->the_title(); ?> (<?php $a_z_query->the_item_post_count(); ?>)
    
    Plugin Author Dani Llewellyn

    (@diddledani)

    Thanks for pointing out the error in the documentation. I’ll try to get that fixed in the next release (which will be version 3.0.1 or 3.1.0 depending on what else is added).

    There isn’t a search feature in the plugin currently. It will need some custom coding to add. Adding an All item to the listing will likewise require custom code. I will take both of these as feature requests, though I might add these to an extension plugin rather than a core feature.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    You can set the alphabet by adding the alphabet parameter like below:

    [a-z-listing alphabet="ا,آ,ب,پ,ت,ث,ج,چ,ح,خ,د,ذ,ر,ز,ژ,س,ش,ص,ض,ط,ظ,ع,غ,ف,ق,کگ,ل,م,ن,و,هی"]
    

    It is important that you do not input any “right-to-left” or “left-to-right” markings within the shortcode. This is because the plugin will treat them as extra letters. These are markings are invisible, so you need to make sure your input is set to left-to-right mode, and that you do not switch modes, while writing the shortcode. The alphabet needs to be ordered from left-to-right with the first letter of your alphabet at the left and the last letter of your alphabet on the right.

    Multiple languages are not currently supported as I do not have access to any translation plugins to be able to work on the support.

    Plugin Author Dani Llewellyn

    (@diddledani)

    You cannot prevent this from showing.

    It is supposed to be hidden by default and shown whenever you have any items in your list that are not categorised into one of the alphabetical letters. For example, if you have a post beginning with a symbol like a quote character then this post will be put into the # category, and the # will be added to your listing to accommodate this.

    Don’t panic with the content of this post, but..

    Please make sure you change your database password, because you didn’t redact it from your pastebin of wp-config.php.

    You should also generate new salts; you can get random ones from https://api.wordpress.org/secret-key/1.1/salt – copy them into your wp-config.php replacing the ones already there. Updating your salts will cause everyone who has logged-into your site to be logged-out because the salts are used to save their credentials in their browsers. You need to replace your salts because your current ones are now public from the same pastebin.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Sorry for the confusion 🙂

    The documentation is split into two parts – one for display=posts and another for display=terms. I quoted the above suggestion assuming you were using display=terms.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Interesting idea. You can include multiple taxonomies in the listing by modifying the shortcode:

    [a-z-listing display="terms" taxonomy="main-tax,alias-tax"]
    

    By default it will list terms from both taxonomies as links, but you could try something like this to output the titles:

    <?php
    $term = $a_z_listing->get_the_item_object( 'I understand the issues!' );
    if ( 'main-tax' === $term->taxonomy ) :
    ?>
        <a href="<?php $a_z_listing->the_permalink(); ?>">
    <?php
    endif;
    
    $a_z_listing->the_title();
    
    if ( 'main-tax' === $term->taxonomy ) :
    ?>
        </a>
    <?php
    endif;
    Plugin Author Dani Llewellyn

    (@diddledani)

    The beauty of the template mechanism that I’ve put into the plugin is that given enough will you should be able to accomplish anything that you can do with a normal WordPress “The Loop” driven by WP_Query. To customise the template my plugin uses you need to copy the file from wp-content/plugins/a-z-listing/templates/a-z-listing.php into your theme at (e.g.) wp-content/plugins/your-theme-name/a-z-listing.php.

    I suspect you’ll want to use the post-id to pull your references from some location, such as a taxonomy, and append that information to the title. I’ve added the inner-most loop below (my plugin has a “letter loop” and an inner “items loop”) with a suggestion:

    <?php
    while ( $a_z_query->have_items() ) :
    	$a_z_query->the_item();
    
    	// Get the current post so you can access its ID.
    	$post = get_the_item_object( 'I understand the issues!' );
    
    	// Get the aliases.
    	$aliases = get_the_terms( $post->ID, 'aliases' );
    	?>
    	<li>
    		<a href="<?php $a_z_query->the_permalink(); ?>">
    			<?php $a_z_query->the_title(); ?>
    			/**
    			 * Add the aliases here to link them to this post.
    			 */
    		</a>
    		/**
    		 * Add the aliases here to have them not-linked to this post
    		 * or to add your own links to them.
    		 */
    	</li>
    <?php endwhile; ?>

    The argument passed to get_the_item_object() must read exactly I understand the issues! to indicate to the plugin that you are aware that larger listings will be slowed or hit resource limits by using this mechanism. I will add a get_the_ID() method on the $a_z_listing object in a future release of the plugin to alleviate some of the related pressures.

    Plugin Author Dani Llewellyn

    (@diddledani)

    @pcgardner please start a new topic. However, for completeness, the filter I mentioned, and linked to documentation of, above is not deprecated.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Your site has javascript in the main document that looks like:

    <script>
    //jquery-ui-tabs
    jQuery(document).ready(function($) {
    jQuery( "#az-tabs" ).tabs();
    });
    </script>
    

    This is not shipped by my plugin which means either you, one of your plugins, or your theme has added it.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Your theme defines the following CSS rule:

    .post-content ol > li:first-child,
    .post-content ul > li:first-child {
    	margin-top: .5em;
    }

    You need to add a more-specific rule to override it. I think the following rule might do it:

    .post-content ul.az-links > li:first-child {
    	margin-top: 0;
    }
    Plugin Author Dani Llewellyn

    (@diddledani)

    The only bit of code in my plugin that adds a display: none to any elements is the tabify javascript. If you aren’t loading that then you either have some PHP that filters and modifies the output of WordPress before sending the page, or you have some other javascript that is hiding elements once the page loads in the user’s browser.

    I could check your site to see if I can isolate a javscript-based hiding mechanism. I’ll need the link to it in order to do this though.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    I’m not understanding quite what you are asking. Could you expand the question a bit so that I can get a better understanding of your requirements?

    Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    I’m not sure what’s happening on your site, but it might be that you have enabled the tabify javascript with a bit of code in your theme’s functions.php or you might have another javascript somewhere that is trying to make the listing into a tabbed view. You can try verifying by clicking on one of the linked letters at the top (the horizontal bar of letters) to see if they change which letter is visible below.

    Plugin Author Dani Llewellyn

    (@diddledani)

    Can you please post the address where I may find the ‘categories images’ plugin so that I can investigate?

Viewing 15 replies - 361 through 375 (of 927 total)