Tell us what you are trying to do?
My listings were not at all responsive, so I did a little research and found that I had to enable bootstrap. Which I did. Bootstrap 4.
I use blocks not classic. I was working on editing the page, and then realized that the responsiveness was was working when I refresh the phone browser. However, it is erratic. Some situations will format with responsiveness, and other situations squeeze the 3 wide grids into skinny unreadable columns.
Is there some editing I can do within the block editor to make the results consistently responsive?
The page is at hidden link
{access details removed}
Please let me know when you have completed using this account login.
Hi,
Thank you for contacting us and I'd be happy to assist.
When using Blocks based views, Bootstrap is not needed and you can disable it from the settings.
( WP Admin -> Toolset -> Settings -> General )
In most of the block's settings, you'll see the option to select different values for different screen sizes, by highlighting the respective device icon.
For example, under the "Masonry Settings" in the "View Loop" block, you can keep 3 columns for 'Desktop', but set 2 columns for 'Tablet' and 1 column for "Phone".
( screenshot: hidden link )
Here is a useful guide on working with the responsive control settings:
https://toolset.com/course-lesson/creating-responsive-designs/
Important note: Please never include the website's access details in the message of a support ticket and always use the dedicated access details fields for this, to keep it private.
regards,
Waqar
Thank you. Is there a way to set the breakpoints (widths) at which it switches from phone, tablet, desktop mode?
things are not all well, afterall. And, I'm getting frustrated with this. I am paying attention to caching. It is off on the site, and I have been clearing the cache in the browser to test this. What is happening, is that the browsers will randomly show one column instead of the designated 3 column masonry. With no changes made to any files. The same browser switches the way it displays. Each browser can randomly switch from 3 column to 1 column. I'm at my wits end and don't know what to do.
When you refresh the screen you can see that it begins to format like its going to do the 3 columns, and then it loses the formatting and displays as one column.
hidden link
You can use the access details from earlier in this thread if you need.
It appears that when I put the conditional on the short code for the edit link, it ends up doing one column.
Yes. That is what is happening. When I use a conditional for the edit link, the formatting is lost.
If I convert the conditional bllock k to html and that back to visual, it cannot resolve properly. So, I'm guessing there is a syntax error in the shortcode being generated for the conditional.
I am trying to compare the current user to the author of the current vendor record. I'm not familiar enough with the shortcodes to try them in a classic block.
Thanks for writing back.
> Is there a way to set the breakpoints (widths) at which it switches from phone, tablet, desktop mode?
- Yes, the breakpoints for the responsive web design can be changed from WP Admin -> Toolset -> Settings -> General
If your goal is to show the edit link, only if the current user is also the author of the post/result in the view's loop, you can use the conditional statement like this:
( ref: https://toolset.com/documentation/legacy-features/views-plugin/using-shortcodes-in-conditions/ )
[wpv-conditional if="( '[wpv-post-author format="meta" meta="ID"]' eq '[wpv-user field="ID"]' )"]
Edit link
[/wpv-conditional]
This conditional statement will show the content if the current post's author ID and the current user's ID are the same.
I just happened to notice that no matter who I am logged in as, the user id always shows to be 53. Actually, I take that back. once again, a caching issue. When logged in as admin account I get user id 1. sally is 53. But author id is 1 always. Is author id of 1 supposed to be a correlation with the user id?
If your goal is to compare the email in the "personal-email-address" custom field with the current user's email, the conditional code will look like this:
[wpv-conditional if="( ' [wpv-user field="user_email"]' eq '[types field='personal-email-address' output='raw'][/types]' )"]
<p>[toolset-edit-post-link content_template_slug='template-for-vendors' target='self']Edit[/toolset-edit-post-link]</p>
[/wpv-conditional]
Please note the use of output='raw' attribute in the custom field shortcode, as without it, the email link is returned, while we need the raw email address in the plain text format, for this evaluation.
Also, the "Shortcode" block from WordPress is designed for simple shortcodes and it shouldn't be used for complex shortcodes and conditional statements, where shortcodes are nested within other shortcodes. For this, Toolset's "Field and Text" block should be used.
Ok. I will test out your instructions for email addresses. However, the userid seems like it would be the best conditional for the EDIT link. I still don't understand why I am not able to use it to display the edit link when needed.
I assume you are working on it right now [because the id numbers are changing with almost every screen refresh] . So, I'll wait for you to post here again before I go in and make changes.
I wasn't working on the website when you wrote the last reply, but, I did notice some unexplainable cache behavior on the website too. It would be a good idea to consult your hosting support team to understand how it is managed on their server.
> However, the userid seems like it would be the best conditional for the EDIT link.
> I still don't understand why I am not able to use it to display the edit link when needed.
- That is because you're using the email type custom field "personal-email-address" to link "vendors" posts to the respective WordPress users.
If you were using the WordPress post author feature for this linkage, then you'd be able to compare user IDs in the conditional statement, as I suggested in my earlier reply.
( ref: https://toolset.com/forums/topic/views-are-erratic-with-responsiveness-after-engaging-bootstrap-4/#post-2331789 )
Note: To use the post author feature, you'll have to enable it first, from the "vendors" post type's settings.
( screenshot: hidden link )
Here is a guide on the post author management in WordPress:
hidden link
>>>Note: To use the post author feature, you'll have to enable it first, from the "vendors" post type's settings.
see attached files. I have selected Author, save, cleared caches, and came back hours later and there is no ability to change the author on neither classic nor block editors.
Ok. It is NOT a caching issue. Look at this screen. the user account logged in before the current user, Sally.James, was user account, American Health (email address americanhealthfreecom@protonmail.com). Then, Sally.James logged in. The conditional for this example is to compare vendor.personal-email-address to user.email-address. I embedded the current userid into the menu strip. It always immediately shows the correct user. In the image that I uploaded Sally.James is logged in. But the toolset view is showing the previous user's email address ( americanhealthfreecom@protonmail.com). I can refresh and clear caches' until the cows come home and it won't change the vendor.personal-email-address. The wrong record is staying in the view.
Furher, '?' question marks start showing up in odd places during this phenomenon. note the one in the address block after the zip code. The '[' an ']' are part of the text. The question mark is not.