SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2013
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Custom Post Type Rewrite Rule

    My theme uses the following code which produces this slug:

    Code:
    'rewrite' => array('slug' => $this->safe_name . '-detail'),
    http://www.domain.com/estate-detail/4-bedroom-property-for-sale/

    I need to get rid of the 'estate-detail' part so I changed the rule to just:

    Code:
    'rewrite' => array('slug' => ' '),
    This produces the slug as:
    http://www.domain.com//4-bedroom-property-for-sale/

    How do i get rid of the double forward slash?

    many thanks
    Andy
    Last edited by Mittineague; Dec 10, 2013 at 22:58. Reason: OP forgot to turn off auto-link

  2. #2
    Barefoot on the Moon! silver trophy
    Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,516
    Mentioned
    51 Post(s)
    Tagged
    1 Thread(s)
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2013
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks that actually helps !


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •