html sitemap via recursive function

The “memory exhausted” error in question happened because of this part in your function: ‘parent’ => $next_page -> post_parent, which should actually be ‘parent’ => $next_page -> ID (or I’d omit the unnecessary spaces, i.e. I’d use ‘parent’ => $next_page->ID). And the error can be illustrated like so: $cur_page = get_post( 123 ); // assume … Read more

WordPress sitemap with Custom Post Types

Here is a quick crack at it, which should work in two level depth: <h2 id=”posts”>My Post Type</h2> <ul> <?php $not_in = array(); //to avoid naming the same post over and over //get top level terms $Parent_terms = get_terms( ‘my_taxonomy’, array(‘orderby’ => ‘name’,’parent’ => 0)); foreach ($Parent_terms as $term) { echo “<li><h3>”.$term->name.”</h3>”; echo “<ul>”; //get … Read more

Unlimited Page Sitemap Link

You are most probably exceeding the maximum execution time when trying to retrieve 7000 posts/products, or specifically more than 2000 posts/products. To be quite honest with you, 7000 posts/products (or even just a list of posts/products) all packed in one single page is not only going to drive you crazy, but anyone visiting your site. … Read more

Password protected sites

The easier way can be have a group of users called teachers and give just the teacher’s group the permission to visit the page. There are many plugins for permission handling and grouping users so you’ll just need to search WordPress plugin repository. Just an example: groups plugin Another possible answer can be : multi … Read more