Skip Navigation

[Resolved] Display two views in a row

This support ticket is created 6 years, 2 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 6 replies, has 2 voices.

Last updated by Minesh 6 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#617109
page_front-end.png
layout-view.png

Hi,

I created two view.
I created a layout where in a row a I want display the two view put side by side.
The layout show me the two views and their content, but when I use layout in a page the two views are not put side by side they are one below the other one.

May be my english is not so good as I would like.
I want to do this

VIEW 1 - VIEW 1 - VIEW 1 - VIEW 1VIEW 1 - VIEW 1 VIEW 2 - VIEW 2 - VIEW 2 -VIEW 2 -VIEW 2 -VIEW 2

but the result is

VIEW 1 - VIEW 1 - VIEW 1 - VIEW 1VIEW 1 - VIEW 1
VIEW 2 - VIEW 2 - VIEW 2 -VIEW 2 -VIEW 2 -VIEW 2

thanks
fulvio

#617282

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - if you want raw output of view, you need to add following code withing your current theme's functions.php file:

add_filter( 'wpv_filter_wpv_view_shortcode_output', 'prefix_naked_view_output', 5, 2 );
function prefix_naked_view_output( $out, $view_id ) {

    $views_to_target = array(9999,5555);   // replace with your own comma separated list of View IDs

    if ( in_array($view_id, $views_to_target)) { // add test for View ID
        $start = strpos( $out, '<!-- wpv-loop-start -->' );
        if  (   $start !== false
                && 
                strrpos( $out, '<!-- wpv-loop-end -->', $start ) !== false ) {
  
            $start = $start + strlen( '<!-- wpv-loop-start -->' );
            $out = substr( $out , $start );
            $end = strrpos( $out, '<!-- wpv-loop-end -->' );
            $out = substr( $out, 0, $end );
        }
    }
  
    return $out;
}

Could you please try to add above code to functions.php and replace original view id and try to resolve your issue.

#617373
page_created_for_two-view-result.png
page_created_for_two-view-text-view.png
page_created_for_two-view.png
layout-page-with-two-view.png
My_view.png

Hi,
I put your code into functions.php

add_filter( 'wpv_filter_wpv_view_shortcode_output', 'prefix_naked_view_output', 5, 2 );
function prefix_naked_view_output( $out, $view_id ) {

$views_to_target = array(687,931); // replace with your own comma separated list of View IDs

if ( in_array($view_id, $views_to_target)) { // add test for View ID
$start = strpos( $out, '<!-- wpv-loop-start -->' );
if ( $start !== false
&&
strrpos( $out, '<!-- wpv-loop-end -->', $start ) !== false ) {

$start = $start + strlen( '<!-- wpv-loop-start -->' );
$out = substr( $out , $start );
$end = strrpos( $out, '<!-- wpv-loop-end -->' );
$out = substr( $out, 0, $end );
}
}

return $out;
}

modify for my view (687,931)

but when I veiw page the result is the same as before , the two list are not in the same row.

I attach:
- list of mt panel control list view
- layout page from view page
- page created for two list
- layout page from page text (only to show the correct number of views)
- result

I wait for your instruction.

thanks
fulvio

#617548

Minesh
Supporter

Languages: English (English )

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

Well - could you please share exact image of your required output.

Also, could you please share problem URL?

*** 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 would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

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

#617595

Minesh
Supporter

Languages: English (English )

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

Could you please share problem URL as well.

#617608

Here is

hidden link

as you will can see the content is duplicate but not in line.

I specify you that the list are at the moment the same and are obtained from two distinct view that point to the same post.

fulvio

#617649

Minesh
Supporter

Languages: English (English )

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

Could you please check now, The issue was bootstrap not loaded.

I've set the following setting:
=> Toolset => Settings => General Tab => Bootstrap loading section => set option "Toolset should load Bootstrap 3.0"

And now I can see that the results showing in two columns:
=> hidden link

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