Dani Llewellyn
Forum Replies Created
-
Forum: Plugins
In reply to: [A-Z Listing] Greek alphabet, two listings on one pageHi,
You can override the alphabet per listing with the
alphabet=""parameter. The default alphabet is:AÁÀÄÂaáàäâ,Bb,CÇcç,Dd,EÉÈËÊeéèëê,Ff,Gg,Hh,IÍÌÏÎiíìïî,Jj,Kk,Ll,Mm,Nn,OÓÒÖÔoóòöô,Pp,Qq,Rr,Ssß,Tt,UÚÙÜÛuúùüû,Vv,Ww,Xx,Yy,ZzHowever, because the plugin is localised via translate.wordpress.org, your site might have a different default alphabet.
For Greek, if your site doesn’t have a greek alphabet by default, I think you want a shortcode like:
[a-z-listing alphabet="Αα,Ββ,Γγ,Δδ,Εε,Ζζ,Ηη,Θθ,Ιι,Κκ,Λλ,Μμ,Νν,Ξξ,Οο,Ππ,Ρρ,Σσς,Ττ,Υυ,Φφ,Χχ,Ψψ,Ωω"]For English you can explicitly force the default back to the one above if your site has been localised and overridden it, with:
[a-z-listing alphabet="AÁÀÄÂaáàäâ,Bb,CÇcç,Dd,EÉÈËÊeéèëê,Ff,Gg,Hh,IÍÌÏÎiíìïî,Jj,Kk,Ll,Mm,Nn,OÓÒÖÔoóòöô,Pp,Qq,Rr,Ssß,Tt,UÚÙÜÛuúùüû,Vv,Ww,Xx,Yy,Zz"]- This reply was modified 5 years, 2 months ago by Dani Llewellyn. Reason: Add link to a-z-listing plugin on translate.wordpress.org
Forum: Plugins
In reply to: [A-Z Listing] Load styles for specific category onlyHi,
Is your page for a term inside the taxonomy with slug of
category? If your term is in a different taxonomy, then you might find you need to useis_tax. This lets you specify which taxonomy to check the term of whereis_categoryonly checks for a term in the “categories” taxonomy.As a temporary check you can verify the function is working by commenting-out the
ifto see whether the stylesheet is included without page-targeting.I’ve seen cases where some optimisation plugins are overzealous in their caching and combining and minifying mechanisms where they don’t expect page-specific stylesheets so only store one combined file for the whole site.
Forum: Plugins
In reply to: [A-Z Listing] Increase the width of a column. HELP!!Hi,
It’s likely that modifying the CSS file in the plugin is not being reloaded by your browser due to the browser’s caching mechanisms. You might also have server side systems in place to cache the file or combine and minify all your CSS files.
The recommended way to override the CSS is to use the theme customiser to include the modified CSS in the box labelled “Additional CSS”. To get to the customiser, navigate to
wp-adminand then themes -> customise. In the customiser navigate to “Additional CSS” near the bottom of the menu on the side of the screen.Forum: Plugins
In reply to: [A-Z Listing] How do I add a few letters to the list?@nenifaranto86 it’s best to start your own thread rather than jumping into someone else’s problem. You can do what you want one of two ways:
- Switch your PHP to
echo do_shortcode( '[a-z-listing post-type="post-slug"]' );, and include thealphabetparameter there, or, - Use the filter
a_z_listing_alphabetto override the alphabet
- This reply was modified 5 years, 2 months ago by Dani Llewellyn. Reason: fix code snippet
Forum: Plugins
In reply to: [A-Z Listing] A-Z listing letter click is not workingHi,
This is caused by your site including the following HTML in the
<head>block:<base href="https://example.com/">(I’ve change the URL for your privacy)
You need to find out whether this is inserted by a plugin or your theme. You can use the health check plugin to disable other plugins and switch your theme for your session to test without changing anything for your visitors. This lets you test your live website safely.
- This reply was modified 5 years, 2 months ago by Dani Llewellyn. Reason: Remove accidentally exposed url
Forum: Developing with WordPress
In reply to: $s in load_template functionHi,
Do you have an issue with the
load_templatefunction that you’re trying to resolve? The$svariable is potentially set by theextract()call, which is exposing the$wp_queryparameters to your template files.Forum: Everything else WordPress
In reply to: Audio icon on thumbnailHi,
You can do this in your template for the post with the
has_termfunction. You need to check that each post has the term (podcast) and output additional content.Alternatively, you can use
get_the_termswith a loop to assign a CSSclass=""value that indicates the categories it has assigned. (You could also do this withhas_termfor just the podcast term, without the loop.) You need to then add CSS styles targeting your podcast class to add the required icon.Forum: Fixing WordPress
In reply to: Embedded FontsThis looks like it will be quite time consuming to do. You currently have
<span>tags around each separate piece of text that specifies the font for that piece of text. Here is an example:<h1 align="center"><span style="color: #666600; font-family: Georgia, Times New Roman, Times, serif; font-size: 300%;"><i>Dire<br /> Badger</i></span></h1>Another example:
<td width="50%"><span style="font-family: Georgia, Times New Roman, Times, serif;"><a href="twenty%20worlds%20Age%20of%20Discovery%20Empire%20bestiary.htm">To<br /> Main Bestiary </a></span></td>To replace all the fonts with the site-default you will need to edit the content to remove each
<span>tag but leave the text inside it.Forum: Plugins
In reply to: [A-Z Listing] How do I add a few letters to the list?Hi,
This is documented in the readme at the plugin’s listing on WordPress.org. See the
alphabet=""parameter.Forum: Developing with WordPress
In reply to: filter out post by specific category and tagsHi,
Unfortunately WP_Query is not built to do what you need out of the box. The most sane method to do this is to query the posts by category as you have already, and then use
->get_posts()to fetch every post into an array. Once you have the array you need to loop through and re-organise and group the posts by tag. Something like this (you will want to modify to suit):<h2 class="page-heading"> <?php single_cat_title(''); ?></h2> <section> <?php global $post; $args = array ( 'post_type' => 'post', 'post_status' => 'published', 'category_name' => 'digitale-tjenester', 'posts_per_page'=> -1, ); $query = WP_Query( $args ); $posts = $query->get_posts(); $grouped_posts = array(); foreach ( $posts as $post ) { $tags = wp_get_post_terms( $post->ID, 'post_tag' ); foreach ( $tags as $tag ) { $grouped_posts[ $tag->slug ] = $post; } } foreach ( $grouped_posts as $tag => $posts ) : ?> <h3><?php echo esc_html( get_term_by( 'slug', $tag, 'post_tag' )->name ); ?></h3> <ul> <?php foreach ( $posts as $post ) : setup_postdata( $post ); ?> <li><?php the_title(); ?></li> <?php endforeach; ?> </ul> <?php endforeach; wp_reset_postdata(); ?> </section>Forum: Fixing WordPress
In reply to: ERR_TOO_MANY_REDIRECTSHi,
I suspect this is a redirect loop due to HTTP vs HTTPS. The most common cause of this is where your siteurl is set to HTTP but you have a redirect set in your
.htaccessfile or some other server configuration file to force HTTPS for some or all of your site.Forum: Fixing WordPress
In reply to: Strange strange problem with file permissionsHi,
WordPress needs writable access to the folder(s). With UNIX permissions the three numbers indicate in sequence user, group, world. 755 means only the owner (user) of the folder(s) is allowed write access, so WordPress must also run as that user to be able to write to the folder(s).
A couple of things to find out:
- What is the owner username of the folder(s)?
- What user does WordPress (actually PHP) execute as?
Forum: Plugins
In reply to: [A-Z Listing] the style is not the sameHi,
I’m not sure, but if you have edited the template without copying it into your theme then the update will have overwritten your changes. The solution is to copy the template into your theme and edit it there so that it isn’t overwritten when the plugin is updated. You might also want to look into creating a child-theme so that if your theme is updated then that change doesn’t wipe out the template again.
Forum: Plugins
In reply to: [A-Z Listing] CSS file missing in a custom archive pageHi,
This is due to the way the plugin detects with
has_shortcode()whether the current post/page has the shortcode embedded in it’s content. As you’re calling the shortcode programmatically the detection fails. The good news is there is a simple workaround. Add the following to your theme/child-theme’sfunctions.phpto load the CSS on every page:add_action( 'init', 'a_z_listing_force_enable_styles' );Forum: Developing with WordPress
In reply to: using C# program in WP