caterhamcomputing
Forum Replies Created
-
Forum: Plugins
In reply to: [CC Child Pages] Siblings in the WidgetA straight-forward option for siblings (as you describe, IntegrityWebDev) should be feasible… I’ll be rolling up a new release shortly, so I’ll try and squeeze that in.
Re-reading the posts here, I wonder if I misunderstood what was being asked for originally … hopefully I can rectify that 🙂
Forum: Plugins
In reply to: [CC Child Pages] Don't show title when there are nog linksI’m not sure I understand the problem … the widget will only display if the current page has children.
I have also just tried a test adding a widget to a sidebar and selecting to show the children of a specific page that does not have children. The widget is not displayed in this scenario either.
Can you post a link to the page on which you have a problem?
As I haven’t heard back, I am assuming that this issue is resolved.
If you are still having problems, please do not hesitate to let me know.
Thank you for using the plugin.
Forum: Plugins
In reply to: [CC Child Pages] Custom Walker for widgetNo problem … I’ve spent days chasing that kind of problem myself 🙂
Glad that it is working OK for you …
Forum: Plugins
In reply to: [CC Child Pages] Custom Walker for widgetHi.
If the above is copied and pasted from your code, I think the problem lies with the line specifying the custom walker:
$arg['walker'] = new Svg_Icon_Walker();should read
$args['walker'] = new Svg_Icon_Walker();I’ve had a look at my code, and can see no other obvious reason for you experiencing problems.
Please let me know if this fixes the problem …
Forum: Reviews
In reply to: [CC Child Pages] Great Plugin and Superior supportGlad that you got it all sorted out – always happy to help when I can.
Forum: Plugins
In reply to: [CC Child Pages] Active sibling shows in sibling list – on one page onlyThank you for your email confirming that the problem is sorted, and was not a problem with the plugin.
Forum: Plugins
In reply to: [CC Child Pages] Active sibling shows in sibling list – on one page onlyIf you would like me to have a quick look, I would be happy to … even if it is just to double-check that it isn’t anything to do with my plugin.
If you do want me to, I’d suggest setting up a new user so that it can be dropped once it is no longer needed.
Obviously, don’t post any logins here as it is a public forum – you can contact me via my web site at https://caterhamcomputing.net/
Tim Lomas
Forum: Plugins
In reply to: [CC Child Pages] Active sibling shows in sibling list – on one page onlyThe “issue” discussed in the thread you linked to is effectively a feature request, and is not relevant here.
Without access to your site, it is hard to say exactly what is different about the “Providers” page … but I can see that the issue affects the title for the column too – which is output by:
$id = wp_get_post_parent_id( $post_ID ); ?> <h2> <?php echo get_the_title( $id ); ?> </h2>… and not the shortcode.
I think you need to work out why
wp_get_post_parent_idreturns the current page for the “Providers” page … if you can correct that,get_the_titleand my shortcode will both output what you expect them to.Also, you do not need to specify the
idparameter in the shortcode when using thesiblingsparameter as it will not be used.I would also suggest the code might be easier for you to maintain using PHP switch statement, as you have a lot of repeated code all doing the same thing:
switch ( $post->post_parent ) { case '11': case '13': case '15': case '17': $id = wp_get_post_parent_id( $post_ID ); ?> <h2> <?php echo get_the_title( $id ); ?> </h2> <hr> <?php echo do_shortcode('[child_pages siblings="true" cols="1" link_titles="true" class="cp-list" list="true"]'); break; }See http://php.net/manual/en/control-structures.switch.php
Let me know if this helps.
Hi.
I am including a “fix” for this in the next release … thank you for pointing it out to me.
I shall probably leave the “Continue reading” link enabled by default for backwards compatibility (in case anyone relies on it), but allow it to be turned off either globally from the settings or by specifying a parameter.
Hopefully I should be able to roll up a new version by the end of the week.
Forum: Plugins
In reply to: [CC Child Pages] Orderby titleOK.
The problem is that the qTranslate-X plugin changes the data stored in WordPress’s ‘post_title’ field in the database.
Every time you enter a translation for the content, both the ‘post_title’ and ‘post_content’ fields get updated.
qTranslate stored ALL translations in the same field, encoded in a special format. Here is an example of the content of a multi-lingual Title field:
[:en]Cotek[:fi]Cotek[:sv]Cotek (Svenksa)[:]Only the languages used are stored in the field, so another Title may be stored as:
[:sv]AmpliTech[:]When my plugin (or any other plugin, widget or part of WordPress that uses WP_Query) requests the items are returned in alphabetical order, it will return then in the following order:
[:en]Cotek[:fi]Cotek[:sv]Cotek (Svenksa)[:][:sv]AmpliTech[:]
… as
[:en]is alphabetically before[:sv].I therefore have to say that the “problem” (if it is truly a problem) is with how qTranslate X is designed, as it stops standard WordPress functionality from working as expected.
As a workaround, my previous suggestion is the best that I can presently offer. Using a drag and drop plugin to sort the pages, it should be very quick to do.
Ensuring that translations are created in the same languages for each page would probably also work, as long as qTranslate X always puts the translations in the same order within the field.
I am also looking into introducing a way of sorting using meta-data (custom fields), which may allow you to use a custom field to store the title for sorting.
Forum: Plugins
In reply to: [CC Child Pages] Orderby titleHi again.
Just a quick thought … it might just be easier to arrange the pages in the order that you want them to appear from the WordPress dashboard. The default sort order (menu order) will then be correct.
A plugin such as Simple Page Ordering (https://ww.wp.xz.cn/plugins/simple-page-ordering/) will help to make this easier to manage.
Forum: Plugins
In reply to: [CC Child Pages] Orderby titleHi.
Just a quick update to let you know I am still working on this … I have not found the problem yet. As far as I can see, everything should work.
I need to look into the other plugins that you are using to see how they may affect the query that gets the pages, so I am building a test environment with all the plugins you have installed currently to see if I can reproduce the problem.
I suspect that the problem lies with qTranslate and how it stores the various translations for the title field (see http://wordpress.stackexchange.com/questions/123531/order-by-title-but-now-built-in-wordpress-func-sort-the-title) … but don’t wish to jump the gun and make assumptions at this point.
If this does turn out to be the case, I will look into whether it is feasible to build in some kind of workaround (as I suspect that qTranslate is likely to be used by many sites). The answer given in the link above looks a bit inefficient to me, and I don’t want to impact sites that aren’t using qTranslate.
Forum: Plugins
In reply to: [CC Child Pages] Orderby titleHi.
I’ve tested the current version of the plugin on a test page, and can see no problems …
I created pages named as per your list above (creating them purposefully out of order) and copied and pasted the shortcode from the above post to the parent page, and everything came out in alphabetical order as expected.
Is the page you are having problems with available to view? If I could see the site, it might help me to understand what is happening.
Forum: Plugins
In reply to: [CC Child Pages] option to limit number of pagesHi.
Hopefully, it is all working for you now … a small correction to the code I provided, to ensure that list views work as expected when limit is not specified:
function cc_limit_pages_list($args, $a) { // check that parameter exists if( isset($a['limit']) ) { // parameter exists, so set value for number argument $limit_val = intval($a['limit']); if ( $limit_val > 0 ) $args['number'] = $limit_val; // N.B. according to the codex, specifying the number argument for wp_list_pages does not work correctly at present } return $args; }I’m going to mark this topic as resolved since the solution has been provided and tested. However, if you have any further problems please do let me know.