wepster
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin: Invite Friends] Fatal error when I activateHas anybody managed to get this plugin to work? I’ve just launched a networking website, and would love to be able to add this functionality to the site.
Forum: Plugins
In reply to: Parents and siblings in the submenu (the whole submenu) also on subpage?I ended up using the following code for the left-side navigation:
<?php if(!$post->post_parent){ // will display the subpages of this top level page $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); }else{ // diplays only the subpages of parent level $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); if($post->ancestors) { // now you can get the the top ID of this page // wp is putting the ids DESC, thats why the top level ID is the last one $ancestors = end($post->ancestors); $children = wp_list_pages("title_li=&child_of=".$ancestors."&echo=0"); // you will always get the whole subpages list } } if ($children) { ?> <ul> <?php echo $children; ?> </ul> <?php } ?>
And this code for the complimentary navigation inside the content field, when the bottom level of navigation isn’t displaying on the left:
<?php if($post->post_parent) $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); if ($children) { ?> <ul> <?php echo $children; ?> </ul> <?php } ?>
I’m taking advantage of the parentpage-id class in the body to hide the complimentary menu from all except the bottom level subpages. I wonder if there’s a dynamic way of displaying the menu only on the lowest level subpages.
Forum: Plugins
In reply to: Parents and siblings in the submenu (the whole submenu) also on subpage?Thanks esmi, now it’s showing the ancestors on the subpage too, but none of the subpages. There is one problem though, it’s repeating the top most level (Results), which is already visible and selected in the global menu. Do you know how I could remove it?
Is there a way I could produce another menu, that would include only the subpages? This would nicely compliment the menu on subpage, that is now only showing the years.
Forum: Plugins
In reply to: Parents and siblings in the submenu (the whole submenu) also on subpage?Still no luck here ?? The submenu is still just repeating the selected globalmenu item.
The following code works perfectly on all pages except a subpage in the deepest level. So if I in the navigation example I gave earlier, go to any of the subpages, the code only displays the siblings of that subpage. Is it possible to easily edit this code to make it work on the subpage?
if($post->post_parent) $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); if ($children) { ?> <ul> <?php echo $children; ?> </ul>
I’ll give a concrete example to make it easier to follow my thoughts. I have a global menu item called “Results”. Under Results I have a submenu with years, e.g. 2010 and 2009. Under e.g. 2010 I have Men, Women and Teenagers. If I choose e.g. Women, I get a menu, that only displays Men, Women and Teenagers.
I could also separate the level 3 links from the submenu, and display them as a separate menu in the content area instead. When trying out different codes, I’ve run into a version (maybe on that codex page you referred to earlier), that when being on a subpage displayed the parent and the parent’s sibling and none of the subpages. I could use that, if I knew how to add the separate subpage menu to the same page.
Forum: Plugins
In reply to: Parents and siblings in the submenu (the whole submenu) also on subpage?Thanks, I tried it out, but all I got with this is the top level item (the same one, that is already selected in the global menu) and none of the children. Maybe if in the “elseif” part instead of getting the top ID, I would call the ID from one level below. I’m not sure how to put that into code though.
Hi Tobias,
Thank you so much. I got it working now ??
In functions.php I had to write add_filter instead of add_filters. Otherwise I got an error. I thought I’d mention it in case anybody else stumbles upon this same problem and finds this solution.
Again, thank you for your help and for being so quick answering my questions ??
Best wishes,
PetraHi,
I’ve put “define( ‘WP_LANG’, ‘da_DK’ );” in the same place in wp-config, where I could find the empty default.
No, I don’t have the Danish WordPress translation installed. Even though the website I’m using WP for is in Danish, I’d like the WP admin area be in English, as it is now. Is this a problem from the plugin’s point of view? Is there a way I could force the plugin to display in Danish despite my WP being in English, maybe by editing controller-frontend.php?
Forum: Plugins
In reply to: Parents and siblings in the submenu (the whole submenu) also on subpage?I’ve already tried all of the options listed on that page, and none of the code snippets provided there do, what I’m trying to achieve. I’d like the submenu to keep the structure, that I showed above, even when on a subpage.
This is what I have down there:
/* <![CDATA[ */
jQuery(document).ready(function($){
$(“#wp-table-reloaded-id-2-no-1”).dataTable({“oLanguage”:{“sUrl”: “https://localhost/~pv/baneturneringen/wp-content/plugins/wp-table-reloaded/languages/datatables/lang-en_US.txt”}, “aaSorting”: [], “bSortClasses”: false, “asStripClasses”:[‘even’,’odd’], “bSort”: false, “iDisplayLength”: 100});
});
/* ]]> */Hi Tobias,
I made that change to wp-config, but it doesn’t make any difference. I’m working on the site locally, and I haven’t uploaded it anywhere yet. Can you think of anything else I could check?
Forum: Plugins
In reply to: WP-Table Reloaded Settings Not Available, Plugin Not Working