Skip Navigation

[Résolu] Post Archive template Views 2.1 changes how it displays

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
In the problem page, right hand column and nav does not get pushed below the left hand column.

<div class="section o-show">
    <div class="o1 box"></div>
    <div class="o2 box">
[wpv-layout-start]
    [wpv-items-found]     
        <div class="box middle"> blah..blah....

Solution:
it turns out the column div's should have been after [wpv-layout-start] to work correctly.

<div class="section o-show">
[wpv-layout-start]
    <div class="o1 box"></div>
    <div class="o2 box">
    [wpv-items-found]     
        <div class="box middle">  blah..blah....
This support ticket is created Il y a 7 années et 10 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 – 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 7 réponses, has 2 voix.

Last updated by Luo Yang Il y a 7 années et 9 mois.

Assisted by: Luo Yang.

Auteur
Publications
#409920

I've notified you guys about this problem of Views shortcode [wpv-layout-start]...[wpv-layout-end] outputting outputting an extra div that breaks archive templates before on version 1.11
https://toolset.com/forums/topic/post-archive-template-in-views-1-11-changes-how-it-displays/

and version 1.11.1
https://toolset.com/forums/topic/post-archive-template-views-1-11-1-and-wordpress-4-4-changes-how-it-displays/

and version 1.12
https://toolset.com/forums/topic/post-archive-template-views-1-12-changes-how-it-displays/

I have installed View 2.1 and the problem of not having an option to turn off the extra div tag is still there. I have your code work-around in place which is.

add_shortcode('hide-it', 'hide_it_func');
function hide_it_func(){
    return;
}

and then add to the archive view this.

[hide-it][wpv-layout-start][/hide-it]
...
[hide-it][wpv-layout-end][/hide-it]

So that part still works it's just that now with the latest updates the pagination buttons to see previous pages will not work.

Here's an example of the archive template displaying this problem that I use on a clients website. click on the brown arrow to try and navigate to the next archive page.

hidden link

When I take out the [hide-it] ... [/hide-it] tag's the pagination button works fine. But I need the hide it function so my right hand column and nav does not get pushed below the left hand column.

What can be done?

Thank you ahead of time for your help.
Ronald E

#409977

Dear Ronald,

The shortcodes [wpv-layout-start] and [wpv-layout-end] will output an extra HTML div tag, which is for Views pagination and AJAX feature, if you use [hide-it] shortcode to remove it, the Views ajax feature will not work.

In the latest version of Views 2.1, there is new features for wordpress archive, you can add filters, parameter search, and pagination into the wordpress archive, see our document:
https://toolset.com/documentation/user-guides/custom-pagination-wordpress-archives/

In your case, I suggest you do not use [hide-it] shortcode, use Views wordpress archive to format your archive page:
https://toolset.com/documentation/user-guides/normal-vs-archive-views/

If the problem "right hand column and nav does not get pushed below the left hand column" still exists, it must be a CSS problem, we can try use custom CSS codes to fix it, please let me know if you need more assistance for it.

#410184

Hi Luo,

I read through the links you provided. Thank you for that.

The problem pages are already setup as archive pages. Taxonomy Archives for Categories to be exact. It's a template I use on over 20 websites so it's fairly important to get it working right.

The content templates work as expected. You can see that at this link.
hidden link

I'll go with your offer of custom CSS to fix the archive page template. Please let me know the next steps.

Respectfully,
Ronald

#410280

Could you describe for the question:
right hand column and nav does not get pushed below the left hand column

I tested the problem URL with my chrome browser:
hidden link

But I can not see any difference if I remove the extra HTML div tag.
Please take a screenshot for how should the problem page display as you expected.

#410469
views-2-1-error.gif

The link you went to "all-posts" is a content template and works correctly.

Where the wheels fall off the cart is when I use an archive template.
hidden link

I've turned off the "Hide it" function. So the pagination nav works but the nav wraps to the bottom of page (see screenshot).

#410803
632.JPG
631.JPG

Thanks for the details, I checked the problem page, here is what I found:
See screenshot 631.JPG
The HTML div tag ".o3", ".o4" and ".o5" are wrapped into div tag ".o2", if I move them outside the div tag ".o2", see screenshot 632.JPG, then it wors as expected, there should be some broken HTML tag in your webpage, for example un-closed div tag, which will produce this problem. I suggest you locate the broken HTML div tag.

#411500

If the wife and I have another kid we are going to name him/her Luo. Thank you so much for your answer. I also apologize to the Toolset team for blaming them for my coding plight.

Turn's out I had this part wrong.

<div class="section o-show">
	<div class="o1 box"></div>
	<div class="o2 box">
[wpv-layout-start]
	[wpv-items-found]     
		<div class="box middle"> blah..blah....

it turns out the column div's should have been after [wpv-layout-start] to work correctly.

<div class="section o-show">
[wpv-layout-start]
	<div class="o1 box"></div>
	<div class="o2 box">
	[wpv-items-found]     
		<div class="box middle">  blah..blah....

Best regards,
Ronald E

#411915

You are welcome

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