How to custom page template for the Gutenberg editor

I have read several questions/answers/articles about “custom templates,” including the Block Editor Handbook, but nothing gets at what I’m looking for. Granted, this does smack of questions about placing content from two different editors on the same page, which I understand is not possible (see ACF comment below).

Example of what I’m looking for: after loading the template, the user would see two areas (sections/divs) in the editor, with a background color to differentiate them. If the user added a paragraph in the first section (A) that content would appear in section A on the public-facing Web page. Same with the second section.

  1. is there a way to have some underlying HTML in the editor to create the structure?
  2. is there a way to do this without using ACF (I’m always amazed that such a venerable CMS can’t write content in different places on a page).

Thank you.

web part – My webpart deployment is successful, but i cannot see my codes on test page?

I deployed my webpart to our test website and there is no error. I saw in Central adnmin is “Deployed “, also saw this Visual Studio too. But i cannot see the codes that i change, in the test website. For example i changed only a text in a html tag. But i cannot see this change. Please help thanks.

wp query – Custom Admin Page equivalent to Posts page with custom meta values

I’m creating a custom admin page for CPT (Custom Post Type) in WP-ADMIN returning posts with their taxonomy that should like Posts List Page

Post List edit.php

I am able to display list of posts for a given category, which can be done with a line like: query_posts($query_string . ‘&cat=$term_id’);

followed by: if ( have_posts() ) : while ( have_posts() ) : the_post(); etc. etc. ending with (else)

However this is not what I am looking for exactly. What I am looking for is to achieve something like the attached image with a custom filter that allows me to return certain values for Posts and their meta.

The idea is a website that has videos, the user registers an account and start watching the videos each video he watches, he’ll get 1 point the more videos the more points. What I want is create a “user activity page” that lists all the videos with their taxonomy and 0 points which I filter by user ID or category ID I’ll get the values related.

how to show summary on checkout page for multiple orders?

I am working on the Checkout flow (system) for the tablet device and it has 3 steps:

  1. A list with existing orders (which were previously saved from another flow). The User should be able to select multiple orders from the list to proceed to the next step
  2. Next step is Order Details. Here we can see the products(items) of each selected order.
    And my question is for this step. Can we show a summary for each order separately? Since it is important for us that at the step with Payment(3rd step) we can pay a different amount for each of them and choose different types of payment
    In terms of best practices and UI patterns..
  3. Pay

Thanks!

seo – Should I change the AMP url? (when updating the url for the page itself?)

Let’s say I have a page under www.example.com/some/path, and its AMP version is under www.example.com/some/path/amp.

If I change the path of the page, let’s say to www.example.com/other/path, should I change the path of the AMP as well, for example to this: www.example.com/other/path/amp?

In other words, are there any disadvantages to have one fixed AMP url for a page, for all the page lifetime, without ever changing it, even the the page’s url (the canonical) is changing?

I’ve tried to search around the web and in google documentation, and all I have found is guidelines which say that I should have a redirect whenever the AMP url is changed (basically when moving from old site to new site which doesn’t supports the old url structure).
The point is that I don’t want to get to the situation when I even need the redirect, since I will always have the same AMP url.

Of course the amp page will have the updated page url as the canonical, and as I understand it, the SEO power is generated by the the url of the page and not the AMP version of the page.

So are there any advantages to update the url of the AMP as well?

gui design – How to indicate that specific sections of a page can be swiped

I suppose the first point to make is that you shouldn’t depend on invisible interactions to accomplish anything.

The example made in virtualnobi’s comment of iOS’s swipe-to-delete gesture is a good example; Mail items etc. can be deleted the long way by choosing Edit, then checking the items you wish to delete, then choosing “Trash”/”Archive” at the bottom of the screen, or they can be deleted by swiping the item to the side until the “Trash”/”Archive” state is visible. In this way, the swipe gesture is a useful pro tip, but never a requirement for normal users.

When a swipe action is required by the interface (e.g. to prevent accidental activation), the behaviour should be simply indicated. Animation is a great choice for this. For example, the little shine effect over the “slide to unlock” text on iOS provides a useful hint of the kind of motion required (horizontal slide):

iOS 7 "slide to unlock" animation
Image taken from this Stack Overflow question

