Alex Phelps
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] View order by product categoryI was able to follow this idea to add a custom taxonomy for products called “product_teams” which is quite similar to your departments scenario.
For saving the custom taxonomy data to the order, I used the ‘woocommerce_thankyou’ hook to loop through the products and set the team.
Here is what I did to loop through the products and save the tax data onto the order. Note, I registered the ‘product_team’ taxonomy on both the product and shop_order post types.
function save_team_on_new_order( $order_id ) { $order = new WC_Order( $order_id ); $items = $order->get_items(); foreach ( $items as $item ) { $product_id = $item['product_id']; $teams = wp_get_post_terms( $product_id, 'product_team' ); foreach ( $teams as $team ) { wp_set_post_terms( $order_id, $team->term_id, 'product_team', true ); } } } add_action( 'woocommerce_thankyou', 'save_team_on_new_order' );
Here is the full working code – https://github.com/alexphelps/woocommerce-product-teams/blob/master/woocommerce-product-teams.php
Hope this helps.
Forum: Plugins
In reply to: [Simple Post Alerts] Post Type SupportHi Diablo2,
I like the idea. Are you open to contributing to this plugin?
Let me know.
Thanks,
AlexI’ve narrowed it down to not being storefront, but still not sure why my install (VVV) does this.
The only thing I’ve done for now is change the archive-product.php html. I tried it forward and backwards, but have no clue why the default woocommerce templates are loaded when I’m looged in but the woocommerce templates from my theme are loaded when I’m not logged in.
I think I’ve narrowed this down to not being a storefront theme issue for now.
Forum: Networking WordPress
In reply to: Multiple WP Multisite on one serverWould an easy way to do this be to use collaboration.domain.com/shop and use a 1 multisite subfolder setup?
You could then have a redirect from shop.domain.com to collaboration.domain.com/shop
Forum: Networking WordPress
In reply to: subdomain not working..server not found“Server not found” is a DNS error and not a WordPress error. You need to check that you have your DNS pointed correctly.
I can also see that you left “example.com”, you’ll want to change this to your own domain. If you’re working on your localhost you might need to set host files for that domain to point to your local server IP. This article might be of help to you- https://wpdreamer.com/2013/08/how-to-setup-a-localhost-wordpress-sub-domain-multisite-environment/
Forum: Plugins
In reply to: [WP Super Cache] Selective interval cachine@musicshahram, glad to here object caching is helping you for now. Memcached objects typically don’t expire as quickly as static page caching does so I think you’ll probably be surprised at how well this will help your server / database performance for the long run.
For priming the cache, you may look at Optimus Cache Prime – https://patrickmn.com/projects/ocp/
Someone wrote a warm.php script – https://www.pixelenvision.com/1572/php-cache-warmer-preloader-for-w3-total-cache/
I’m also pretty sure that W3TC has a cache priming feature – https://www.ads-software.com/plugins/w3-total-cache/
Best of luck!
Forum: Networking WordPress
In reply to: Parked Domains Unwantedly RedirectingI suppose you are using the MU Domain Mapping plugin – https://www.ads-software.com/plugins/wordpress-mu-domain-mapping/
To be able to load the same site on different domains, there is a feature in the Network Admin settings that allows this. Note – It’s not recommend because of duplicate content issues.
The feature is called “Disable Primary Domain Check” which I believe will do what you need. – https://www.ads-software.com/plugins/wordpress-mu-domain-mapping/installation/
“Disable primary domain check. Sites will not redirect to one domain name. May cause duplicate content issues.” – ignore the primary domain setting on your sites. The same content will be available on multiple domains and may cause problems with Google because of duplicate content issues.
Forum: Networking WordPress
In reply to: Duplicate / Copy WordPress siteThis guide is probably most helpful for you – https://codex.www.ads-software.com/Moving_WordPress
Then there are several tools out there that might help too.
https://www.ads-software.com/plugins/duplicator/
https://www.ads-software.com/plugins/wp-clone-by-wp-academy/Forum: Networking WordPress
In reply to: Multiste Purge Transients Per SiteThe current work around is a fork of the Scotty T’s Johnny Cache plugin using PHP-FPM via an Nginx config and the rest of the site on HHVM.
Forum: Networking WordPress
In reply to: WordPress site taking AGES to load…?https://www.webpagetest.org/result/150813_9K_8J5/
From this, I suspect that you have some queries to the database that are taking way too long. You could using something like Query Monitor to track down what is happening.
From there you should optimize the queries and then invest in using caching for both the database queries and static html caching.
DB Query Caching (requires memcached) – https://www.ads-software.com/plugins/apc/
HTML Caching – https://www.ads-software.com/plugins/wp-super-cache/Then there is also the content size of your page, at 5mb it’s pretty hefty. I’d look at optimizing the images as much I could to reduce total page size.
Forum: Plugins
In reply to: [WP Super Cache] Selective interval cachineFor Bots, I’ve help setup bot specific routing where bots see a slightly older cached page than normal users by inspecting the header and routing to different backends. We also use this extra cache as a failover if WP itself is down. https://blog.unixy.net/2015/03/load-balanced-bot-split-approach-to-counter-excessive-bot-traffic-when-search-engines-work-against-you/
This solution really works. Though it works for us with 1000+ sites, 1500+ domains, and million+ pages and posts across them all.
Given what you described though for 240 pages I’d say you’re probably just better off getting a little better server that can handle a little more load or looking at other performance bottlenecks.
Are you using Memcached Object caching to cache your database queries? If not, you should really look into setting up a persistent object cache backend which should speed things up for page generation times. https://www.ads-software.com/plugins/memcached/
The easiest way would be to use JetPack’s Custom CSS to add some CSS to hide it.
.single-footer { display:none; }
Alternatively you could remove the php code that generates the post footer inside single.php from your theme. I’d personally just hide it with CSS instead of doing this.
Forum: Networking WordPress
In reply to: Do I need a wordpress multi siteNo, I mean dozens (or 100s) of the same users across both sites. If there is a lot of users that’ll need login access to both sites, the benefits of multisite really start to come into play. If it’s just a few people then keeping them separate will probably be better.
Forum: Networking WordPress
In reply to: Do I need a wordpress multi siteFor me, I might use this question to help decide.
Will there be a shared set of users across both sites?
If yes, then multisite might be a good fit. If not, Multisite probably wont really help in the long run and it’ll be easier to run separate installs and separate code bases.