Skip Navigation

[Resolved] One View for Various Pages

This support ticket is created 4 years, 4 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 55 replies, has 2 voices.

Last updated by Pete 4 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#1688483

Ok, I understand now.

Leave with me...I'll try this shortly.

#1688485

Ok I understand.

Leave with me and I'll go through this shortly.

#1688687

Hi there Minesh,

Ok just about done however have no idea what you mean ref:

To select the current location option within the location filter, I've added the following code to the following view's "Search and Pagination" section at top:
=> hidden link

<script>
var clocation = '[wpv-post-taxonomy type="location" format="slug"]';
</script>

Where does this bit of code need to go please?

#1688721

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

You can add it to your View's "Output Editor" as shown with the following screenshot:
=> hidden link

#1688729
aa 1.png

Hi again,

Yep found it and was updating my last message when you messaged. Didn't release it was in the Output Editor. Added.

Ok, I must be missing something, I have copied over everything from the View, added the custom code and set the Taxonomies.

On this page: hidden link

And it's not working. I can't see anything I have missed?

#1688739

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Have you added the code I shared to the "Custom Code" section?
=> https://toolset.com/forums/topic/one-view-for-various-pages/page/2/#post-1686389

Also, you need to select both "Area" and "Location" on your page. The code added with above link work accordingly.

#1688757
2 added.png
Pl z see.png

Yep added Custom Code just as you have...

Ok, added Area and Location...still nothing?

Location is showing in filter though.

#1688789

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please share problem URL and access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1688801

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please check now: hidden link

The issue was - you did not change the View ID within the custom code section - I've changed view_id to 32068 :

if($view_id == 32068 and !wp_doing_ajax()) {

Can you please confirm now it works, it was a really hard issue and finally I'm happy that its working on your production site as well.

#1688803

Ahhh right I didn't know that...now I know thank you.

Only thing, and I did notice this earlier when it wasn't right, the pagination and auto scroll to top isn't working. Is this a conflict or something else?

I've updated the page so more show and pagination.

#1688811

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Sorry - I can see the pagination on this page: hidden link

Am I missing something?

#1688813

Hmmm

Well if you hard refresh I have changed the location to Wells-next-the-Sea...this has far more properties and pagination.

You should see.

If not then change location in filter to Wells-next-the-Sea and pagination will kick in.

#1688819

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

When you say pagination is not working? What exactly not working?

I'm on the following page and I can see the pagination buttons at the bottom of the page:
=> hidden link

However - before this ticket before a story, May I kindly ask you to open a new ticket with your every new question you may have. This will help other users searching on the forum as well as help us to write correct problem resolution summery.

#1688821

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

When you say pagination is not working? What exactly not working?

I'm on the following page and I can see the pagination buttons at the bottom of the page:
=> hidden link

However - before this ticket before a story, May I kindly ask you to open a new ticket with your every new question you may have. This will help other users searching on the forum as well as help us to write correct problem resolution summery.

#1688825

The issue is Minesh, you've solved on issue but this has created another.

The view we are using is a duplication of this one: hidden link
Pagination works and it scrolls to the top.

All your code is stopping this working at all.