New answers tagged

0

I can't comment yet, but I can answer - I think your problem may be that you've declared your $terms variable twice in your code, within your loop: <?php $terms = get_the_terms( $post->id, 'knowledgebase_types' ); ?> and <?php $terms = get_the_terms( $post->post_id, 'knowledgebase_topics' );?> Though some more information about what ...


2

WordPress runs slugs through its sanitize_title_with_dashes() filter function which replaces dots with dashes. Unfortunately the function doesn't give you any control over that or any ability to change what characters are stripped or replaced. What we can do however is remove that filter and add our own version of it with a couple of modifications: ...


1

Have a look at the documentation for the_terms(). It requires at least two parameters - the post ID, and the taxonomy name. You're not giving it either of these (I am of course assuming your taxonomy isn't called taxonomy-name). However, you're also using the wrong function for the situation. the_terms() is used to display (i.e. echo out) a list of terms, ...


0

I might be completely missing what you want here, but it sounds like you're saying you want the parent category's slug to echo out, rather than the parent category's human readable name. Rather than this: echo $parent->name; You just need this instead: echo $parent->slug; You can see a list of the properties here that are returned by the ...


0

There is no way this kind of functionality exist without some plugin/code to implement it and without doing actual rewrites. Wordpress core do not know what is a "stop word" and do not believe in multiple URL for the same content. If a theme was changed, this might have been a code in the theme that was responsible for such a functionality.



Top 50 recent answers are included