Skip Navigation

[Resolved] Search page displays results on top of footer

This support ticket is created 6 years, 11 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 4 replies, has 2 voices.

Last updated by Nigel 6 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#510009
toolset-search-results-on-top-of-footer.png

Following on from a similar thread, I have discovered that the search results are being shown on top of the footer.

It looks like there is some inline CSS that makes the containing DIV have a height of 0, however I can't work out where this is set.

I would appreciate some assistance in finding a solution.

#510180

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Nic

Thanks for posting this as a separate issue.

From your screenshot the images are in the footer and are appearing on top of the text search results, is that right?

Because of the overlap with the other issue I would like to go ahead and take a snapshot of your site for testing locally if that's okay.

I will mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site, even though I don't intend to make any changes other than to temporarily add a backup plugin to take a snapshot of the site.

Can you also confirm the url of where I can see the problem.

#510711

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Nic

It seems we have a compatibility issue with the theme, and I'm escalating this thread so it can be investigated further by our compatibility team.

Your theme uses a masonry layout on the search archive page (using the isotope library) and when the page has loaded it sets the container div height to zero, hence your footer moves up the page and overlaps the archive content. (If you disable JavaScript in the browser the page layout is as intended.)

In the other ticket—same problem, different theme—I'm able to solve the problem by disabling the grid layout on the archive page, but your theme settings state "Note that Archives content and Search results will always be rendered using masonry layout" and that is not possible.

I'll let you know if and when we are able to come up with a solution.

The only option I can see for you right now is to not use a custom archive for your search results, which means you lose control of what content is included in each post summary, but the page layout will at least look normal.

#514343

Hi Nigel,

Just a quick note to ask if there is an update to this?

Sadly the masonry layout isn't going to work for me in this situation. The reason is that a lot of the search results don't have any featured images attached and the masonry theme layout shows a large thumbnail of the featured image. Therefore I get a page of "image not available"/default images which looks terrible.

I would have thought that there would be a way to override the themes search results page. Especially with the power of Toolset.

I look forward to hearing from you and the 2nd tier team.

Cheers,

Nic.

#516941

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Nic

I had an update from the lead developer who dug deeper into this.

The problem is that your theme enforces using the masonry layout on the archive pages (it explicitly states this: "Note that Archives content and Search results will always be rendered using masonry layout."), so that both Views and your theme are competing to control the archives.

Let me quote the developer here directly:

The client has two options here, IMHO:

- Mimic the HTML structure that the theme native archives include, for our WordPress Archives output, and hope that this will bring the masonry grid to our generated output.
- Ask the theme author to provide a way to disable this masonry layout from specific archives.

If I am not wrong, there is already such a way. I saw a filter presscore_masonry_container_class which can be used to modify the classnames added to the container of a page, which if modified correctly might remove the ones that fire the masonry effect. I managed to deactivate this for the search results archives, like this:

add_filter( 'presscore_masonry_container_class', 'prefix_remove_masonry_from_search_archive' );

function prefix_remove_masonry_from_search_archive( $classnames ) {
    if ( is_search() ) {
        $to_delete = array( 'wf-container', 'iso-grid', 'iso-container' );
        $classnames = array_diff( $classnames, $to_delete );
    }
    return $classnames;
}

So, adding that code removes the classnames from the container used to trigger the masonry effects on search archives. (You would need to edit the above if you wanted to include the same on other archives.)

Can you try adding that code snippet (to your theme's functions.php file or using a plugin such as Code Snippets) and see if that resolves the problem?

Let me know how you get on.

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