Diana van de Laarschot
Forum Replies Created
-
Forum: Plugins
In reply to: [Category Posts in Custom Menu] Doesn't work with WPML (multi language site)Hi NikkaG,
I haven’t tested the plugin with the wordpress multilingual plugin. If my plugin works with WPML’s primary language, but does not with WPML’ s secondary language, then this seems to be something that WPML needs to address.
Since WPML is not free, I will not be testing this use case. I hope you’ll understand.
Please contact the authors of WPML and place this question with them. If I can increase my plugin’s compatibilty by making some changes, I’m not unwilling to do that, but as mentioned I won’t be testing against WPML.
I hope that your issue will be resolved, feel free to ask further questions.
Kind regards,
DianaForum: Plugins
In reply to: [Category Posts in Custom Menu] Any way to boost priority?Hi Art,
thanks for your message. In practice, it’s always the theme, there have been one or two users before you who had this problem and in both cases there was a conflict with the theme.
As for possible solutions: If I have to choose between (A) raising the priority of my plugin and breaking an entire theme, or (B) leaving it as is (with the theme overruling my plugin) I opt for the latter. I won’t have it that my plugin breaks someone else’s.
Reasons for these problems: If you’re PHP savvy you can see that even with the hooks that WordPress offers, I had to do a few weird things to implement the desired functionality; WordPress does not natively support extension of the Appearance > Menus panel. If you want to extend it, you have to copy the whole thing and change it. Therefore, in my opinion, plugin/theme conflicts are also in part caused by WordPress itself, because there is no way to _extend_ the Appearance > Menus panel; Each plugin or theme has to write a full override of this page. As soon as two plugins (or a plugin and a theme) *both* do this, the one with the highest priority is the only one whose functionality is present on this page.
This might be too technical an explanation, but I expect more people will encounter this, so here it is.
Kind regards,
DianaForum: Plugins
In reply to: [Category Posts in Custom Menu] Exclude sticky post from menuHi rgbcraft,
I’ve applied the fix I proposed myself. Firstly, I apologize for omitting the dollar sign in the $post variable.
Here’s what you should do. Find the line
foreach( (array) $posts as $pkey => $post ) {Right beneath that, but above the comment
// Decorate the posts ..., add the lineif (is_sticky($post->ID)) { continue; }The result should be:
foreach( (array) $posts as $pkey => $post ) {
if (is_sticky($post->ID)) { continue; }// Decorate the posts with the required data for a menu-item.
$post = wp_setup_nav_menu_item( $post );I may add some support for stickies later, but not right now.
Forum: Plugins
In reply to: [Category Posts in Custom Menu] Exclude sticky post from menuHi rgbcraft,
1. That’s not the foreach loop that iterates over the posts
2. You haven’t copied the line I gave you properlyHaven’t got the time to copy the exact code for you right now, I’ll check back in later.
Kind regards,
DianaForum: Plugins
In reply to: [Category Posts in Custom Menu] Exclude sticky post from menuHi rgbcraft,
thanks for your response. You could look at the is_sticky() function in WordPress (http://codex.wordpress.org/Function_Reference/is_sticky)
I haven’t tried it, but in the foreach loop that iterates over the posts, on the first line inside the loop you could try:
if (is_sticky(post->ID)) { continue; }
Again, I haven’t tried it, but something like this might work. I’ll think about adding support for your request in a way that doesn’t clutter the user interface. I don’t want to add too many checkboxes and stuff, I hope you’ll understand.
Kind regards,
DianaForum: Plugins
In reply to: [Category Posts in Custom Menu] GREAT JOBHi amommy,
I’ve added the option to specify “Number of Posts = 0”. This functionality is now present in the latest Development Version and will be available in the next release version.
Kind regards,
DianaForum: Plugins
In reply to: [Category Posts in Custom Menu] %post_date()Hi Joshua,
I’ve fixed this in the latest Development Version by adding forward slashes as possible characters within the brackets. So this will be fixed in the next version.
Kind regards,
DianaForum: Plugins
In reply to: [Category Posts in Custom Menu] %post_date()Hi Joshua,
the format you are entering is valid, according to http://codex.wordpress.org/Formatting_Date_and_Time
That suggests that my plugin does not recognize that slashes can be part of date time formatting too. My apologies for that, I’ll fix it asap.
Kind regards,
DianaForum: Plugins
In reply to: [Category Posts in Custom Menu] GREAT JOBHi amommy,
the ability “to NOT show posts but still be able to get rid of the menu item if category is empty” is not supported now, but I could add support for that by allowing you to specify “Number of Posts = 0”.
As for snippets of code, if some parts of the code have been useful or educational to you in other projects, feel free to re-use it.
License information:
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.Kind regards,
DianaForum: Plugins
In reply to: [Category Posts in Custom Menu] Date fields for menu title don't workTagged version 0.9.4 with fix for this.
Tech talk:
Apparently, a variable that I used was in global scope before and in a new release of WordPress had gone out of the global scope, which is why this worked in a previous version of WordPress and didn’t work anymore in the new version.Forum: Plugins
In reply to: [Category Posts in Custom Menu] Date fields for menu title don't workIf you need this functionality, you can grab the latest Development Version of the plugin.
Kind regards,
DianaForum: Plugins
In reply to: [Category Posts in Custom Menu] Date fields for menu title don't workI’ve tracked down the cause. I’ll check in a new version ASAP, but this might take a while since I’d like to add automated unit and integration tests to my plugin first. Hope I’ll get to it this weekend.
For those of you who are code-savvy: For some reason the result of the replace_ functions is no longer returned. I’m sure it was before, as confirmed here: https://wordpress.org/support/topic/unexpected-t_function-1?replies=19
Kind regards,
DianaForum: Plugins
In reply to: [Category Posts in Custom Menu] Date fields for menu title don't workHi fvschie,
thank you for reporting this, I’ll get on it right away!
Kind regards,
DianaForum: Plugins
In reply to: [Category Posts in Custom Menu] Add thumbnail option with postsHi Akhilraj,
that has nothing to do with my plugin, what you want is a styling issue. You should search for a WordPress Theme that does that, or find a frontend developer who can do this for you in CSS.
Kind regards,
Diana KoenraadtForum: Plugins
In reply to: CSS classes generated before calling wp_nav_menu_objectsI’ve found out why the aforementioned classes were not generated, an extra call to _wp_menu_item_classes_by_context did the trick.