For those who want to delete or rename "LISTCAT" and "listing" slugs

Discussion in 'GeoCraft WordPress Theme' started by aliounn, Aug 6, 2013.

Thread Status:
Not open for further replies.
  1. aliounn

    aliounn Member

    Joined:
    Dec 7, 2012
    Messages:
    136
    Likes Received:
    6
    hello all,

    Here are some things that worked for me, hoping that it will be useful for you too.

    1 - Rename "listcat" and "listing" from your URLs, you can do these:
    go to / library / controls / custom_post_type / and open listing_type.php file and modify as shown in the attached images. Don't forget do re-save your Permalinks from your wordpress dashboard to validate your news Permalinks.

    a- listing : line 31
    img1.png
    b- listcat : line 65
    img2.png
    2-Delete "listcat" and "listing" from your URLs, you can do these:

    a-to delete "listcat", use this plugin:http://wordpress.org/plugins/remove-taxonomy-base-slug/
    b-to delete "listing", use this plugin:http://wordpress.org/plugins/remove-slug-from-custom-post-type/

    You can also add these 2 lines in your .htaccess file to redirect your old permalinks to the news one , good to don't lose page rank.

    - if you rename slugs :
    RewriteRule ^listing/(.+)/$ your-new-slug/$1 [R=301,L]
    RewriteRule ^listcat/(.+)/$ your-new-slug/$1 [R=301,L]

    - if you delete slugs :
    RewriteRule ^listing/(.+)/$ /$1 [R=301,L]
    RewriteRule ^listcat/(.+)/$ /$1 [R=301,L]


    Tell us if it works for you or any particular things that you do about it.



     
    kentoliver likes this.
  2. azza

    azza Member

    Joined:
    Apr 29, 2013
    Messages:
    61
    Likes Received:
    7
    Thanks for this :) Does it work?
    Has anyone tried this?
     
  3. aliounn

    aliounn Member

    Joined:
    Dec 7, 2012
    Messages:
    136
    Likes Received:
    6
    Yes it works well for me.
     
  4. kentoliver

    kentoliver Active Member

    Joined:
    Jan 3, 2013
    Messages:
    238
    Likes Received:
    41
    hey aliounn any chance we can get a link to your site to see an example with it working?

    i am interested in implementing this. just wondering how long it took you, and if it is difficult
    thanks
     
  5. aliounn

    aliounn Member

    Joined:
    Dec 7, 2012
    Messages:
    136
    Likes Received:
    6
  6. kentoliver

    kentoliver Active Member

    Joined:
    Jan 3, 2013
    Messages:
    238
    Likes Received:
    41
    thanks again aliounn
     
  7. jsal2

    jsal2 Member

    Joined:
    Dec 23, 2012
    Messages:
    112
    Likes Received:
    7
    Thanks for this suggestion, aliounn. Just a note on our attempt to use recently.... we were able to change the first one for 'listing' on line 31, no problem. But when we tried to do the second one, line 65, when we refresh, the site won't load and we just get a white-screen-of-death, so we just took that one back out.
     
  8. hickman120

    hickman120 New Member

    Joined:
    Jul 6, 2013
    Messages:
    19
    Likes Received:
    0
    For future reference (and for Jsal2) - remember that line 65 should end with )) not just ) !

    Code from:
    "rewrite" => true )

    Code to:
    "rewrite" => array("slug" => "category_name"))

    If you end it with just ) you will get the white screen. Add the 2nd ) and it will fix it =)
     
  9. harish

    harish Member

    Joined:
    Nov 12, 2013
    Messages:
    33
    Likes Received:
    0
  10. kennypalmer

    kennypalmer New Member

    Joined:
    Feb 27, 2014
    Messages:
    25
    Likes Received:
    0
    Worked for me. Thank you so much for this!
     
  11. upangoo

    upangoo New Member

    Joined:
    Feb 25, 2015
    Messages:
    2
    Likes Received:
    0
    Hi, I Could rename de "listcat" from my url, but when I click in a category I always get an error page with no results:

    This is somewhat embarrassing, isn’t it?
    It seems we can’t find what you’re looking for. Perhaps searching, or one of the links below, can help.

    I have to change something else to solve the url?

    Thank you!
     
  12. priya

    priya Guest

    Hello,

    Greetings from InkThemes!

    I would like to inform that the above process will work only for the first time during the installation of the theme..

    If you already have a database and listing in that then to follow the above steps may lose your content as well.

    Thanks & Regards!
    Priyanka
    InkThemes.com
     
  13. upangoo

    upangoo New Member

    Joined:
    Feb 25, 2015
    Messages:
    2
    Likes Received:
    0
    Thanks for the info Priyanka
     
Thread Status:
Not open for further replies.

Share This Page