Restoring Deleted Front Page in WooCommerce - php

I was trying to get rid of the Welcome section on the front page of a WooCommerce site I am building. The site is using the Storefront theme.
I thought the way to do it was to delete the Welcome page from the Pages section of WordPress. However, as soon as I did that, the entire front page of the store is gone and it is back to what seems like a regular WordPress.
Using "Create default WooCommerce pages" feature of WooCommerce does not seem to work as it neither fixes the display of the front page nor creates another Welcome page.
I have several questions.
1. What went front?
2. How can I fix it, so the store displays again.
3. How can I get rid of the Welcome section on the front page without blasting the entire page off the site?
Any advice is appreciated.
P.S. I should mention that I originally moved the Welcome page to trash. I then saw that it broke the site. In turn, I attempted to restore it, but it didnt fix the issue. I then deleted the page permanently in hopes of recreating it with the WooCommerce functionality. The latter didnt work.

You need to use the WordPress theme Customizer
under front page you have the option to choose a page your blog as a front page, here you just need to select the page that you deleted and then restored
this link may be of some use to you... https://atlantisthemes.com/change-storefront-homepage-layout/

Related

WordPress Custom Posts Page Not Displaying

I have just encountered a small but weird problem in WordPress. I have made page called 'nyheter' (translates to news in Norwegian), where I have made a custom page having a 'page-nyheter.php' in my template folder where I want to display all the posts on the website.
Please keep in mind that I don't want to display any posts on my front page.
I do also have a custom static front page that is just 'front-page.php' which works fine navigating to. However, choosing my front page as the homepage, and the 'nyheter' page as the posts page in the settings, ends up showing the homepage on the 'nyheter' page as well. All of the other pages works fine, and if I just remove the 'nyheter' page from the custom posts page, it works fine again.
What exactly am I doing wrong here? Could someone please help me?
The Posts page will use index.php for it's template, and the Static Front Page will use front-page.php
Is the Nyheter page powered by posts? Why not use index.php since is most suitable for posts than a page template.
https://wphierarchy.com/
If you are a developer please enable wp_debug to true. Then check your errors.

embedding woocommerce page breaking theme and not displaying correctaly

First I have contacted the theme developer and even paid for extra support and I am not getting any help. Thanks in advance for any help that you guys can give me
Issue:
When I embed a single product page using the Visual Composer Woocommerce Product Page Element on the home page the theme breaks. I've done this before on an older site using the same theme (Porto theme themeforest) and it worked fine. You can see it here: http://easypayold.wpengine.com/ (enter: UN: demo PW: 26d2d9153c32 to view site)
I am rebuilding the site and I am having the above issue.
I have disabled and activated all plugins to trouble shoot no changes. Then I activated the twentyseventeen them and embedded single product page worked so the issue seems to be from the theme itself.
I have removed the above single product page from the home page so you can see what it should look like then added it to a duplicate page so you can see how it is breaking the page. You can look at the home page to see the way it should look.
Duplicate page:
Name: !Home with Woocommerce embedded product page
URL: http://krankfinance.wpengine.com/home-2-2-2/
Home page the way it should look (with out single product)
http://krankfinance.wpengine.com/
Problems on home page:
1. Full screen rows become boxed
2. Reviews are gone (big issue)
3. The embedded single product page (bottom of home page) is not displaying correctly.
Here you can see the stand alone single product page, the way it should look when embedded on home page:
http://krankfinance.wpengine.com/shop/easy-pay-formula-x-driver/
Thanks in advance. If you need any other info from me please ask.
I fixed the issue (really more of a bandaid) by using an older version of my theme's woocommerce folder and putting it in my child theme. Then i removed the "Responsive Tabs js located porto(my theme)/woocommerce/single-product/tabs/tabs.php
Really want it to work with the current theme's woocommerce though. Still no help from theme developer.

Woocommerce shop page redirects to wp-admin

