Southbound
Member
Posted 10 months ago #
I'm adding a custom field to my pages and posts to be able to filter them based on which domain you're at (this is a multi-domain and multi-language site). I know how to get the domain name, but how do I use this variable with wp_list_pages() and the post loop?
richarduk
Member
Posted 10 months ago #
I'm no php expert, but this might get the ball rolling
<?php
$blah = get_post_meta($post->ID, "page-description", true);
if ($blah !=='')
{ wp_list_pages('title_li=')};
?>
where page-description is your custom field name
wp_list_pages is used outside the loop