Jump to content


Photo
Pockets

pockets - change slug after creating pocket posts



Best Answer beardedavenger , 09 April 2013 - 07:16 PM

It doesn't matter whether you capitalize it or not the code will turn it into lowercase. I just pushed a fix that I was having issue with wpengine anyways so that will probably help your case. Also, once you change the slug, resave permalinks and clear out your cache in wpe.

 

NIck

Go to the full post


  • Please log in to reply
16 replies to this topic

#1 adesouza

adesouza

    Advanced Member

  • Members
  • 51 posts
  • LocationSan Francisco
  • Country: Country Flag

Posted 09 April 2013 - 05:05 PM

Hi,

 

I setup pockets, including the slug, which I changed to be 'service' and 'services'. I then made a bunch of entries.

 

However, I now realize that I would like to change the slug, so I can use the archive page which is automagically generated -but I want a different address than mysite.com/services . But changing the slug in Pagelines->Page Options doesn't seem to do anything now.

 

Do I need to remove than re-install and re-enter all the posts?

 

thanks,

 

Alex



#2 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 09 April 2013 - 05:07 PM

It does change when you update them, this was heavily tested. If you have services as a plural, it will use services as the archive. 



#3 adesouza

adesouza

    Advanced Member

  • Members
  • 51 posts
  • LocationSan Francisco
  • Country: Country Flag

Posted 09 April 2013 - 05:23 PM

Thanks for the quick reply.

 

 

Still testing on my end, but from what I can tell, that slug is not changing for me. I see that I made the mistake of using a capital letter in the slug when I originally made it.  

 

so it's actually at mysite.com/Services

 

I changed both the singular and plural slugs to 

 

whatwedo

 

and 

 

whatwedoes

 

and I get a 404 when I visit

 

mysite.com/whatwedoes

 

or

 

mysite.com/whatwedo

 

could that have to do with the capital letter? Or will it maybe take a few mins to make the change?

 

Gonna try clearing my cache also...

 

here's a link just in case....

 

 

http://distill.stagi...ne.com/Services

 

(this works fine)

 

 

http://distill.stagi....com/whatwedoes

 

(I get a 404)

 

thanks!



#4 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 09 April 2013 - 07:16 PM   Best Answer

It doesn't matter whether you capitalize it or not the code will turn it into lowercase. I just pushed a fix that I was having issue with wpengine anyways so that will probably help your case. Also, once you change the slug, resave permalinks and clear out your cache in wpe.

 

NIck



#5 adesouza

adesouza

    Advanced Member

  • Members
  • 51 posts
  • LocationSan Francisco
  • Country: Country Flag

Posted 09 April 2013 - 09:57 PM

Awsome! Thank you. 



#6 adesouza

adesouza

    Advanced Member

  • Members
  • 51 posts
  • LocationSan Francisco
  • Country: Country Flag

Posted 09 April 2013 - 10:30 PM

hmm, wasn't able to get it to change the slug, going to try removing and re-installing...



#7 adesouza

adesouza

    Advanced Member

  • Members
  • 51 posts
  • LocationSan Francisco
  • Country: Country Flag

Posted 09 April 2013 - 11:35 PM

So I removed the section, it was actually in /plugins/pagelines-sections/  and in /basetheme/sections/  I deactivated it using Evan's Section Switchboard plugin, then deleted the files from my ftp. I purged the cache on wpe also. I then downloaded the new version from the store, activated it, then moved it from  /plugins/pagelines-sections/ to /basetheme/sections/ 

 

but... it shows up in the dashboard as 'Services' -not 'Pockets'  

 

Also, the changes I previously made to the slug in pagelines->page options are shown in the slug fields. (they don't match what is shown on the dashboard, they say 'what-we-do' and 'what-we-does'  

 

I made a new 'Service' post (I had deleted the posts that it was using before)  The permalink shows up as mysite.com/Services/mypost

 

If i go to mysite.com/what-we-do or mysite.com/what-we-does i get a 404.

 

So... Should I have saved permalinks again when I removed the section?

 

Or.. is there another way to more completely remove the section and do a fresh install.  Like.. so it would show up as 'Pockets' again and I can start from scratch? :)

 

Thanks for your advice!

 

A

 

 

 

 

That confused me because I figured when I removed the section, I am removing all the changes it makes. Could it 



#8 adesouza

adesouza

    Advanced Member

  • Members
  • 51 posts
  • LocationSan Francisco
  • Country: Country Flag

Posted 09 April 2013 - 11:47 PM

oops...  random bits of my post left at the bottom :-]



#9 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 10 April 2013 - 12:10 AM

If you remove the slugs that you set it will reset to Pockets. Try resaving the permalinks to flush that part out after changing them.



#10 adesouza

adesouza

    Advanced Member

  • Members
  • 51 posts
  • LocationSan Francisco
  • Country: Country Flag

Posted 10 April 2013 - 12:26 AM

Okay, tried that, when I delete the text that was in there, the 'default text' that is show greyed out in the input box says 'Services'  tried saving permalinks and purging wpe cache. No dice.

 

Now looking into the DB to remove pockets from the taxonomy... bad idea?



#11 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 10 April 2013 - 12:47 AM

If you have greyed out text it means you have it set under Page Options.



#12 adesouza

adesouza

    Advanced Member

  • Members
  • 51 posts
  • LocationSan Francisco
  • Country: Country Flag

Posted 10 April 2013 - 08:54 PM

So still working on this.

 

Would the Slug be saved in a pagelines settings .dat file?



#13 adesouza

adesouza

    Advanced Member

  • Members
  • 51 posts
  • LocationSan Francisco
  • Country: Country Flag

Posted 10 April 2013 - 08:55 PM

Also, when I install via the store its now being installed in wpcontent/plugins

 

and thus, doesn't show up in the dashboard until moved into the appropriate folder for sections... is that normal?



#14 adesouza

adesouza

    Advanced Member

  • Members
  • 51 posts
  • LocationSan Francisco
  • Country: Country Flag

Posted 10 April 2013 - 09:13 PM

Ok... got it finally!

 

when I started a completely new wp install on wpengine, imported wordpress content via .xml export file and imported pagelines settings .dat  

 

then installed pockets via store moved from wp-content/plugins/pockets to /themes/basetheme/sections/pockets

 

It still showed up with 'Services' in the dashboard menu item, and as the default entry in the site defaults slug options.

 

Following your instructions, I deleted the two slugs from the the input boxes, saved options, cleared cache in wpengine and resaved permalinks, and voila! Name changed back to pockets.

 

 

thanks again for your help!



#15 adesouza

adesouza

    Advanced Member

  • Members
  • 51 posts
  • LocationSan Francisco
  • Country: Country Flag

Posted 10 April 2013 - 09:17 PM

oh.. yeah. It's definitely coming from the .dat file...



#16 adesouza

adesouza

    Advanced Member

  • Members
  • 51 posts
  • LocationSan Francisco
  • Country: Country Flag

Posted 10 April 2013 - 10:00 PM

Also worth noting for anybody else who wants to do this.. there are 2 places you need to change the slug. In Page Options->Site Defaults  and Page Options->Pockets Archive



#17 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 10 April 2013 - 10:05 PM

You do not have to change it in two places. Only change it under Page Options-->Site Defaults. If you change it under Page Options-->Archive, its only affecting the archive.







Also tagged with one or more of these keywords: Pockets