At some point, the shop page started to redirect to the wp-admin (admin backend) page. I don't know why.
Commonly proposed solutions include:
Delete the shop page, and add it again using the WC > Status > Tools > Create default WooCommerce pages.
Make sure the WP URLs are set correctly.
Neither had any effect. The shop page URL is currently at https://website.com/?page_id=88, reflecting the number of times I tried remaking default pages.
I have also tried adding some text to the page, though it should normally be empty. This had no effect.
Ran out of ideas to try. The rest of the website mostly works.
Possibly related annoyance bug: the shop automatically adds the first product to the cart whenever one visits the site. Somewhat annoying, but not disastrous.
Versions:
WooCommerce 3.2.6
Wordpress 4.9.1
The bug seems to be fixed by changing the Home page to the Shop page in the WP settings > reading.
Unfortunately, this workaround doesn't fix the underlying issue entirely because the bug resurfaces if one selects the front page instead of the shop as the home page.
I'm not able to add a question/comment, so I'll try to add this as an answer...
If you are using IIS and have setup your site as a virtual application, this may cause this error. I had this same thing during testing. Once I created the website as it's own proper website and accessed it properly, this fixed the issue for me.
I had this issue and fixed it clearing browser cache
I hope it helps

Add <?php the_content(); ?> to WooCommerce page template

I use Elementor page builder on my WordPress site. There is a problem with it - by default it doesn't allow editing WooCoomerce Shop/Products pages. The solution they say is to add to page templates code. I, being a beginner with no idea of coding, cannot figure out which file to add this code to and where in that file. I have been researching and trying to fix this myself for two weeks now, in vain. Please help me achieve this.
Here's what Elementor say: "Sorry, the content area was not found in your page. You must call the_content function in the current template, in order for Elementor to work on this page."
Go to Elementor setting and then check products in post types
Go to Products, click Edit on the product you want to edit, input something (ie. a full stop-sign '.') in the WP Editor, click Update. (See attached screenshot.)
Screenshot
There seems to be a misconception that Elementor can be used to "edit" any content.
For Elementor to work on a "Page" i.e. the post type that uses either the page.php or any theme declared page templates it requires the_content(); function to present in the code.
Issue #1: WooCommerce uses the woocommerce_content(); function to return the content of the shop.
Issue #2: The Shop output does not use the "Page" or Custom Page template - the output is equivalent to the index.php or home.php, neither of which are editable via Elementor.
Unless you are willing to write a pretty sophisticated function to collect all those elements' data and filter them into the_content(); function, there is currently no way of editing such content directly.
I know it's not the solution you are looking for but that is the current state of affairs. Having said that, some of us are working on all sorts of solutions and maybe, just maybe - we'll come up with a way to have this option available soon ;)
For shop page you should go to Elementor setting and then check products in post types.
Because shop page products are not the content but posts it's the solution.
So inlcude products in post types and edit with elmentor, if for some reason you can't see 'edit with elementor' under shop page, then just open shop page and add
/?elementor and it would enable elementor
NO need to add this code in any page follow these instruction.
You just need to clear cache and cookies your browser, Some time website take previous data to show the web page and give this error.
or
if you open your website private mode then login and go to the page by Elementor you will never face this problem.

Wordpress admin dashboard works very slow with many pages

I have a Wordpress site that it is working perfectly with a bunch of posts and pages.
I have recently started a process to migrate the contents from another website and this has added ~16,000 pages and ~100,000 posts to the site.
Now, in the admin dashboard, when I go to the page list or I try to edit a page, it takes ages to load or stops loading because the timeout is fired. This is not happening with the posts, I can open the post list and edit any without issues. The frontend is working fine.
I'm starting to believe that Wordpress might not be able to manage that quantity of pages. Is there a solution to this? Replace Wordpress with another CMS like Drupal or Joomla is my latest option.
I also tried to tune mySQL, disable all the plugins (I only have a few), etc. with no luck at all.
Thank you in advance!
UPDATE:
I found out the reason of this slowness. When editing a page, Wordpress displays a dropdown list to select a parent page. This list is populated with every single page available on the site (ugh) and this is causing the huge load times. If I "tell" Wordpress to not show this dropdown list (via functions.php or editing the core), everything goes back to normal.

Categories