Thank you very much for your feedback.
I will check it and I need to test it if it works without problems.
Thread Starter
new_B
(@new_b)
Thanks, webvitaly.
Would it be possible to add hooks to the plugin? That way, it can be modified at certain areas (via filters and actions).
Thread Starter
new_B
(@new_b)
Thread Starter
new_B
(@new_b)
Hi,
I read further and it looks like page-list already has pluggable functions and thus, the latter of hooks and filters will not work. Sorry for the confusion
if ( !function_exists('pagelist_unqprfx_parse_content') ) {
Thanks again.
@new_b: Thank you for your advices and feedbacks.
If you will test pluggable functions in real project and if you will use your own function instead of the Pagelist plugin’s function please share your experience.
If it will not work we can together think how to fix it.
Thread Starter
new_B
(@new_b)
Thanks, webvitaly.
I tried overriding pagelist_unqprfx_shortcode in my theme’s functions.php but had no luck. The plugin function seems to get loaded first, before the customized one in the theme.
I searched around and it looks like pluggable functions is an older method and the preference is to use hooks (actions and filters) http://wpcandy.com/teaches/custom-hooks-and-pluggable-functions/. Can anybody validate this?
If so, @webvitaly, would it be possible to add (filter and/or action) hooks to the plugin instead?
What I need to accomplish is to modify the output in lines 71, 132 and 197 of page-list.php. (i.e., add/remove classes, etc.)
Thanks.
You can add css classes via shortcode param:
[pagelist class="custom-class custom-class-2"]
Does this solve your problem?
Thread Starter
new_B
(@new_b)
Thanks, webvitaly–getting close it’s a better and simpler solution.
My goal is to upgrade the plugin to the current version and redo some hacks applied by the original developers who modified it. I can’t reapply those changes (e.g. removing classes) using the method you suggested with the shortcode.
What I need is the sitemap to appear in 3 columns. (This was the case in the previous hacked code.)
I have 5 sitemap shortcode calls. (call them A to E)
I want them to look like
——–
A B C
——–
D E
——–
so 3 columns with 3 appearing on the first row; however, I am now getting the following, after adding the class=”–” shortcode to add back the classes I need.
——-
A B
——-
C D E
——-
——-
Does this plugin provide an easy way to do the columns?
Thanks.
Pagelist plugin does not have an easy way to add columns.
I would recommend you to use CSS multi-column to solve your problem.
CSS multi-column is supported with all modern browsers.
Or just try to add this css-code to your theme style.css file:
ul.page-list {
-webkit-column-count: 3;
-webkit-column-gap: 20px;
-moz-column-count: 3;
-moz-column-gap: 20px;
column-count: 3;
column-gap: 20px;
}
Thread Starter
new_B
(@new_b)
Hm…that solution doesn’t work for me as I’m using the shortcode multiple times for a single sitemap page (generating lists, A-E). The above makes each of A-E into 3 columns each (i.e. 3 x 5 = 15 columns). I’ll need to see what changed further. Thanks for your help.
@new_b: There are some new staff was added to shortcodes:
Maybe this could help to customize shortcode output on the fly?
But I didn’t fully understand how to use it. Please, check this out, maybe you will have some fresh ideas.