Skip Navigation

[Résolu] URL for custom post type blog

This support ticket is created Il y a 2 années et 12 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

This topic contains 11 réponses, has 2 voix.

Last updated by leilaG Il y a 2 années et 11 mois.

Assisted by: Shane.

Auteur
Publications
#2007247

Main blog page: hidden link (Toolset custom post type)

We would like to change the URL to hidden 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? hidden link

FYI: We use the default wordpress blog for our news sections hidden link

#2007753

Shane
Supporter

Languages: Anglais (English )

Timezone: 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

Languages: Anglais (English )

Timezone: 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

Languages: Anglais (English )

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

Hi Leila,

The issue is being caused by this page below.
hidden 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 hidden link that we want the URL to be just hidden link

So it is not possible?

#2018467

Shane
Supporter

Languages: Anglais (English )

Timezone: 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
hidden link

Then edit the post type slug to Blogs.
hidden 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

Languages: Anglais (English )

Timezone: 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 hidden 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

Languages: Anglais (English )

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

Hi Leila,

But now the individual pages are showing blogs hidden 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
hidden link

Then create a custom archive for the blog hidden 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.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.