phejster
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Custom taxonomy and query_postsMichaelH, thanks for the code above, you saved me so much work.
One question, what if you had two taxonomies, ‘genre’ and ‘publisher’ for the post type ‘book’. I tried the following query, but it didn’t work:
<?php $args=array( 'genre' => 'mystery,random-house', 'post_type' => 'book', 'post_status' => 'publish', 'posts_per_page' => -1, 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { echo 'List of Books with genre of mystery'; while ($my_query->have_posts()) : $my_query->the_post(); ?> <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p> <?php endwhile; } wp_reset_query(); // Restore global post data stomped by the_post(). ?>
Forum: Fixing WordPress
In reply to: Filter Categories Based on Another CategoryMy PHP developer and I are working on this using non-core code. Anyone know if this can be done with core-code?
Forum: Fixing WordPress
In reply to: Filter Categories Based on Another CategoryDoes anyone know if this can be achieved?
Forum: Fixing WordPress
In reply to: Filter Categories Based on Another Categorywebgdawg, exactly.
When they use the drop down and select a country category, say Ethiopia, I want a filtered category archive of posts that are in the Ethiopia category AND the Volunteer Opp. category.
You’re correct that 63 is the Volunteer Opp. cat and 4 is the Country parent.
Thanks for the help, I’ve been pounding my head against the wall all day.
Forum: Fixing WordPress
In reply to: Filter Categories Based on Another CategoryOk, I’m not sure what happened. Maybe this never worked and it just seemed like it was but it’s not working now. I copied the above code exactly.
Esmi (or anyone), am I using get_posts wrong? If I include the foreach then I get three category dropdowns.
Forum: Fixing WordPress
In reply to: Filter Categories Based on Another CategoryThank you Esmi!
I was unfamiliar with the get_posts() function, and assumed it was deprecated function, replaced by query_posts. In case anyone else needs to do this, here is the code:
<?php global $post; $myposts = get_posts('category=63'); ?> <form action="<?php bloginfo('url'); ?>/" method="get"> <?php $select = wp_dropdown_categories('child_of=4&hide_empty=0&show_option_none=Select Country&echo=0'); $select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select); echo $select; ?> <noscript><input type="submit" value="View" /></noscript> </form>
Forum: Fixing WordPress
In reply to: Filter Categories Based on Another CategoryYea, I found that one, but it uses query_posts and not form fields / category dropdowns.
What I need is for the user to select a country from the category dropdown and displays posts that exist in that chosen category (country) and in the volunteer category.
Forum: Fixing WordPress
In reply to: Bigger columns?The width of the sidebar can be found on line 582 of your style.css. You can try changing that, but you may also need to change the widths of your header and footer as well.
Forum: Fixing WordPress
In reply to: New Users get role of “None”Just in case anyone has this problem my host looked into it and discovered that the wp_usermeta table was corrupt. They repaired it and the admin/roles are now functioning properly.
I’m not sure how the table got corrupted, but that’s the fix.
Forum: Fixing WordPress
In reply to: 2.7.1 Search Not WorkingI just did a google search on the &x=&y= and it appears that those show up when the search submit is a type=”image”.
However for anyone else who comes across this problem, I found a solution here – https://www.scriptygoddess.com/archives/2009/02/06/get_search_form-in-wordpress/
Forum: Fixing WordPress
In reply to: Dynamic Page-Specific SidebarsI had a thought last night while falling asleep. You could use JQuery to look at the URL and then load a file based on the second-level folder in that URL.
I might try that but I was wondering if there was a PHP or WP functions method of achieving the same thing – I hate adding additional includes if I can avoid it.
Thoughts?
Forum: Fixing WordPress
In reply to: display specific page content in sidebarThere is a plugin called “Improved Include Page” that does just what you need. You can put the call in the template files or in an page entry (to pull in other pages).
Forum: Alpha/Beta/RC
In reply to: 2.7 add new plugin FTP settingsIn setting up client sites using 2.7 the upload and install process works as I have come to expect from using the beta and RC’s of 2.7. What is new is the requirement of inputting the host/user/pw FTP settings.
Is there a way to hardcode these into the admin so the clients (that I trust) can add their own plugins?
Forum: Fixing WordPress
In reply to: Comments in page and Comment form in SidebarSince no one was able to offer advice or input I have come up with a solution:
Include the comments template in the sidebar AND the page template and use CSS to hide the form within the content and the comments in the sidebar. It’s not as elegant as I wanted, but it works.
If anyone can come with a better solution, please leave a comment.
Forum: Fixing WordPress
In reply to: How to Link to current page in Footer???That’s a very good question and one that I, unfortunately, do not know the answer to. Anyone else know?