Search
 
SCRIPT & CODE EXAMPLE
 

CSS

add custom taxonomy into permalinks post_type_link

function wpa_course_post_link( $post_link, $id = 0 ){
    $post = get_post($id);  
    if ( is_object( $post ) ){
        $terms = wp_get_object_terms( $post->ID, 'course' );
        if( $terms ){
            return str_replace( '%course%' , $terms[0]->slug , $post_link );
        }
    }
    return $post_link;  
}
add_filter( 'post_type_link', 'wpa_course_post_link', 1, 3 );
Comment

add custom taxonomy into permalinks post_type_link

'rewrite' => array('slug' => 'courses/%course%')
Comment

PREVIOUS NEXT
Code Example
Css :: css after before 
Css :: 404 page template css 
Css :: css color 
Css :: switch checkbox 
Css :: beautiful scrollbar css 
Css :: css bootstrap carousel fade how to add fade in up text 
Css :: button hover animation css codepen 
Css :: other children than first css 
Css :: mini.css 
Css :: free css templates 
Css :: transform translate-x ie11 
Css :: inline css not working table odoo 11 
Css :: text cow 
Css :: css button remove border 
Css :: center div with variable height 
Css :: apply style to only children not grandchildren 
Css :: css media not min-width 
Css :: Dropcap - :first-letter pseudo class not working as expected in firefox 
Css :: total income of labrada company in india 
Css :: weird box-shadow color input css 
Css :: lier class et css 
Css :: css kommentar 
Css :: linear gradient generator for all browsers without vendor extention 
Css :: You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser 
Css :: var units = "years"; var davidAge = 65; var johnAge = 40; var ageDifference = davidAge - johnAge; alert("The age difference is " + ageDifference + " " + units); 
Css :: ERROR in multi ./node_modules/ngx-toastr/toastr.css ./src/styles.scss 
Css :: how to use css print page break with float 
Css :: make font awesome spin but not the word on hover 
Css :: The basic - and minimal - structure of an email template looks like this: 
Css :: css animation cheat sheet 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =