cwmuller
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Hacks
In reply to: Sort get_pages by custom fieldNever mind, I figured it out. The default number of posts turned out to be five, so it was just a matter of adding.
'numberposts'
Forum: Hacks
In reply to: Sort get_pages by custom fieldThis is the page: https://www.bergen-filmklubb.no/2012-host/
Forum: Hacks
In reply to: Sort get_pages by custom fieldI’ve been experimenting with that, but since I am very inexperienced with this stuff it’s all about trial and error. I think I ‘m on to something now though. I ran this with and without specifying ‘ascending’ sort order, and I get entries sorted from the beginning and end of the list, but I only get 5 entries, which I don’t get at all. Any suggestions?
<?php $args = array( 'child_of=' . $post->ID , 'meta_key' => 'dato', 'orderby' => 'meta_value', 'post_type' => 'page', 'order' => 'ASC', ); $children = get_posts($args); if (!empty($children)) { foreach($children as $child) { $tittel = get_the_title($child->ID); $dato = get_post_meta($child->ID, 'dato', true); $regiss?r= get_post_meta($child->ID, 'regiss?r', true); $nasjonalitet= get_post_meta($child->ID, 'nasjonalitet', true); $produksjons?r= get_post_meta($child->ID, 'produksjons?r', true); $klokkeslett= get_post_meta($child->ID, 'klokkeslett', true); $url= get_permalink($child->ID); echo '<p><strong>' . strtoupper(date("l, j. F", strtotime($dato))) . ', KL. ' . $klokkeslett . '</strong><br>'; echo '<a href="' . $url . '">' . strtoupper($tittel) . '</a>'; if (!empty($regiss?r)) { echo ' – ' . $regiss?r . ', ' . $nasjonalitet . ', ' . $produksjons?r . '</p>';} } } ?>
Forum: Fixing WordPress
In reply to: Missing icons in admin barLike I mentioned in the post earlier, I already have cleared the browser cache. It didn’t help.
Viewing 4 replies - 1 through 4 (of 4 total)