Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Alfalfa
Apr 24, 2003

Superman Don't Need No Seat Belt

snagger posted:

Avada appears to have a MegaMenu builder in it that isn't part of the normal WP menu stuff, perhaps the mystery menu was built using that?

No clue. Where can I access that I can't find that in any of the options, settings, dashboard, etc.

Adbot
ADBOT LOVES YOU

Asshole Masonanie
Oct 27, 2009

by vyelkin

fuf posted:

Not totally sure what you mean but can't you just set the DocumentRoot for the subdomain to the location of the site files?

e.g, in your apache virtual host:
code:
ServerName blog.website.com
DocumentRoot /var/www/public_html/blog (or wherever your site files are)
Don't forget to change your site address in WordPress.

Well, the issue is that my document root is /var/www/html
So /blog only exists in Wordpress. It's not a real directory the file system knows about so I can't point Apache at it. It's more like I'm trying to make a subdomain for a single page on the Wordpress site. Make more sense?

mewse
May 2, 2006

Power Ambient posted:

Well, the issue is that my document root is /var/www/html
So /blog only exists in Wordpress. It's not a real directory the file system knows about so I can't point Apache at it. It's more like I'm trying to make a subdomain for a single page on the Wordpress site. Make more sense?

The way you probably currently have it set up is that apache is using mod_rewrite or whatever to map those "virtual directories" to php queries for wordpress to interpret. AFAIK there is no way to emulate this using vhosts.

What you could do is for the blog.website.com vhost, make a directory anywhere on the system and put in a stub php file that redirects to the full URL. This wouldn't be transparent to the user because they'd end up at website.com/blog, but it would get them to the right place.

Asshole Masonanie
Oct 27, 2009

by vyelkin

mewse posted:

The way you probably currently have it set up is that apache is using mod_rewrite or whatever to map those "virtual directories" to php queries for wordpress to interpret. AFAIK there is no way to emulate this using vhosts.

What you could do is for the blog.website.com vhost, make a directory anywhere on the system and put in a stub php file that redirects to the full URL. This wouldn't be transparent to the user because they'd end up at website.com/blog, but it would get them to the right place.

Yeah, I've thought about this and it could work, but it also defeats the purpose of using a subdomain that is transparent (and apparently good for SEO, according to the marketing director).

What about creating a second Wordpress specifically for the blog? Can this be linked to the same database as the "main" site database? What sorts of pitfalls exist? Two installs with identical DBs could maybe solve it but it seems like that could get complicated.

fuf
Sep 12, 2004

haha
I don't think that would work because the DB contains the site address.

Are subdomains really good for SEO? I always think they look really outdated. website.com/blog looks a lot better than blog.website.com in my opinion.

snagger
Aug 14, 2004

Power Ambient posted:

Yeah, I've thought about this and it could work, but it also defeats the purpose of using a subdomain that is transparent (and apparently good for SEO, according to the marketing director).

What about creating a second Wordpress specifically for the blog? Can this be linked to the same database as the "main" site database? What sorts of pitfalls exist? Two installs with identical DBs could maybe solve it but it seems like that could get complicated.

I think you guys are way, way overthinking this. Do it with 301s instead of Apache config or WP config.

I do /exactly/ the same redirect (blog.domain.com/* -> domain.com/blog/*) using a CloudFlare page rule. If you're OK with using CloudFlare for DNS (I can't recommend it enough, they're lightning fast and you're already set up with them in case of DDOS), you can start with 3 page rules for free.

A good 301 plugin for WP (there's one on Tidy Repo, go check) can probably do the job just as well; just set the blog subdomain as a CNAME to point to the real blog.

foonykins
Jun 15, 2010

stop with the small talk


So I'm using the Pinboard theme to build a simple site for a rich schlub to try to sell his house in the mountains. Everything is going smooth so far layout-wise, except for this one problem:



It seems like every link but one is stuck in a mouseover event or something of the sort. I tried to change menu/menu selection colors to just hide the issue (cause I really couldn't care as long as it's all one uniform color) but that doesn't seem to be doing the trick. Anyone have any ideas?

Green Mind
Aug 5, 2007

Said it's ok...
Fixed, nvm.

Green Mind fucked around with this message at 08:44 on Mar 22, 2015

frogbs
May 5, 2004
Well well well

foonykins posted:

So I'm using the Pinboard theme to build a simple site for a rich schlub to try to sell his house in the mountains. Everything is going smooth so far layout-wise, except for this one problem:



It seems like every link but one is stuck in a mouseover event or something of the sort. I tried to change menu/menu selection colors to just hide the issue (cause I really couldn't care as long as it's all one uniform color) but that doesn't seem to be doing the trick. Anyone have any ideas?

Do you have something in the stylesheet that's targeting just that particular menu item? I modified a theme once where behavior for every item but one was the same and it drove me nuts.

Asshole Masonanie
Oct 27, 2009

by vyelkin

snagger posted:

I think you guys are way, way overthinking this. Do it with 301s instead of Apache config or WP config.

I do /exactly/ the same redirect (blog.domain.com/* -> domain.com/blog/*) using a CloudFlare page rule. If you're OK with using CloudFlare for DNS (I can't recommend it enough, they're lightning fast and you're already set up with them in case of DDOS), you can start with 3 page rules for free.

A good 301 plugin for WP (there's one on Tidy Repo, go check) can probably do the job just as well; just set the blog subdomain as a CNAME to point to the real blog.

Hmm this seems like it could work, but if the user navigates to blog.domain.com will it redirect them or will it remain on blog.domain.com? Additionally, if there are images under blog.domain.com/img would that be the equivalent to domain.com/blog/img? Thanks for the info, I think I'm going to follow this path and see where it takes me.

Nooner
Mar 26, 2011

AN A+ OPSTER (:
Does anyone have experience working with woocommerce that can tell me how to get additional pages to appear when you make a product page using the [product_category category=""] short code? Right now when I do it only displays 12 items of the category with no option to continue to additional pages to see the rest of the items.

As of now I'm stuck in a spot where I can either have everything available to browse by creating a menu link to /product-categories/category/ page which I can't add a sidebar to, or just 12 items out of the category on a single page with the sidebar.

WP is 4.1.1 Woocommerce is ver 2.3.7 Theme is Avada 3.7.3 if that matters. Appreciate any help or advice!

fuf
Sep 12, 2004

haha
Really sorry if this is against the rules but crossposting from the jobs thread:

I'm looking for a PHP / Wordpress developer to help me integrate Braintree payments on an existing site with its own custom payment / subscription system. It's a few levels beyond me.

I'm looking for a reliable Wordpress developer in general so this could be a chance for some decent ongoing work. :)

PM me with a rough idea of your rate if you might be interested.

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

With wp_enqueue_script, is there a way to add an attribute to the output script element?

jackpot
Aug 31, 2004

First cousin to the Black Rabbit himself. Such was Woundwort's monument...and perhaps it would not have displeased him.<
Where's the best place these days to find good, quality templates? I don't know what a good one ought to cost, but I'm comfortable spending a few hundred if I have to. Designed well, built well, responsive, accessible developers, etc. I can make style changes myself, I just don't have time (or the skill) to take a barebones template and make it do what I want. I'd rather buy something that's 95% of the way there.

fuf
Sep 12, 2004

haha
I get all mine from http://themeforest.net/category/wordpress

No idea if it's actually the best (I haven't tried any others) but I've never had any problems. Developer support depends on the theme, so you need to check the "Author support for this item".

I've used this theme http://themeforest.net/item/the7-responsive-multipurpose-wordpress-theme/5556590 on a couple of sites recently and it's been pretty good. I had to contact their support and they got back to me pretty quickly with a good answer.

the heat goes wrong
Dec 31, 2005
I´m watching you...

fuf posted:

I've used this theme http://themeforest.net/item/the7-responsive-multipurpose-wordpress-theme/5556590 on a couple of sites recently and it's been pretty good. I had to contact their support and they got back to me pretty quickly with a good answer.

For $2,900 per use, I'd expect the author to get back to me pretty quick.

the heat goes wrong fucked around with this message at 12:02 on Apr 7, 2015

fuf
Sep 12, 2004

haha
It's $58?

the heat goes wrong
Dec 31, 2005
I´m watching you...

fuf posted:

It's $58?

Its $58 if you don't charge any money for making the site. If you do, they want $2,900 from you.

fuf
Sep 12, 2004

haha

Azur posted:

Its $58 if you don't charge any money for making the site. If you do, they want $2,900 from you.

http://themeforest.net/licenses/terms/regular
Things you can do with the Item:
4.You can create one End Product for a client, and you can transfer that single End Product to your client for any fee. This license is then transferred to your client.

fuf
Sep 12, 2004

haha
The "in a single end product which end users are not charged for" bit in the regular license description just means you can't make a few changes and start selling it on to multiple people as your own theme.

the heat goes wrong
Dec 31, 2005
I´m watching you...
Ok, my mistake then :)

slothrop
Dec 7, 2006

Santa Alpha, Fox One... Gifts Incoming ~~~>===|>

Soiled Meat
I'm building a site for the liquor store I work at, we regularly host Whisky tastings. I'm trying to direct ticket sales and membership details through the the site to ease management of the events. We have a fairly decent sized 'membership' and I'd like to be able to manage that all through the site rather than spending hours manually updating a spreadsheet from handwritten forms.

I've got a decent event plugin that lets me sell tickets through WooCommerce but I'm looking for a plugin or extension that makes WC capture a few more customer details at registration e.g. phone number & address (and makes it easy for users to update these details) Ideally it'd have MailChimp integration too so I can let people manage their own email preferences through the site but that's optional.

I've played around with s2member before but I understand it doesn't play too well with WC and my ticketing plugin is WC based so I would prefer something that just extended WC in a fairly seamless way

I may be dreaming here but if anyone has any experience/suggestions I'd be very appreciative.

edit: It's important that we're able to view a users details (phone number, address) so that we can get orders to them, ideally I'd be able to download a .csv of member names & numbers or similar and print it out

slothrop fucked around with this message at 13:42 on Apr 15, 2015

kedo
Nov 27, 2007

slothrop posted:

I'm building a site for the liquor store I work at, we regularly host Whisky tastings. I'm trying to direct ticket sales and membership details through the the site to ease management of the events. We have a fairly decent sized 'membership' and I'd like to be able to manage that all through the site rather than spending hours manually updating a spreadsheet from handwritten forms.

I've got a decent event plugin that lets me sell tickets through WooCommerce but I'm looking for a plugin or extension that makes WC capture a few more customer details at registration e.g. phone number & address (and makes it easy for users to update these details) Ideally it'd have MailChimp integration too so I can let people manage their own email preferences through the site but that's optional.

I've played around with s2member before but I understand it doesn't play too well with WC and my ticketing plugin is WC based so I would prefer something that just extended WC in a fairly seamless way

I may be dreaming here but if anyone has any experience/suggestions I'd be very appreciative.

edit: It's important that we're able to view a users details (phone number, address) so that we can get orders to them, ideally I'd be able to download a .csv of member names & numbers or similar and print it out

Gravity Forms sounds like it would probably work for this?

Primpod
Dec 25, 2007

jamming on crusty white
I'm looking for something that a non-techincal user will be able to use to write articles and put them on a web page for a friend of a friends new business idea. It's really just an email newsletter people click on the links to the articles mentioned in the newsletter, then go to this website. But the key thing is that certain parts of the ui (images, colours, probably page headers), need to change depending on the url that the page has been linked to from. So if client XXX, click on the link, they'll see the article in their colours, with their logo at the top. I'm assuming this would be done though a request variable, though if it has any kind of url routing ability, that'd be nice also. Can wordpress do all of this without a lot of tweaking, or would I be best off looking somewhere else?

I am a web dev, so I can help him set this up in the first place, so that's not really a problem, it's more that I don't want him to have to contact me every time he has to add a new client or article.

Apologies if this is the wrong place by the way. I couldn't see any kind of generic cms thread. I've at least had a quick play with wordpress before, so if it can do it, it'd probably end up being the one I recommend.

snagger
Aug 14, 2004

Primpod posted:

I'm looking for something that a non-techincal user will be able to use to write articles and put them on a web page for a friend of a friends new business idea. It's really just an email newsletter people click on the links to the articles mentioned in the newsletter, then go to this website. But the key thing is that certain parts of the ui (images, colours, probably page headers), need to change depending on the url that the page has been linked to from. So if client XXX, click on the link, they'll see the article in their colours, with their logo at the top. I'm assuming this would be done though a request variable, though if it has any kind of url routing ability, that'd be nice also. Can wordpress do all of this without a lot of tweaking, or would I be best off looking somewhere else?

I am a web dev, so I can help him set this up in the first place, so that's not really a problem, it's more that I don't want him to have to contact me every time he has to add a new client or article.

Apologies if this is the wrong place by the way. I couldn't see any kind of generic cms thread. I've at least had a quick play with wordpress before, so if it can do it, it'd probably end up being the one I recommend.

You could use the personalization features in an A/B testing tool like Optimizely or WVO to accomplish this.

Primpod
Dec 25, 2007

jamming on crusty white

snagger posted:

You could use the personalization features in an A/B testing tool like Optimizely or WVO to accomplish this.
Thanks very much. I'll give them a try tomorrow.

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

What's the proper/best way to handle wp-config.php in regards to deployment and version control? I just started using Beanstalk for deployment, and I'm working alone. There are essentially three different versions of wp-config: dev, staging and production. Should I put it in my .gitignore and just manually recreate it on the staging and production servers?

Heskie
Aug 10, 2002

caiman posted:

What's the proper/best way to handle wp-config.php in regards to deployment and version control? I just started using Beanstalk for deployment, and I'm working alone. There are essentially three different versions of wp-config: dev, staging and production. Should I put it in my .gitignore and just manually recreate it on the staging and production servers?

Take a look at Mark Jaquith's WP Skelton for some ideas. He uses a 'local-config.php' file which has environment specific configs that get included into wp-config (if the file exists on the server/environment) and is ignored by git. Its a common way to go about it.

If you want to go a step further, look at Roots Bedrock. I use this for all my WP projects. It handles environment configuration using the phpdotenv package amongst a bunch of other useful stuff (WordPress core/plugins via Composer, Capistrano, keeping configs out of the web root, sane file structure for Git). The whole project is really cool and I'd recommend it to all devs working with WordPress.

Heskie fucked around with this message at 23:54 on May 8, 2015

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

Great, thanks. I'm going to look into the local-config.php technique. My staging wp-config will be different from my production wp-config, so I may need to create three different version and then tell Beanstalk to ignore the staging version when deploying to production. Or something like that.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
Add your local config to your .gitignore file.

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

Another idea. Would something like this be reliable and suitable?

code:
$domain = $_SERVER['SERVER_NAME'];

if (strpos($domain,'dev') !== false) {
	define('DB_NAME', 'DEV-DB');
	define('DB_USER', 'DEV-USER');
	define('DB_PASSWORD', 'DEV-PASSWORD');
} elseif (strpos($domain,'staging') !== false) {
	define('DB_NAME', 'STAGING-DB');
	define('DB_USER', 'STAGING-USER');
	define('DB_PASSWORD', 'STAGING-PASSWORD');
} else {
	define('DB_NAME', 'PROD-DB');
	define('DB_USER', 'PROD-USER');
	define('DB_PASSWORD', 'PROD-PASSWORD');
}

down with slavery
Dec 23, 2013
STOP QUOTING MY POSTS SO PEOPLE THAT AREN'T IDIOTS DON'T HAVE TO READ MY FUCKING TERRIBLE OPINIONS THANKS

caiman posted:

Another idea. Would something like this be reliable and suitable?

code:
$domain = $_SERVER['SERVER_NAME'];

if (strpos($domain,'dev') !== false) {
	define('DB_NAME', 'DEV-DB');
	define('DB_USER', 'DEV-USER');
	define('DB_PASSWORD', 'DEV-PASSWORD');
} elseif (strpos($domain,'staging') !== false) {
	define('DB_NAME', 'STAGING-DB');
	define('DB_USER', 'STAGING-USER');
	define('DB_PASSWORD', 'STAGING-PASSWORD');
} else {
	define('DB_NAME', 'PROD-DB');
	define('DB_USER', 'PROD-USER');
	define('DB_PASSWORD', 'PROD-PASSWORD');
}

this is a bad idea, but especially if you look for "dev" instead of ".dev." or "dev."

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

down with slavery posted:

this is a bad idea, but especially if you look for "dev" instead of ".dev." or "dev."

Yeah adding the . is better. But why is it otherwise a bad idea?

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.
Because you shouldn't be putting credentials into your VCS. You don't want to accidentally share that information with someone else, or send it over the wire, and if you want to give someone access to your code, you're suddenly giving them access to all your creds, too.

Instead, remove the file from tracking (git rm), exclude the file (.gitignore), create a template file which will contain your credentials (like "wp-config.php.dist"), and on each deployment (dev, test, production) you should use a copy of that dist file to contain your actual credentials.

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

Makes sense. In my ideal dream world I would only ever use Git/Beanstalk to put files on the server, but I guess doing some manual file creation - at least during initial setup - is unavoidable.

huhu
Feb 24, 2006
I've got WordPress running on a WAMP server on my computer. I'm playing around with Twenty Fourteen, and have it set as my site's theme. I had an issue with a static page's width and so I followed the advise here made the change in the file located at "C:\wamp\www\wordpress-trunk\wp-content\themes\twentyfourteen\style.css" and save. I refresh the static page I'm working on and nothing changes. I shut down the server and start it again, still nothing. I've also messed around with several other CSS properties for random things on the page and throughout the website but nothing is changing. What am I missing here?

down with slavery
Dec 23, 2013
STOP QUOTING MY POSTS SO PEOPLE THAT AREN'T IDIOTS DON'T HAVE TO READ MY FUCKING TERRIBLE OPINIONS THANKS
Make sure you're holding shift when you refresh to clear the browser's cache

huhu
Feb 24, 2006

down with slavery posted:

Make sure you're holding shift when you refresh to clear the browser's cache
So that works, thanks. Does that mean that a person viewing a website wouldn't see changes made to the CSS unless they clear their browser's cache?

spiritual bypass
Feb 19, 2008

Grimey Drawer
Right, they won't see it until their browser requests a new version of it. Clearing the cache comes down to a browser-server interaction that I can't explain here. Read this: http://stackoverflow.com/questions/460389/browser-caching-of-css-files

Adbot
ADBOT LOVES YOU

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.

huhu posted:

So that works, thanks. Does that mean that a person viewing a website wouldn't see changes made to the CSS unless they clear their browser's cache?

Yes, you'll likely need to perform "Cache busting" to ensure the item the client-side has cached is reloaded from you, rather than cache.
On a good system this would probably use an ETag, but you're likely only setting Expires headers. See ETag vs Header Expires on SO for a bit more detail.

Check out Busted plugin for a super-simple cache buster, but really you'd expect to be using something like W3-Total-Cache which is a broad all-in-one optimisation plugin (i think it has its own cache busting?). It is for caching what Wordpress SEO by Yoast is for SEO.

Also, if you run into local weirdness with caching and you're using Chrome, besides the keyboard shortcuts you can also press F12 to bring up Dev Tools, and then you can right click the refresh icon for access to the refresh controls. "Empty Cache and Hard Reload" is the nuclear option.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply