seborgarsen
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Get parent pages in list and children in span for subnavigationInteresting, specifically I want this
https://www.sohtanaka.com/web-design/horizontal-sub-nav-with-css-jquery/
Forum: Fixing WordPress
In reply to: Get parent pages in list and children in span for subnavigationthe thing is I want the children to be in span like this:
<li> <a href="#">Link</a> <!--Subnav Starts Here--> <span> <a href="#">Subnav Link</a> | <a href="#">Subnav Link</a> | <a href="#">Subnav Link</a> </span> <!--Subnav Ends Here--> </li>
Forum: Fixing WordPress
In reply to: Get parent pages in list and children in span for subnavigationoops
<ul> and <li>
heheForum: Fixing WordPress
In reply to: Get parent pages in list and children in span for subnavigationI get the usual output
- and
-
I tried going through post-template but I am not sharp enough in php to see where wp_list_pages generates for children.
Forum: Fixing WordPress
In reply to: Get parent pages in list and children in span for subnavigationThanks,
I’ve read it and can’t seem to find the answer. And yes, the subpages are direct children of the main pages.
Also, how do we remove the autogenerated classeS?
All list items (li) generated by wp_list_pages() are marked with the class page_item. When wp_list_pages() is called while displaying a Page, the list item for that Page is given the additional class current_page_item.
ie.
<li class="page_item page-item-903">
which is ugly and superfluous for my use.Thanks for replying so fast.
Forum: Themes and Templates
In reply to: Sub Cats in Sub Nav via mouse hover on ParentAny Luck?
Forum: Plugins
In reply to: Custom Query sorting by type?Interesting. Can you help me with dropdowns that sort posts based on meta key values?
Forum: Plugins
In reply to: sort posts by custom field IN BACKENDVery smooth.
Anyone fancy a front-end version? Even one where admin can select which meta fields are shown?
Really interesting, thanks alot!!!
Forum: Fixing WordPress
In reply to: Display custom field(s) as a drop-downany luck?
Forum: Plugins
In reply to: Custom Field with Recent Postswhere
Vocal
andBackCatalog
are custom fields. Hope this helps.Forum: Plugins
In reply to: Custom Field with Recent Posts<h3>Latest Instrumentals:</h3> <ol> <?php $restriction1 = 'Vocal'; $restriction2 = 'BackCatalog'; $restriction3 = 'post_date'; $value1 = 'None'; $value2 = 'No'; $querystr = " SELECT * FROM $wpdb->posts LEFT JOIN $wpdb->postmeta AS $restriction1 ON( $wpdb->posts.ID = $restriction1.post_id AND $restriction1.meta_key = '$restriction1' ) LEFT JOIN $wpdb->postmeta AS $restriction2 ON( $wpdb->posts.ID = $restriction2.post_id AND $restriction2.meta_key = '$restriction2' ) WHERE $wpdb->posts.post_status = 'publish' AND $restriction1.meta_value = '$value1' AND $restriction2.meta_value = '$value2' LIMIT 10 "; $pageposts = $wpdb->get_results($querystr, OBJECT); if ($pageposts): foreach ($pageposts as $post): setup_postdata($post); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endforeach; endif; ?> </ol>
I mean.. the same one ??
$params=array( 'showposts'=>3, 'post_type' => 'post', 'post_status' => 'publish,pending', 'meta_key'=>'dataX', 'meta_value'=>'Y' ); $query = new WP_Query; $results = $query->query($params);
This just spits out 3 instances of Y…
What if I wanted to select on multiple metakeys?
this doesn’t work:
AND wpostmeta.meta_key = 'keyA' AND wpostmeta.meta_value = 'ValueA' AND wpostmeta.meta_key = 'KeyB' AND wpostmeta.meta_value = 'ValueB'
Any hints? Oh pretty please w sugar on top? ??
-