chatotek
Forum Replies Created
-
Forum: Plugins
In reply to: [Ambrosite Next/Previous Page Link Plus] Increasing Depth?Hi, thanks for your reply. If anyone else is interested my workaround (quick but probably not very efficient) was to not use in_same_parent and instead use the in_pages option to which I passed a comma seperated list generated with the get_pages function with child_of set to the top-most post ancestor.
Forum: Hacks
In reply to: Return page children for use in SQL queryI think I might have made my question a bit complicated by giving so much information. I think I can solve the problem on my own if someone can explain to me if it’s possible to get something like this to work:
<?php $parent_page = $post->ID; $pages = get_pages('child_of='.$parent_page.''); $single_line = implode("OR", $pages); echo $single_line; ?>Echoing $single_line would output “ID1 OR ID2 OR ID3” etc. where ID1 is the ID of child one.
Forum: Fixing WordPress
In reply to: wp_title as SQL variableThanks so much, the idea to echo the $sql part was genius! Just in case anyone’s reading this the only problem I had then was trimming the white space that was appearing in front of the $mytitle when the variable was generated. I added
function af_titledespacer($title) { return trim($title); } add_filter('wp_title', 'af_titledespacer');to the functions file and that solved the problem.
Thanks again!