your syntax is wrong change the single quotation mark to a double quotation mark and remove the semicolom
on this line:
if (($uri == '/category/$yourcat->slug;') {
it should become:
if (($uri == "/category/$yourcat->slug") {
Related Posts:
- How do I get the category URL from get_the_category?
- How do I use the same post slug for different Categories?
- Rewrite rule page url with category
- Create terms when registering taxonomy?
- How to create non-unique sub-category slugs?
- Rewrite category slug
- Using same slug name for a page and category
- Add category to custom post type automatically, using category slug
- I use same slug name for category and page
- Divi change project slug based on category
- Removing the number in a category slug
- Add custom taxonomy terms to WordPress menu dynamically & append #slug to url
- Plural Category Base Slug On Category Archive Page
- Return category slug / title from category ID
- Duplicate Category and Page URL loads Category instead of the Page
- 403 forbidden on one page only
- Get the name an the description of a link category
- Using a portfolio_category slug in wordpress URL
- Categories vs. Page Site Organization
- WooCommerce duplicate sub categories and product slugs
- Need to pull parent category and slug – only pulling daughter category
- Pagination for category slug returns 404 when page >= 2
- Displaying a full post instead of a slug per category?
- wordpress sub-category ( lowercase letters + non-latin characters ) = 404
- The default code for “posts_nav_link” on category.php isn’t working
- Mod_Rewrite to show only last subcategory in URL
- Get posts from specific taxonomy term
- how to get full category path including parent and subcategories
- Automatically redirect a page to a category that share the same slug
- Use the category name instead of category slug in permalinks
- How do I add a tag slug to a category URL to filter posts?
- Change of category structure will cause two kinds of URLs for one post
- Change slug of Standard wp Post category
- How to remove the category from post slug
- Ordering categories by slug vs. name
- Echo Category Nicename
- pagination 404 error, same slug home and categories
- Different post slug based on archive
- A different permalink structure for different categories
- OK to redirect the root WordPress category slug?
- How Can I Use Equal And Question Mark In Category Slug?
- How to remove category name for only one category?
- How to prevent WordPress from redirecting single page to prefixed category archive with same name?
- Include a page’s “category” in its URL
- Using the slug of a custom post category as prefix for the underlying custom post slugs
- Change the full slug for a specific category?
- Get category from slug list
- How to auto update post title and slug with category name when post status is updated
- Hide category name using mod_rewrite
- Show only one of the categories of a post in the breadcrumb?
- hierarchical taxonomy in permalinks? using same slug
- woocommerce – products by category slug? [closed]
- Category slug in in loop always the same?
- How can I get rid of the the category suffix–NOT “prefix” (i.e. foo-1, foo-2, etc)
- How to get category slug link? ( include parent categories)
- How to add custom prefix before category base for category page URL?
- How to display non-hierarchical taxonomy as terms with checkboxes?
- Make parent categories not selectable
- How to Override default update_count_callback for category
- Let visitors post comments on category page
- category_description() shows raw html after version 3.x?
- Make parent category not selectable when it has child categories
- How is the single category page called and how does it know which posts to show?
- How to export/import categories and keep their IDs?
- Is it possible to select and edit the way the most recent post from a certain category is displayed on the page?
- How to make a Thumbnails Mosaic
- Extract image url associated to a category
- How do you categorize pages?
- List Sub-Categories of a Parent Category
- Order of subcategories
- “Categories” for six authors [closed]
- Category control subcategories
- display posts from specific category on a page , in thematic child theme?
- Categorie parents and childs displayed
- Display random categories
- Link To Child Category For A Post
- How can i change what one category displays?
- How do I change the category permalink structure?
- How to remove the tilte “category:category name”?
- How to display post in custom file not in archive file?
- why category__and and category__in wont work togather?
- Setting the Primary Category for a Post Based on Context
- Show the number of the post
- Allow Custom Role to edit a custom post type category
- How to prevent tag “iframe” from being deleted from the heading description of rubric?
- How can I make a category function as a page?
- How to add custom option to wp_dropdown_categories?
- Create duplicate category page with content variations
- Renaming default category taxonomy?
- Profiling user with categories
- Category names dependent on each other?
- Hide category name in URL
- Backend – Categories and Menus conflicts
- Highlight posts that belong to current sub category
- How to add an empty entry to masonry?
- How to display many photo albums related to category
- Modify functions.php to add a term ‘uses-theme’ set to theme name on post save
- Create custom Perma link
- Add product category to post_class
- Moving Blog and Changing URL