How can I preview or view WooCommerce endpoint pages such as the /order-received/ page without placing an order each time I want to view it?
I know how to edit the contents of WooCommerce endpoint pages, but I find it hard to work on the front-end if I can't preview the page.
There is no need to place a new order each time you want to preview the endpoint page.
Just place the order once and store the endpoint URL somewhere. You can re-visit the endpoint page as often as you want or even refresh the page after making changes in your code/styling.
Related
I have main page with products, when I click on a product it's redirected to a product page /prducts/:productId which uses getServerSideProps to render it's data. When I go back to the main page with all products displayed I start again on the beginning of the page. To solve this problem I want instead of redirecting to /products/:productId I will use shallow routing just to change the URL and show the product page component in front of my main page, but I will keep /product/:productId page so if someone use the URL to access it he will go to this page which will be server side rendered.
So in conclusion I will display a component when user clicks on a product from main page and if user tries to access the page via URL I will redirect him to real page which is server side rendered. My question is will this hurt my search engine optimization or it has no impact on it ?
For such situations you should take advantage of SSR & ISR (getStaticProps/getStaticPaths) as it boosts SEO by a lot.
And SSG's sole purpose is not to boost SEO but to decrease the page load time. I hope you may know about this.
This will not hurt your SEO performance. There's nothing wrong with ensuring each product exists on its own URL (/products/productid). Showing the product component on the main page is just a usability improvement for users.
Here is Google's take on dynamic rendering:
https://developers.google.com/search/docs/crawling-indexing/javascript/dynamic-rendering
We have a news web site and want to have telegram instant view for all news in our web site.
I have logged in at https://instantview.telegram.org/ and create a template for a news. by using its created link in this site the instant view button for this news is shown in telegram. but not work for other news. Should I create the link in https://instantview.telegram.org/ site for each news?
You might have one of two problems.
1) According to the last abstract of Instant View:
This means that, as a website owner, you can create a template for your page and publish t.me/iv?url=... links with the corresponding rhash to your Telegram channel — and your subscribers will be able to view your articles in the Instant View format right away.
Long story short: rhash generated for your news page could be applied to any page from your site. So make sure you have changed the url param in t.me/iv?url=...&rhash=... link while creating Instant View button.
2) Check the first step in every template in Sample Templates Page. It describes which pages get Instant View and which don't. Maybe you've created your template for a single news page, not for all news pages at the same level.
E.g., the ?path: /.+ condition will provide Instant View for every page except the root page.
I use tracking IDs for the links that lead to a landing page on my website. For example:
mywebsite.com/landingpage1?tid=test1
How do I pass on TID=test1 onto the link that will be the call to action to get to another site?
Tracking Ids can vary depending on where the traffic is coming from.
So I would like the TID to be automatically attached to the TID of the outbound link on that page.
I am using WordPress on my website. So I presume that any suitable code could be added either at the header of the page or for the entire website.
Let's suppose I have a page with ten products. When I click a button on one of the products it opens a pop-up (partial view) which has some share buttons. When I click 'Share on Facebook' it needs to have the correct meta-tags (title of the product, description of the product and image of the product).
Is this possible and if so, how?
I ended up doing a view and a page from umbraco on which it renders the view from the controller. It adds the correct meta-tags, dynamically.
The user clicks share and that's it, I just serve facebook's crawler a product page which the user won't see. Then when someone clicks the shared url from facebook it will get a redirect to my desired URL.
Previously tried with javascript and ajax, or even alter the master template tags from the controller and even checking if facebook's crawler gets on the website, only the last one worked partially but yuck...
The homepage of my Wordpress site is set to display my latest posts.
I also created a landing page which includes a form for users to fill out for a free consultation.
How can I make it so that when first-time users go to the homepage, they will be redirected to the landing page? (But clicking on my site logo should still take them back to my regular homepage showing my latest posts.)
After users have filled out the "get a free consultation" form on my landing page, we would create a cookie or something so that whenever they next visit the homepage, they will just see the regular homepage with latest posts - not see the landing page any more.
Is there a way to write a code for this?
Thanks in advance!!!
setcookie() is probably a good option.
if(!$_COOKIE["been_here_before"]) {
setcookie("been_here_before", true);
header('Location: /consultation'); // Your free consultation page
}
The way to achive this is a little bit more complicated.
The best practice for this is to have your form in an overlay on the homepage, the user sees the form when accessing your website but has an option to close that layer (exemple:"already fiiled the form..."). After the user submits the form or clicks "close" then set a session variable that will be used so the user won't receive the overlay again in that session. An website that does that is this one which asks the user to register for the newsletter. If the user is already register then he can click "Already registerd?" (=Sunteti deja înregistrat?) and the overlay disapears for that session.
If the form submision is mandatory for all users to get access to the website, then force them to login in the landing page. Here is an example for that.