Google Optimize for A/B test: Trying to edit existing HTML but says it’s over the limit even when I test deleting some of it?

I am trying to set up an A/B test of a company’s website for my project. There are certain changes I’d like to make such as changing the ‘favourites’ products on the home page to one with the top selling products which I was trying to do by substituting the existing code simply with the top selling products instead (i.e. their jpg, their links, their names etc).

However I found that when making ANY change (by selecting the element and clicking ‘edit HTML’), even testing it by deleting one character from the original code, that it then pops up with this error notification saying that it’s over the word limit. Even when I put the character back for example, the error message is still there. And it will say weirdly that it is quite a lot of the word limit even though it’s basically the original code! I then have to click cancel every time.

Please see the attached photo for reference (where I deleted one character from the original code to demonstrate how any editing (even deletion of original working code) then comes up with the error that the html is over the limit).

View post on

Thanks in advance!

pseudo 3D camera turning html canvas javascript [closed]

I am trying to learn to make 3D games in JavaScript using HTML 2D canvas. I was following this post about it and I made a simple scene that you can move around in.

What I need help with is figuring out how to make the effect of the player turning their head, to look side to side and behind them.

Here is what I have:

Codepen link

Code (also on codepen)


<html lang="en"> <head>     <meta charset="UTF-8">     <meta http-equiv="X-UA-Compatible" content="IE=edge">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>3d test</title> </head> <body>     <canvas id="canv"></canvas> </body> </html> 


//use arrow keys to move around  var canvas = document.getElementById("canv"); var c = canvas.getContext("2d");  canvas.width = canvas.height = 800;  var crateImg = new Image();  class Entity {     constructor(x, y, z, w, h) {         this.x = x;         this.y = y;         this.z = z;         this.w = w;         this.h = h;         this.rx = 0;         this.ry = 0; = 0;     }     render() {         //c.fillStyle = 'red';         //c.fillRect(this.rx, this.ry,*this.w,*this.h);         c.drawImage(crateImg, this.rx, this.ry,*this.w,*this.h);     }     update() {         //project to 3d = 400/(400+this.z);         this.rx = ((this.x* + 400);         this.ry = (this.y* + 400;           //move         this.x += camera.xSpeed;         this.y += camera.ySpeed;         this.z += camera.zSpeed;     } }  var camera = {     xSpeed: 0,     ySpeed: 0,     zSpeed: 0, }  var entities = [];  function random(min, max) {     return Math.floor(Math.random() * (max - min) + min); }  window.onload = function() {     start();     update(); }  function start() {     crateImg.src = ";fidelity=grand";     for(let i = 0; i < 100; i++) {         entities.push(new Entity(random(-800, 800), 0, i*10, 50, 50));     } }  function render() {     //fill background     c.fillStyle = 'skyblue';     c.fillRect(0, 0, 800, 800);     //draw flooor     c.fillStyle = 'green';     c.fillRect(0, 400, 800, 400);     //draw entities     for(let i = 0; i < entities.length; i++) {         if(entities[i].z > -400) {             entities[i].render();         }     } }  function update() {     //updatre entities     for(let i = 0; i < entities.length; i++) {         entities[i].update();     }     entities.sort(function(i, i2) {         return i2.z - i.z;     })     //redraw current frame     render();     requestAnimationFrame(update); }   function keyDown(e) {     switch(e.keyCode) {         case 39:             camera.xSpeed = -5;             break;         case 37:             camera.xSpeed = 5;             break;         case 38:             camera.zSpeed = -5;             break;         case 40:             camera.zSpeed = 5;             break;     } }  function keyUp(e) {     switch(e.keyCode) {         case 39:         case 37:             camera.xSpeed = 0;             break;         case 38:         case 40:             camera.zSpeed = 0;             break;     } }  document.onkeydown = keyDown; document.onkeyup = keyUp; ``` 

trying to hide a “0” value from a HTML display

enter image description hereIs there any way to hide an HTML field based on the displayed value of "0" I have an ecomm site that displays Quantity available with a numeric value. I only want to display the number if it is above "0" The values are populated from data base upload to the site. The "0" value is NOT an input field. so most codes I see have the solution with some sort of input condition code.

My site displays this: Call for Availability.0 If item has QTY above "0" it displays this: Qty On Hand: 1708 I need to remove the "0" and only display Call for Availability.

I have researched similar request on this forum and found all have answers using an input field. The problem is the "0" is not an input. It is an code generated inventory amount.

I have tried CSS to hide the value, but that hides ALL the values including above "0".

I can insert any form of code needed. Java, PHP, json, etc…

Here is a sample of actual code I have:

<div id="availabilityInfo" class="availabilityInfo">  <span class="availability-header">[product_Header-availability]</span> <span id="availability" class="product_availability availability-item">[availability]</span>  <span style="display: inline;" id="product_inventory">[stock] <span class="freeshipping availability-item"><!--[freeshipping]--></span>  </span></div> 

The [STOCK] tag is what brings in the qty value of "0"

Editing HTML structure of Gutenberg layout recent post?

I used gutenberg layout method with wordpress editor to call recent posts. WordPress automatically generated this HTML structure.

<ul class="wp-block-latest-posts__list has-dates wp-block-latest-posts">    <li>      <div class="wp-block-latest-posts__featured-image">        <img loading="lazy" width="1024" height="663" src="" alt="" class="wp-image-73"              srcset="" sizes="(max-width: 1024px) 100vw, 1024px">      </div>      <a href="">SOME TEXT</a>      <time datetime="2021-05-08T17:21:16+00:00" class="wp-block-latest-posts__post-date">May 8,             2021</time>      <div class="wp-block-latest-posts__post-excerpt">SOME TEXT</div>    </li> </ul> 

Now I need to group anchor, time and the last div tag in another div tag for my CSS design. Problem is I do not know how to edit html structure of recent post with wordpress editor. Should I code?

[![enter image description here][1]][1]

clicking over SOME POST doesn’t give me a chance to create a new div there.. I use underscore theme.


Hi, would anybody know what the file name must be for adding html code to a child theme. for example, must the file be custom.php or custom.js

function my_scripts_method() { wp_enqueue_script(       'custom-script',       get_stylesheet_directory_uri() . "/js/custom_script.js        array( 'query' ),'',true );           } add_action( 'wp_enqueue_scripts', 'my_custom_script.js' ); 

Ive tried putting this code in functions.php and header.php to call the javascript. doesn’t work

The countdown javascript animation is in a file named custom_script.js in a folder named js, which is in the child theme folder named wpbdemo. The animation also had css and html, but that is working I think, as the countdown template is showing, its just not doing any movement. So, I think its the javascript code not working. The css is in style.css file and the html is in footer.php.

Are number counters on websites ever linked to anything, or are the numbers all hardcoded in the html?

Can a website have a number counter linked to something, like if they want to show the real-time count of their twitter followers?

From what I’ve searched, the numbers in number counters are hard-coded (ie or

Are there any websites whose number counters are linked to something, so I can look into them. Or is there a method one could recommend to do this?

add another html tag after li element in wp_nav_menu

I have a nav menu in footer. I just want to display it side by a <p> tag, I mean something like this

<ul> <li> <p>copyright C 2021</p> </li> <li> contact </li> <li> blog </li> </ul> 

this is my menu function

if ( function_exists( 'register_nav_menus' ) ) {     register_nav_menus(         array(           'top_nav_menu' => 'My Footer Menu'         )     ); 

and I’m calling it in footer

<?php if ( has_nav_menu( 'top_nav_menu' ) ) { ?>             <?php wp_nav_menu( array(                 'menu' => 'Footer Navigation Menu',                  'theme_location' => 'top_nav_menu',                  'menu_class' => 'footer-links'                 ));              ?>             <?php } else {?>             <ul class="sf-menu">                 <?php wp_list_pages( array('title_li' => '','sort_column' => 'menu_order')); ?>             </ul>             <?php } ?> 

How can I insert an extra <li> element just before its first <li> and add a <p> tag between that later added <li> element?

HTML 5 VS Flash

Hello Guys,

Please suggest me what I use HTML 5 or Flash. But I think HTML 5 is better. B'coz we can easily optimize site which can create in HTML 5. Search engine crawler can also read your content.
but in Flash site you can use only Meta's.
am i right??