‘<?php the_category(‘, ‘) ?>’
And the category names would duly appear, in alphabetical order, separated by commas when there are more than one for that post.
As of 4.4, they are apparently now sorted by ID. There is, unless I’ve misread the Codex, no way to specify a sort on the_category, so I’m guessing something has changed in the pertinent file in wp-includes. This is admittedly exceedingly minor, but I’d like to think it’s fixable.
Site in question: https://www.dustbury.com/
]]><?php
/**
* Template Name: Include arbo
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package WordPress
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
* // <?php get_sidebar(); ?>
*/
get_header();
?><ul id="extra-sidebar-lt" class="widget-area" role="complementary">
<?php dynamic_sidebar( 'sidebar-4' ); ?>
</ul><?php
$args=array(
'cat' => '61',
'orderby' => 'title',
'order' => 'ASC',
'posts_per_page'=>-1,
'caller_get_posts'=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
if
($my_query->have_posts()) : $my_query->the_post();
?><div id="lt-title"><?php
$categories = get_the_category();
$separator = ' ';
$output = '';
if($categories){
foreach($categories as $category) {
$output .= '<a href="" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '">'.$category->cat_name.'</a>'.$separator;
}
echo trim($output, $separator);
}
?></div><?php
endif;
?><div id="lt" class="LTclass"><?php
while
($my_query->have_posts()) : $my_query->the_post();
$this_char = strtoupper(substr($post->post_title,0,1));
if ($this_char != $last_char) {
$last_ord = ord($last_char);
while ( $last_char >= 'A' && (ord($this_char) - $last_ord) > 1) {
++$last_ord;
$last_char = chr($last_ord);
echo '<div id="lettra"><a name="'.$last_char.'"></a></div>';
}
$last_char = $this_char;
echo '<a name="'.$last_char.'"></a><div id="lettra">'.$last_char.'</div>';
} ?>
<p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a><br/>
<?php echo get_post_meta($post->ID, 'description', true); ?>
</p>
<?php
endwhile;
}
?></div><?php
wp_reset_query();
get_footer();
?>
Its used in a page as a custom template.
I want to transform it to be used on the category template.
Here i call the category name : ‘cat’ => ’61’,
so it shows the posts title.
How could it be possible to determine the value of ‘cat’ in this template when surfing on https://../?cat=value
Thx!
]]>I’m looking for a way to create a sitemap (with our without a plugin) with only my Categories and have them sorted into 3, 4, or 5 columns and have them sorted Alphabetically.
I have found tons of sitemap plugins, but they either A.) only create one giant list of articles under the category, or B.) are completely unorganized in the fact that I will have a ton of categories.
I plan to have almost 800+ categories so if I can organize them in several different columns with maybe a given “A” or “B” letter then all those categories starting with that letter, that would be perfect.
A perfect example of What I would want something to resemble would be something like this: https://sphotos-b.xx.fbcdn.net/hphotos-prn1/66184_10151294236824624_956219615_n.jpg
Any and all help is appreciated! Thanks!
[ Stop bumping. ]
]]>Any clue how to make this STOP?
]]>I’m trying to get IMM-Glossary to list terms by letter, not by number. I think by putting WP-SNAP into IMM-Glossary.php around $Total_Number_Of_Pages should do it, but I can’t get it to function.
IMM-Glossary: https://www.internetmarketingmonitor.org/word-press-plugins/imm-glossary-wordpress-plugin
WP-SNAP: https://www.nateomedia.com/wares/downloads/wordpress/wp-snap/
Any help would be much appreciated.
Many thanks in advance,
Ross
]]>Enhance your WordPress blog by creating multiple, three-level alphabetical indexes of your posts based on any combination of post title, author, extract, or custom fields of your choice. Select which posts are included in your indexes using a combination of categories and tags, display them in up to four columns on a single page or over multiple pages.
For example, the AZIndex plugin can be used to:
* create an alphabetical index of all your blog posts, based on their titles, using extracts as short descriptions.
* create a review index, sorted by the name of the artist/author and the name of their albums/books.
* on blogs with multiple authors, create an index of posts by each author’s name.
Full list of features:
* Index posts by title, extract, author, or any custom field.
* Select index contents using a combination of categories and tags.
* One, two or three-level entries – heading, subheading, and description, all customizable.
* Up to four columns on a page.
* Multiple indexes can be created, each customized with its own settings.
* Fully customizable from the WordPress admin console. No need to know HTML or CSS.
* Single or multi-page indexes.
* Optionally generated links to each letter and page in the index.
* Group entries with the same heading under one entry (e.g. all the novels of the same author).
* Add your own text to the index pages.
* Control the number of items per page.
* Customize the stylesheets for the index page directly from the index administration page.
Minimum versions tested:
* WordPress v2.5 (not tested on prior versions of WordPress, but may work on recent versions like 2.3)
* PHP 5 (should work with PHP 4.3 onwards but it is, as yet, untested. Note: If any PHP 5-only APIs are found in the plugin code, I will remove them, if possible).
* MYSQL 5.0.
BETA Code:
Please note that this is the first public release of this plugin. I have been testing the plugin for a couple of weeks, but I have included a good number of features and it’s hard to test every combination of all the available options. So feel free to play, it’s very easy to use. Just be warned that it might not be entirely bug free on all combinations of browser and software releases.
Please make sure to read the release notes so you fully understand the limitations of this beta release.
If you’re interested, AZIndex Plugin is available at the following web address:
AZIndex Plugin version 0.1 (BETA)
Please leave comments, bug reports and feedback on that page.
I will add the plugin to the WordPress Plugin Repository within the next few days.
]]>