How to set the "Slug" of my post to be the "Category" name!

Discussion in 'Black Hat SEO' started by methos, Nov 27, 2016.

  1. methos

    methos BANNED BANNED

    Joined:
    Jul 18, 2013
    Messages:
    1,395
    Likes Received:
    155
    Hi,

    Normally when i create a post in my website it appears like this in google :

    http://www.mywebsite.com/My-Post-Name

    example : https://gyazo.com/1e6356a9f5f10dc692e018e22b0fd89b


    But i want it to appears like this :

    http://www.mywebsite.com > "Category"

    Example : https://gyazo.com/bd1d0baff71d0be38d5403a79c61fe5c

    Note: Both my site and the other website are wordpress !
    2nd note: when you open my post and the other website post both of the are :http://www.website.com/the-name-of-the post

    But i want to appear in google like the 2nd screenshot !

    Any idea about that ?

    Thanks
     
    Last edited: Nov 27, 2016
  2. MikeyMikey13

    MikeyMikey13 Elite Member

    Joined:
    May 25, 2014
    Messages:
    2,107
    Likes Received:
    778
    Location:
    Walford
    It may sound stupid, but have you selected to add it under that cat?

    Also, I make my cat's into pages by adding this to functions:

    function wpa_alter_cat_links( $termlink, $term, $taxonomy ){
    if( 'category' != $taxonomy ) return $termlink;

    return str_replace( '/category', '', $termlink );
    }
    add_filter( 'term_link', 'wpa_alter_cat_links', 10, 3 );
    endif;

    After that, whenever I add a new post, it always comes under domain.com/cat/post-name
     
  3. MikeyMikey13

    MikeyMikey13 Elite Member

    Joined:
    May 25, 2014
    Messages:
    2,107
    Likes Received:
    778
    Location:
    Walford
    Also check your perma links!
     
  4. methos

    methos BANNED BANNED

    Joined:
    Jul 18, 2013
    Messages:
    1,395
    Likes Received:
    155

    Thank you, But as i said i only want it to appears in google like that : domain.com > "category Name" ! What you showed it might get set up from permalinks!

    Regards
     
  5. mickyfu

    mickyfu Jr. VIP Jr. VIP

    Joined:
    Dec 14, 2011
    Messages:
    8,324
    Likes Received:
    23,623
    Occupation:
    King Of Crypto C
    Location:
    Solihull Young Offenders
    Perma links custom structure /%category%/%postname%/
     
  6. methos

    methos BANNED BANNED

    Joined:
    Jul 18, 2013
    Messages:
    1,395
    Likes Received:
    155
    Thanks but still not what i want, as i said in Note #2 , The normal weblink will be like that : domain.com/post-name ! but it's all about google ! I want it to appears in google like the 2nd screenshot !
     
  7. mickyfu

    mickyfu Jr. VIP Jr. VIP

    Joined:
    Dec 14, 2011
    Messages:
    8,324
    Likes Received:
    23,623
    Occupation:
    King Of Crypto C
    Location:
    Solihull Young Offenders
    Do you mean so it has > in it instead of /
     
  8. methos

    methos BANNED BANNED

    Joined:
    Jul 18, 2013
    Messages:
    1,395
    Likes Received:
    155
    Yes but also after > I need google to show the "category name" (not the "post name" ) !

    thanks again
     
  9. MikeyMikey13

    MikeyMikey13 Elite Member

    Joined:
    May 25, 2014
    Messages:
    2,107
    Likes Received:
    778
    Location:
    Walford
    When the text for the post name goes over a certain character count it usually shows the category rather then post name for my sites.