Add $more_link_text parameter to the_excerpt()

You can use get_post_type add_filter(‘excerpt_more’, ‘new_excerpt_more’); function new_excerpt_more($more) { global $post; $post_type = get_post_type($post); switch( $post_type ): case ‘event’: $teaser=”<a class=”moretag” href=””. get_permalink($post->ID) . ‘”> More events </a>’; break; case ‘post’: $teaser=”<a class=”moretag” href=””. get_permalink($post->ID) . ‘”> &hellip; </a>’; break; default $teaser=””; endswitch; return $teaser; }

Custom Post Type “Event” with custom permalink structure

Problem solved!!!! =) add_action(‘init’, ‘evento_add_rewrite_rules’); function evento_add_rewrite_rules( $wp_rewrite ){ // Add day archive (and pagination) add_rewrite_rule(“eventos/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/?([0-9]{1,})/?”,’index.php?post_type=evento&ano=$matches[1]&mes=$matches[2]&dia=$matches[3]&paged=$matches[4]’,’top’); add_rewrite_rule(“eventos/([0-9]{4})/([0-9]{2})/([0-9]{2})/?”,’index.php?post_type=evento&ano=$matches[1]&mes=$matches[2]&dia=$matches[3]’,’top’); // Add month archive (and pagination) add_rewrite_rule(“eventos/([0-9]{4})/([0-9]{2})/page/?([0-9]{1,})/?”,’index.php?post_type=evento&ano=$matches[1]&mes=$matches[2]&paged=$matches[3]’,’top’); add_rewrite_rule(“eventos/([0-9]{4})/([0-9]{2})/?”,’index.php?post_type=evento&ano=$matches[1]&mes=$matches[2]’,’top’); // Add year archive (and pagination) add_rewrite_rule(“eventos/([0-9]{4})/page/?([0-9]{1,})/?”,’index.php?post_type=evento&ano=$matches[1]&paged=$matches[2]’,’top’); add_rewrite_rule(“eventos/([0-9]{4})/?”,’index.php?post_type=evento&ano=$matches[1]’,’top’); }

Custom post type routing with hierarchy

When you declare the custom post type, there is a parameter “rewrite” where you declare the slug for the post type. Change the slug to “media/videos”, and then visit your Settings > Permalinks page to update your rewrite rules. register_post_type( ‘videos’, array(‘labels’ => array(), ‘rewrite’ => array( ‘slug’ => ‘media/videos’, ‘with_front’ => false ) ) … Read more

Include taxonomy slug in url?

This can be a bit challenging for WordPress, because it wouldn’t know whether you are referring to post, page or taxonomy. Nevertheless, rename your taxonomy to something like product_category and try changing the slug in your post type arguments to system/%product_category%, and slug in your taxonomy arguments to just system. WordPress should now handle /system/your-product-category/post-name/ … Read more