dashaluna
Forum Replies Created
-
Forum: Plugins
In reply to: post_type_link filter working but returns 404@jorgecosgayon, thanks for that. I’ve spent a day and a bit trying to figure out why I was getting 404 after adding a rewrite rule in my register_post_type … I just hit Save Changes button on the Perpalinks Settings screen and all works now.
Forum: Themes and Templates
In reply to: Incorrect content displayedOk, I found it in here http://codex.wordpress.org/Function_Reference/get_posts#Access_all_post_data
Seems that I’ve forgotten to set up post’s data with
setup_postdata($post);Forum: Fixing WordPress
In reply to: wp_get_attachment_image_src extract only relative pathFound similar topic here http://wordpress.org/support/topic/absolute-relative-path-for-images?replies=9
Forum: Hacks
In reply to: Ajax solution similar to WP Categories functioning in Admin area@mohammad Jangda, thanks a lot with the tips.
I think registering Tracks as a taxonomy isn’t ideal solution. I wanted “category management functionality” to be within a screen for a CD, to make it intuitive for a user.
I’ll have a look at the plugin 🙂
Thanks a lot!
Forum: Fixing WordPress
In reply to: Custom taxonomy and query_posts@pnd.simpson
Oh that’s cool – much crearer. Thanks for posting it 🙂
Forum: Fixing WordPress
In reply to: Custom taxonomy and query_postsHm… I think I’ve got mine working.
Sorry if it’s just stating the obvious, it wasn’t for me 🙁 Spent about 1 hour trying to figure out what I was doing wrong.
You should use a slug of taxonomy’s term (think slug of a category) as the value for registered taxonomy. I’ll reuse @hawken1 code for my example.
1) So you have your post type registered as “factory”.
2) Your taxonomy registered as “factorytype”:
$args = array( "hierarchical" => true, "label" => "Factory Types", "singular_label" => "Factory Type", //this is 'your_registered_taxonomy_name', here 'factorytype' "rewrite" => array("slug" => "factorytype") ); register_taxonomy("factoryType", array("factory"), $args);3) You added some taxonomies terms for your “factory” type (similar as you add categories to a post). So use the slug of your created taxonomy term, not name, not id, but SLUG.
Say I created a taxonomy term (think category) with the name “Small factory” and slug “small-factory” for the “factory” post type.So to get only factories of “Small factory” type, you’d use code as in @hawken1 example:
<?php $args=array( //'your_registered_taxonomy_name' => 'taxonomy_term_slug' 'factorytype' => 'small-factory', 'post_type' => 'factory', 'posts_per_page' => 10, 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { 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: Custom taxonomy and query_postsI have my taxonomy registered with the rewrite rule as you mentioned:
"rewrite" => array("slug" => "taxonomy_name")
but my query still doesn’t work. It returns 0 posts, even though I know there are some.Any one had problems with that and know to to solve it?
Thanks
Hey,
I’m using proper pagination plugin as well. However, I have to have query_posts(). Had you any luck getting the plugin to work with it?
Thanks 🙂
Forum: Themes and Templates
In reply to: Add wysiwyg to meta box?Hi Dave,
Any luck with that? I’m looking how to do the same. Let me know.
Thanks.
I just had the same error. @titoburritotaco Thanks for asking and @james (MacManX) for the link.
In my case I had an empty line before my <?php opening tag in the functions.phpForum: Themes and Templates
In reply to: get_bloginfo() second parameter, $filter ???@spencerfinnell thanks for the reference, I had a look at the function. As far as I understand the
$filtercan only be of 2 values:'raw'(the default) and'display'.When the
'display'filter is supplied does it mean that either"bloginfo_url"or"bloginfo"functions will be called with$outputand$show params? If so, then, for example, thebloginfo()simply echos the$showparam:function bloginfo( $show='' ) { echo get_bloginfo( $show, 'display' ); }So, I’m still pretty much confused how the
'display'filter affects what theget_bloginfo()returns 🙁Sorry for being so slow, but I am genuenly confused. Would appreciate some help with it 🙂
Thanks
DashaForum: Themes and Templates
In reply to: get_bloginfo() second parameter, $filter ???Hello I’m a newbie to WP as well. Just started to poke around 2010.
Would be good if anyone will let us (all newbies) know what that ‘display’ param does? As @arteedecco said there aren’t much in the docs.
Thanks 🙂