Skip Navigation

[Gelöst] URL for custom post type blog

This support ticket is created vor 3 Jahren, 8 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Dieses Thema enthält 11 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von leilaG vor 3 Jahren, 7 Monaten.

Assistiert von: Shane.

Author
Artikel
#2007247

Main blog page: versteckter Link (Toolset custom post type)

We would like to change the URL to versteckter Link (without the 's')
When we do this it shows a Archive listed page of blogs.

Is there a way we can remove the s and still show the current page layout/format? versteckter Link

FYI: We use the default wordpress blog for our news sections versteckter Link

#2007753

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Leila,

Thank you for getting in touch.

Given that this is a custom post type created in types then you are able to change the slug from Blogs to Blog,

If you go to Toolset -> Post Types, edit the blog post type and change the slug from Blogs to Blog.

Please let me know if this helps
Thanks,
Shane

#2014473

Hi, the slug is already 'Blog' in the Toolset -> Post Types setting.

It's the page slug that is 'blogs'

When change the page slug to 'blog' it shows a Archive listed page of blogs, and not the current formatted page.

#2014931

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Leila,

Would you mind allowing me to have admin access to the site so that I can have a look at this for you ?

I've enabled the private fields for your next response.

Thanks,
Shane

#2016453

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Leila,

The issue is being caused by this page below.
versteckter Link

As you can see it has the same slug of Blogs, which is why you aren't able to access the archive page for your blog. Is this page going to be used to display your blog listing ? If so then you can't have the slug for the page and the custom post type being the same as wordpress won't know if you want the blog page or the blog archive.

Thanks,
Shane

#2018099

Hi Shane,

Yes this is our blog page versteckter Link that we want the URL to be just versteckter Link

So it is not possible?

#2018467

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Leila,

It is possible but because of how wordpress works the Blog post type and the Blog page can't have the same slugs.

This means you will need to change the blogs slug here to blog
versteckter Link

Then edit the post type slug to Blogs.
versteckter Link

Once you've done this then it should start working.

Thanks,
Shane

#2018503
blog-no-items-found.png

Hi,

I followed the instructions, but it showed 'No not found' image attached.

Thanks

#2018561

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Leila,

This should now be working.

The issue with the no results found was spawned from the view not having the Blogs post type selected.

I went ahead and re-selected this and the page is now showing the posts.

Please let me know if everything is ok now.

Thanks,
Shane

#2018595

Great thanks!

But now the individual pages are showing blogs versteckter Link

Did you mean, we can not have both the main page and the individual page as 'blog' that they cannot be the same?

#2018629

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Leila,

But now the individual pages are showing blogs versteckter Link

Did you mean, we can not have both the main page and the individual page as 'blog' that they cannot be the same?

That is correct. The reason is because you are using a dedicated page for the blogs listing rather than using the default blog archive page.

In order to truly only have Blog as the slug, you will need to remove this page
versteckter Link

Then create a custom archive for the blog versteckter Link

That is if you want to customize how the default blog archive page will look.

As explained earlier it is not possible to set the Post type slug and a dedicated page slug as the same slugs because wordpress won't know which page is which. Because the archive and the page will have the same base slug.

Please let me know if this clears up the issue for you.

Thanks,
Shane

#2019205

Understood, thanks for the explanation and details on how to make it work.