caterhamcomputing
Forum Replies Created
-
Forum: Plugins
In reply to: [CC Child Pages] Non-Linked Current Page Shown for Sibling PagesOK, a thought suddenly struck me – I see what you are getting at: that using the ID of the parent page isn’t ideal as it would need to be changed if the pages get re-arranged.
I’ll add a
show_current_pageparameter in the next release.The current page will still be a link and will need styling with something similar to the CSS in my earlier post.
Thanks for the suggestion …
Forum: Plugins
In reply to: [CC Child Pages] How to configure this pluginSorry about that … not my system, I’m afraid.
Forum: Plugins
In reply to: [CC Child Pages] How to configure this pluginSorry, I am unable to delete your posts from this forum … it is run by WordPress, and the only real control they give is being able to edit a post within 35 minutes of posting it.
See http://codex.ww.wp.xz.cn/Forum_Welcome#Deleting_.2F_Editing_Posts for more information.
Forum: Plugins
In reply to: [CC Child Pages] Non-Linked Current Page Shown for Sibling PagesAdding the current page to the list of siblings is exactly the same as showing the children of the parent page and would produce exactly the same list.
Without completely re-writing the plugin to not use the wp_list_pages function provided by WordPress, there is no way of not producing a link for the page. (Obviously this is technically possible, but I would not view it to add enough value to justify the effort.)
By using some simple CSS (as described previously), you can easily differentiate between the current page and it’s siblings.
Forum: Plugins
In reply to: [CC Child Pages] How to configure this pluginJust saw your response … looks like I was posting at the same time.
No, the Pages, Posts and other types of content aren’t organised by the menus … menus are arbitrary groups of items that cam be defined to have their own structure. This structure does not have to follow the organisation of the items contained in the menu.
Forum: Plugins
In reply to: [CC Child Pages] How to configure this pluginIf you are confused about working with Pages, there are tutorials on my site at https://caterhamcomputing.net/support/wordpress-video-tutorials/pages/ … I would suggest checking out the “Pages vs. Posts” video.
Forum: Plugins
In reply to: [CC Child Pages] How to configure this pluginOh, and you seem to have
HTML tags wrapped around where the shortcode would be … probably from copying and pasting from a web site … if you edit the page in Text mode, you can remove this unwanted HTML which will cause problems with the how the child pages are displayed.
Forum: Plugins
In reply to: [CC Child Pages] How to configure this pluginOK.
I have had a look, and can see that http://www.vanislebc.com/webdev/products/ is a page … but it looks as if what should be the child pages are also at the top level (e.g. http://www.vanislebc.com/webdev/body-and-foot-care/ … not http://www.vanislebc.com/webdev/products/body-and-foot-care/).
As all the pages are at the top-level, there are no child pages for the plugin to display.
If you edit the body-and-foot-care page, for example, and set the Parent to be the products page (from the Page Attributes meta-box in the right-hand column when you are editing the page) … and do this for each of the pages that should be sub-pages of products … and so on down the hierarchy of the pages … you will get the results you were expecting.
You will then probably want to add the shortcode to each of the “sub-sections” under products so that they show the product pages that belong to them.
I hope that this helps.
Forum: Plugins
In reply to: [CC Child Pages] How to configure this pluginIf you post a link to the page you have used the shortcode on, I’ll see if I can work out if the plugin will be of use to you.
Forum: Plugins
In reply to: [CC Child Pages] How to configure this pluginThe plugin does not show sub-menus, but sub-pages … and hierarchical post types.
If you have a page called Test, and add the shortcode
[child_pages list="true" depth="2"]into the content of that page – it will list al of the pages that are children of Test, and if any of them have child pages they will also be listed.Forum: Plugins
In reply to: [CC Child Pages] Non-Linked Current Page Shown for Sibling PagesYou can always specify the ID of the parent page (0, if it is a top level page), e.g.:
[child_pages id="3"]… and then just add styling to the current_page_item class:
.ccchildpages_list li.current_page_item a { color: #000; text-decoration: none; }… the
siblingsoption was added to specifically show just the siblings of the page.Hi
Firstly, the quotes you have used when specifying the custom class are not standard double quotes … if you look at your screenshot you will see that they differ from the quotes around the other parameters, the end result is that the quotes are also included when the class is output to HTML. (You can see this when looking at the source code of your page.)
You may find that switching to Text Mode in the WordPress editor is better when entering the shortcode.
Getting that sorted should fix the border and background colour and border.
Next, you are specifying a class that is not used by the plugin for the title link:
my_link_title_classIf you replace this with the
ccpage_title_linkthe colours you specify should show up … to specify this so that it only affects pages where you specify themyclass-ccchildpagesclass, use the following:.myclass-ccchildpages .ccpage_title_link:link { color: #2d84c4; }I hope that this helps … let me know if you are still having problems.
Forum: Reviews
In reply to: [CC Child Pages] Oustanding worksForum: Plugins
In reply to: [CC Child Pages] option to limit number of pages… I should have said, when using the technique above it would probably be a good idea to use a prefix for the parameter to avoid clashes with future development.
E.G. Use something like
eric3d_limitrather than justlimit… I am far less likely to use such a specific name when adding functionality to the plugin in the future …Forum: Plugins
In reply to: [CC Child Pages] option to limit number of pagesI have corrected a small omission to one of the filters in the shortcode, so if you update the plugin you can now add your option as follows:
if( class_exists('ccchildpages') ) { // Add filters only if CC Child Pages plugin is installed // Default values for parameters add_filter('ccchildpages_defaults', 'cc_add_limit_pages'); // Arguments for WP_Query - used by shortcode add_filter('ccchildpages_query_args', 'cc_limit_pages',10,2); // Arguments for wp_list_pages(), used in list mode add_filter('ccchildpages_list_pages_args', 'cc_limit_pages_list',10,2); } function cc_add_limit_pages($atts) { // Add default value for new limit parameter $atts['limit'] = - 1; // add default value ... - 1 = show all pages return $atts; } function cc_limit_pages($args, $a) { // check that parameter exists if( isset($a['limit']) ) { // parameter exists, so set value for posts_per_page $args['posts_per_page'] = intval($a['limit']); } return $args; } function cc_limit_pages_list($args, $a) { // check that parameter exists if( isset($a['limit']) ) { // parameter exists, so set value for number argument $args['number'] = intval($a['limit']); // N.B. according to the codex, specifying the number argument for wp_list_pages does not work correctly at present } return $args; }Now you would just specify the shortcode as follows:
[child_pages limit="5"]You can use this technique to add other options too …
I hope that this is of some help.