Skip Navigation

[Resolved] separate lines

This support ticket is created 4 years, 10 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 5 replies, has 2 voices.

Last updated by Beda 4 years, 10 months ago.

Assisted by: Beda.

Author
Posts
#1438015

here hidden link if you scroll down to HISTORICAL TRIAL RESULTS there is a judges heading , example

Miss A Hayes : NP Affix :
Awaiting Info

how can i make these 2 stay on the same line? the view "view show all events related to adog " is called from my theme template ,this then calls view-to-show-judges-from-an-event-child which is here hidden link

desired outcome is

Miss A Hayes : NP Affix : Awaiting Info

my thanks

#1439265

You are populating string with a View. This provokes the string to be on a new line because a View is (in the HTML it outputs) much more than a simple string.

If you inspect the code with the browser console, you'll see that after the opening strong tag, the HREF link with "Miss A Hayes" comes, followed by

: NP Affix :

But then, a whole View is input, hence, the entire HTML of the View is produced - you can see there is a DIV with ID wpv-view-layout-19872-CATTR41d1cb570a153bb279f11f7acb625af5TCPID15083 after above.

Hence, since that is not a simple string but a DIV it puts it on a new line.
You can avoid that by marking the "Disable the wrapping DIV around the View" checkbox just under the View's Loop Editor.
That will output only what you have in the loop HTML tags, nothing around it.

However, please consider that Views requires some of the HTML elements that now will be removed, for AJAX updates and pagination.
If you want to show the View inline with text, you can disable this DIV, but you will not be able to use some of the functionality that Views offer.

#1439909

can you specify in exactly what way it will stop functioning>? many thanks

#1443949

Everything that will be output within the loop will work, so generally, things like AJAX pagination, AJAX filters, and things that require unique ID's of the containers in HTML can fail.

You seem to output only a string according to a Query Filter, that should proceed working.

#1448359

i presume this wont work if i use <div></div> in the views loop? and do both views i want on same line need the check box ticked?
thanks

#1448401

If you related to HTML as it generally behaves, a DIV never will appear on the same line as another DIV

You need to check that box, then the DIV is removed and you can handle the View output like a "single string".