Skip Navigation

[Resolved] Archive bug when reload paginated page

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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by Luo Yang 1 year, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#2506093
url3.jpg
url2.jpg
url1.jpg

Hi, I've the CPT SIghts and few taxonomies like 'destination'. This is the archive page for taxonomies:

/destination/causeway-coast/

It works fine. It has a loop of sights with pagnation, it has search filters (some of them are display:none because I'm using the same archive for all the taxonomies but I display different filters on each page), it has a map fed by a view that loops all the sights of the current taxonomy term and it has a gallery fed by a custom term field.

Pagination works fine, but if I reload the paginated URL, the map and the gallery disappears. For example this url won't show you the map and the gallery:

/destination/causeway-coast/page/4/?wpv-destination=causeway-coast&wpv_view_count=412

But If I remove the params, it works fine:

/destination/causeway-coast/page/4/

Another thing I noticed is that if I reload the paginated URL with params, the Toolset menu lose the assigned custom archive. I attach 3 images: in the first you see the correct archive; in the second I miss the archive after reload; in the third I get again the correct archive when I remove params and reload.

Any idea?

cheers

#2506545

Hello,

It is not recommended to use normal post view in the WordPress archive page, in your case, you can fixed it by displaying the post view shortcode in WordPress Archive directly without content template.

For example:
Edit the WordPress archive
hidden link
in section "Output Editor", line 11, display the post view shortcode directly:
[wpv-view name="sights-map-markers-archive"]

Test it in frontend:
hidden link

I can see the Google map, please check if it is fixed, thanks

#2506647
image2.jpg
image1.jpg

Hi Luo, thanks for the support. The issue is not fixed because the map is not filtered correctly by the archive term.

If you load this:

hidden link

you get a map with all the sights (see image 1).

If you load this:

hidden link

you get the correct sights, filtered by the current archive term (see image 2).

I also still miss the archive link in the Toolset top menu when I reload the URL with params. I still think there is a bug.

cheers
Umberto

#2507911

Please elaborate the question with more details?
Are you going to do this:
In below URL
hidden link
Display all map markers same as
hidden link

I have done below modification in your website, edit the post view "Sights - Map markers Archive":
hidden link
change the filter to:
Destinations the same as the page where this View is shown

Please test again, check if it is fixed.
As I mentioned above, it is not recommended to use normal post view in WordPress Archive page.

#2508111

Thank you Luo, now the map works fine.

I could also rebuild the gallery, but I had the problem that the <img> tag was not redered with this shortcode:

[types termmeta='taxonomy-gallery' title='%%TITLE%%' alt='%%ALT%%' size='full' index='0'][/types] 

But I found that the image URL was correctly rendered in this way:

[types termmeta='taxonomy-gallery' size='full' index='0' url='true'][/types]

So I built the <img> tag by myself in this way (I've to add a custom shortcode to get the image ALT):

<img src="[types termmeta='taxonomy-gallery' size='full' index='0' url='true'][/types]" alt="[img-alt img_url='[types termmeta='taxonomy-gallery' size='full' index='0' url='true'][/types]']">

I still have an issue, I've a custom term field where I store a Google Ads snippet, it is still not rendered when I reload the page with params. But it appers correcly without params. This is my code in the Output Editor (line 26):

  <div class="div-ads">
    <div class="div-ads-title">Advertisement</div>
    [types termmeta='advertising-code'][/types]
  </div>

cheers

New threads created by Luo Yang and linked to this one are listed below:

https://toolset.com/forums/topic/google-ads-snippet-is-not-rendered-when-i-reload-the-page-with-params/

#2509399

I assume the original issue of this thread is resolved, for the other new issues, please check the new ticket here:
https://toolset.com/forums/topic/google-ads-snippet-is-not-rendered-when-i-reload-the-page-with-params/