Where such an obnoxious animation is not feasible, putting an icon on the screen that indicates that there is an alternative interaction can provide a useful cue. Again, iOS has an example with the camera button on the lock screen—tapping it once can’t launch the camera immediately since that would be constantly activated by accident, but expecting users to know that grabbing the icon and swiping up is how to activate the camera is another invisible interaction. So Apple adds a tiny indication of the affordance of that button when tapped once; quickly bouncing the lock screen vertically and briefly showing the camera interface beneath it. The user learns quickly that swiping up a little further reveals a little more of the camera interface, until swiping up in one go unlocks the interface and prevents the lock screen coming back down:

iOS 6 lock screen camera affordance
Animation taken from UI Animations tumblr

This is very similar to the lock screen affordance on Windows Phone, as mentioned in this highly relevant article about animations as affordance:

Windows Phone lock screen affordance

Animation is a great way to provide affordance of content overflowing. In Windows Phone, the transition animations tilt the content being viewed about the y axis so that (for a split second) more than a screenful of content is visible. This is a helpful indication that there’s more off to the side of the screen than what is immediately visible. This is a huge pain to find a good example of online (this is the best I can find and it’s a real blink-and-you-miss-it example), but it’s very apparent when using the device in person. In Windows Phone they also show a tiny sliver of the content on the next screen across horizontally (as a hint that there’s more than meets the eye).

This technique (especially the animation example) is an example of what Edward C. Tolman calls “latent learning” (learning through passive observation rather than being told explicitly). There’s a good article on the Microsoft website that gives another example:

In the following image, the list box’s contents slide in when the
control is initiated, which conveys a lot of information quickly. This
transition suggests that users can scroll through this list and that
it contains more content beyond the current display, which helps
encourage user interaction.

Visuals - Content transition example

If the list box appears empty for just a moment, and then its content
slides in, the user sees this movement and can infer that the list box
contains more options than what currently appears. Likewise, the
sliding movement acts as a clue that users can manipulate the content
that appears.

How can i hide Discount Code form Payment page in Magento 2?

I have seen many articles on how to hide the discount code on the cart page and I was able to do that, but my attempts to hide the discount code on the PAYMENT page seems to be illusive for me. What is the correct way to hide the Discount Code option on the payment page.

TIA

Jason

usability – Is it right to use horizontal scroll to show information related to the same content in details page

I have a Mobile app for recipes, the user can click on recipe to see its details, in details page we have image, title, tags, ingredients, and steps for preparation.

So my question is, is it right to make ingredients as horizontal scroll instead of put it in vertical scroll?

This is an example for horizontal scroll
enter image description here

And this is another example for vertical scroll
enter image description here

in this case what is better to use, horizontally or vertically?

google analytics – Best way to track page views in a multi-tenant application?

Assuming here that you don’t need help with GA/GTM installation and you’ve got your tenants’ permission to do so, here’s my take on GA-side setup to get the analytics you want. There’s no way to avoid some individual GA setup per domain, but for a relatively small number of sites you can share a Property but have separate GA data using View filters. There’s a limit of 25 Views per Property, which is why the number of tenant sites mattered to my answer.

Each domain will use the tracking ID of the shared Property, and you’ll create a View for each domain that has a filter of the Predefined type that includes only traffic to the correct hostname.

screenshot of View filter setup

The result will be a View that only knows about data to the appropriate domain.

(If you would like a commingled View in which you can still tell the difference between sites, you could use a Custom Advanced filter to extract the Hostname (request field A, Hostname (.*)) and the Request URI (request field B, Request URI (.*)), and output the concatenation (/$A1$B1, since GA likes things that look like directories).)

You can’t share goals exactly – they are View-specific – or removed URL parameters, site search settings, or bot filtration, but you can set up a “template” View with the shared definitions and copy it for each site-specific View, adding the domain-specific filter after copying. If you want to add other filters or goals after the fact, you can pull in filters from other Views in the Add Filter screen, and use the View-level “Share Assets” screen to generate a link that will allow you to import specific goals to other Views.

If you install Google Tag Manager on the sites instead of GA directly (which is recommended in any case), you can share event definitions as well. They will get sent to the Property and your filters will have them show up in the appropriate Views. Your ability to share triggers will be limited by how alike the markup of the various tenant sites is, but the fact that you can have multiple triggers for the same tag will allow you to send the same event data to GA even if the details of the event happening vary from site to site.

RSS content not publishing in the second facebook page.

I have two Facebook pages. I am publishing the rss feed in one page, say X, without any problem. I have another page, say as Y. This page is not publishing the feed. The RSS feed is generated through the site IFTTT.