Skip Navigation

[Gelöst] Creating a view for Archives in a new theme

This support ticket is created vor 3 Jahre, 3 Monate. 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.

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

Zuletzt aktualisiert von AlimB3245 vor 3 Jahre, 2 Monate.

Author
Artikel
#1955465

Tell us what you are trying to do? I have recently updated my theme. The earlier theme's structured needed me to create a single-customPostName.php and archive-customPostName.php for each custom post and it was working fine.

In the new theme, it's using the default single.php for all custom templates and so far it's working fine. Do I need to still create a new single-XXX.php for each custom post?

However my Archives page is not looking that great as it's using the 'post type Archive' of the theme and I need to change this.. I did refer to the documentation link (https://toolset.com/documentation/customizing-sites-using-php/creating-templates-custom-post-type-archives/) but I couldn't do much as I was confused. There's no existing archive.php.. the theme uses as tempate-parts folder structure and there's only a content.php inside this folder.. there's no content-single.php or content-page.php.. I am sharing the zip file for the theme here ..

versteckter Link

Please do advise the best way forward for single custom posts and the archives for this theme.

versteckter Link
The above is the archives page and you can see that it's all messed up.. I need some desperate help asap..

Is there any documentation that you are following?
https://toolset.com/documentation/customizing-sites-using-php/creating-templates-custom-post-type-archives/

Is there a similar example that we can see?

What is the link to your site? versteckter Link

#1955689

When I change this in INSPECT ELEMENT it seem to become alright

wpv-view-wrapper

width: 100%

Hope this helps

Regards,
Alim

#1956023

I added this in the CUSTOM CSS for the contents view template

.wpv-view-wrapper{
width:100%;
}

and it seems to be working fine now.. but please do advise if this is a workaround or if it's the right solution.

Regards,
Alim

#1956477

Nigel
Supporter

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+01:00)

When I try to visit your article archive page it is not working properly, it keeps trying to reload every few seconds and looks entirely broken, so I can't really comment.

Try switching to twentytwentyone, does it look normal?

I took a look at the theme files you shared, and it seems the theme doesn't use an archive.php template, meaning that it falls back to using the index.php template when displaying archives.

There are various content template parts, I'm not sure how the theme determines which one is used, but I looked at the first one and see that it uses the_content() to output the post content, which means it should work okay with Toolset, but I can't say much more than that.

It's not possible to evaluate the article archive how it is behaving at the moment to offer any advice.

#1966587

Hi Nigel

I've managed to fix the issue.. the theme works fine with Toolset.. and it just required some CSS tweaking..

I've deleted most plugins that were not required and am on a cleanup drive to get my sites to normalcy..

I've had to disable WPML.. as the translations seem to be causing a few issues.. but I'll enable them after I've sorted the rest of the issues. for now things seem ok.. except for the Image Slider issue with Toolset Slider for which I've created a new ticket..

I'll close this ticket for now and create a new one later if something comes up

Regards,
Alim

#1966589

My issue is resolved now. Thank you!

Dieses Ticket ist jetzt geschlossen. Wenn Sie ein Toolset Kunde sind und Hilfe benötigen, eröffnen Sie bitte ein neues Support-Ticket.