Jump to content

Search the Community

Showing results for tags 'taxonomy'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Found 4 results

  1. Hi, I have created a custom taxonomy for the location. Is there an easy way to get this taxonomy in the metabar? The action map is not showing an action hook for the metabar.
  2. Hi, I've created a custom taxonomy (for location) and I would like to have this taxonomy in my permalink. Now I have: %category%/%postname% and I would like to have %location%/%category%/%postname%. Via google I found this code: add_filter('post_link', 'location_permalink', 10, 3); add_filter('post_type_link', 'location_permalink', 10, 3); function location_permalink($permalink, $post_id, $leavename) { if (strpos($permalink, '%%location%') === FALSE) return $permalink; // Get post $post = get_post($post_id); if (!$post) return $permalink; // Get taxonomy terms $terms = wp_get_object_terms($post->ID, 'location'); if (!is_wp_error($terms) && !empty($terms) && is_object($terms[0])) $taxonomy_slug = $terms[0]->slug; else $taxonomy_slug = 'location'; return str_replace('%location%', $taxonomy_slug, $permalink); } It is working for posts. However, I get 404 errors on pages. Hence, there is some permalink conflict. Any suggestion to fix this?
  3. Hi //sorry for horrible english I have a Custom Post Type and written a Section to display the Post Loop. //works! Now i want to display my custom Taxonomy Archives at the same way. /how?
  4. Hi - custom taxonomies are important to me, but I can't seem to get them to work in PageLines Lite. I've installed and activated the Pagelines Customize plugin and have added this code to the functions.php file in the pagelines-customize folder: /** * Custom taxonomy for recipe ingredients * Following guidelines in Dig into Wordpress 3.3 p.35 * Also references code from: http://codex.wordpress.org/Taxonomies * */ function ingredients_init() { // create a new taxonomy register_taxonomy( 'ingredients', 'post', array( 'hierarchical' => false, 'label' => __( 'Ingredients'), 'query_var' => true, 'rewrite' => array( 'slug' => 'ingredient'), ) ); } add_action( 'init', 'ingredients_init' ); Normally when I use this code, when I open up the "Posts" menu item in the WP admin side bar I will get an additional menu item for each taxonomy I create under "Tags", so when using the above example I should get a menu item for "Ingredients" where are can add new terms, assign them to posts etc. Also any posts tagged with a term from one of these taxonomies (e.g. "eggs") should be listed when I use a url of the form: http://myblog/ingredient/eggs but I'm getting a 404 error instead. Are custom taxonomies not supported in Pagelines or do I need to set these up in a different way? If custom taxonomies are not supported, I'm not sure that Pagelines is going to work for me :-(
×