Skip to content

Instantly share code, notes, and snippets.

@juarezpaf
Created September 6, 2009 01:22
Show Gist options
  • Save juarezpaf/181591 to your computer and use it in GitHub Desktop.
Save juarezpaf/181591 to your computer and use it in GitHub Desktop.
Question:
Anyone know of a way to append a thickbox query into the wp_list_pages href, without having to modify core templates?
The normal output:
/?page_id=85
With appended Thickbox query:
/?page_id=85?KeepThis=true&TB_iframe=true&height=400&width=600
Is there a simple custom function that can be written?
Answer:
Nevermind, spoke to soon and figured it out using the get_pages function:
<?php
$pages = get_pages('sort_column=menu_order&title_li=');
$count = 0;
foreach($pages as $page) {
?>
<li><a class="thickbox" href="<?php echo get_page_link($page->ID) ?>?KeepThis=true&TB_iframe=true&height=400&width=600"><?php echo $page->post_title ?></a></li>
<?php } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment