× Got a CSS, HTML or webdesign question? Ask it here!

Add code to "shop_verify" Page.

10 months 1 week ago #18199 by Briancresswell
Add code to "shop_verify" Page. was created by Briancresswell
Hi, anybody able to help with coding to add some text to the checkout page. I know the page is called "shop_verify"
Thanks

Please Log in or Create an account to join the conversation.

10 months 1 week ago #18210 by ccruz
Replied by ccruz on topic Add code to "shop_verify" Page.
You would need to include the content in your global HTML template. Content in your HTML template is present on every page of your side however it can be hidden from all pages using CSS and then only displayed on the checkout page by targeting using the specific pages unique body id.

For example if you have added a div element with the id cart-text you can apply the following rules to hide it everywhere but show it on the checkout page.

div#cart-text {display: none; }
body#shop_verify div#cart-text { display: block; }

-Cris
The following user(s) said Thank You: Briancresswell

Please Log in or Create an account to join the conversation.

10 months 1 week ago #18221 by JimUMFan
Replied by JimUMFan on topic Add code to "shop_verify" Page.
Oh wow, I haddn't though of doing something like that. That's pretty clever! I've just been using jQuery to insert content directly where it should appear. Do you think using CSS to hide excess is more performant than using javascript to insert?

Please Log in or Create an account to join the conversation.

10 months 1 week ago #18222 by ccruz
Replied by ccruz on topic Add code to "shop_verify" Page.
The benefit of adding the content via the HTML template is that it's rendered along with the rest of the page whereas injected code is added client side after the page loads. Downside of course is that technically the content will be present on every page and just hidden from view on some pages.

Please Log in or Create an account to join the conversation.

Time to create page: 0.115 seconds
Powered by Kunena Forum