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
kedo
Nov 27, 2007

Shadowstar posted:

Anyone know a better guide than the one in the codex for optimizing Wordpress? We're stretching up to 100,000k monthly views on a site with several high-powered plugins and it's pushing our VPS way too hard. I'm doing tons of stuff on the server side that is helping but I think I need more pointers on optimizing the WP and plugin code itself somehow.

I use WP Super Cache, which is great, but we have a ton of logged in users who I can't serve cached pages to due to cookies and whatnot. :(

100,000k monthly views doesn't really seem like it should be enough to kill a VPS unless you're on a real crappy one...? Might be time for a change of host.

Adbot
ADBOT LOVES YOU

Shadowstar
May 19, 2003

~~~~~~~~~
Sorry that many visitors. Views is like 3x-5x that. Ill have to check when not on my phone.

I'm on Wiredtree and had to upgrade from VPS to a Hybrid. Not-cached pages are still taking way too long to load. :-(

Edit: yeah views over 500,000 although maybe 10% of that was a botnet I just squashed.

Shadowstar fucked around with this message at 15:58 on May 15, 2013

kedo
Nov 27, 2007

Shadowstar posted:

Sorry that many visitors. Views is like 3x-5x that. Ill have to check when not on my phone.

I'm on Wiredtree and had to upgrade from VPS to a Hybrid. Not-cached pages are still taking way too long to load. :-(

Edit: yeah views over 500,000 although maybe 10% of that was a botnet I just squashed.

Ah, well that's a different story then. However depending on how complex your site is, your server may still be the problem. What pieces are being pushed too hard... RAM? That seems to be a problem I see pretty often with really heavy server side sites. Otherwise I don't have a solution for you, sorry. :(

I'm using master and child themes on a bunch of sites and have used them for a looong time, but just ran into an odd bug that I hadn't noticed before. When enabling the child theme, my default sidebar (full of widgets) got moved to an "inactive sidebar", and the generic WP one was inserted in its place. My child theme does not have its own functions.php or sidebar.php, so I'm not entirely sure why this is happening. Any ideas? Shouldn't the child theme just be using the master theme's functions.php?

Here's the sidebar declaration in the master functions.php:

code:
if (function_exists('register_sidebar'))
{
	// Define Sidebar Widget Area 1
	register_sidebar(array(
		'name' => __('Default sidebar', 'elementa'),
		'description' => __('A long description that breaks tables', 'elementa'),
		'id' => 'default-sidebar',
		'before_widget' => '<div id="%1$s" class="%2$s">',
		'after_widget' => '</div><div class="hr fullWidth"></div>',
		'before_title' => '', // no headlines, added by a filter.
		'after_title' => ''
	));
}

Gyshall
Feb 24, 2009

Had a couple of drinks.
Saw a couple of things.

Shadowstar posted:

Sorry that many visitors. Views is like 3x-5x that. Ill have to check when not on my phone.

I'm on Wiredtree and had to upgrade from VPS to a Hybrid. Not-cached pages are still taking way too long to load. :-(

Edit: yeah views over 500,000 although maybe 10% of that was a botnet I just squashed.

Look into moving to Amazon if you haven't. I have a site that gets similar hits per month and moving them off to their own server was great.

I also moved them from a traditional LAMP stack to a NGINX powered one. Not the exact article but this guid eis pretty good about it -

https://www.digitalocean.com/community/articles/how-to-install-wordpress-nginx-php-and-varnish-on-ubuntu-12-04

Also depending on the theme you're using, that could probably have some optimization done. I've seen random themes from Themeforest just absolutely poo poo the bed when put under a high enough load.

Lastly the cache plugins are a quick way to "fix" a slow site, although I tend to avoid them if I can and do everything at the server level.

Shadowstar
May 19, 2003

~~~~~~~~~

kedo posted:

Ah, well that's a different story then. However depending on how complex your site is, your server may still be the problem. What pieces are being pushed too hard... RAM? That seems to be a problem I see pretty often with really heavy server side sites. Otherwise I don't have a solution for you, sorry. :(

I'm using master and child themes on a bunch of sites and have used them for a looong time, but just ran into an odd bug that I hadn't noticed before. When enabling the child theme, my default sidebar (full of widgets) got moved to an "inactive sidebar", and the generic WP one was inserted in its place. My child theme does not have its own functions.php or sidebar.php, so I'm not entirely sure why this is happening. Any ideas? Shouldn't the child theme just be using the master theme's functions.php?

Here's the sidebar declaration in the master functions.php:

code:
if (function_exists('register_sidebar'))
{
	// Define Sidebar Widget Area 1
	register_sidebar(array(
		'name' => __('Default sidebar', 'elementa'),
		'description' => __('A long description that breaks tables', 'elementa'),
		'id' => 'default-sidebar',
		'before_widget' => '<div id="%1$s" class="%2$s">',
		'after_widget' => '</div><div class="hr fullWidth"></div>',
		'before_title' => '', // no headlines, added by a filter.
		'after_title' => ''
	));
}

It seems like mostly CPU load. RAM is hardly being scratched. Maybe there's more I can be doing to get the site to use the available RAM? I'm using APC and the Wordpress plugin, I don't know how else to encourage more effective database caching.

I think Wordpress always does that when switching themes, but I could be wrong.

Gyshall posted:

Look into moving to Amazon if you haven't. I have a site that gets similar hits per month and moving them off to their own server was great.

I also moved them from a traditional LAMP stack to a NGINX powered one. Not the exact article but this guid eis pretty good about it -

https://www.digitalocean.com/community/articles/how-to-install-wordpress-nginx-php-and-varnish-on-ubuntu-12-04

Also depending on the theme you're using, that could probably have some optimization done. I've seen random themes from Themeforest just absolutely poo poo the bed when put under a high enough load.

Lastly the cache plugins are a quick way to "fix" a slow site, although I tend to avoid them if I can and do everything at the server level.

Cool I will look into Amazon if we decide to switch servers again. I want to give it at least a few weeks on this hybrid.

Are there tools to help with debugging themes? That could certainly be part of the problem. It's a pretty janky theme with some unnecessary and possibly inefficient code lying around (I didn't build it, but i have been trying to optimize it as we go).

Gyshall
Feb 24, 2009

Had a couple of drinks.
Saw a couple of things.
Firebug, or PageSpeed might come in use for you.

slartibartfast
Nov 13, 2002
:toot:

Shadowstar posted:

Anyone know a better guide than the one in the codex for optimizing Wordpress? We're stretching up to 100,000k monthly views on a site with several high-powered plugins and it's pushing our VPS way too hard. I'm doing tons of stuff on the server side that is helping but I think I need more pointers on optimizing the WP and plugin code itself somehow.

I use WP Super Cache, which is great, but we have a ton of logged in users who I can't serve cached pages to due to cookies and whatnot. :(

The single best thing I ever did was stop Apache from serving my cached files.

If your host will allow it, consider Nginx or Litespeed for serving everything that's not PHP. There are various guides around the web for this, but it basically boils down to this: Apache is overkill for serving your static cached files.

The other killer upgrade you can do is to put /wp-upload/ on a CDN of some kind. That's more $$$ per month, but again, it reduces the number of files being served by your webserver.

EDIT: You're on a hybrid with WiredTree? So am I. :) Upgrade to Litespeed if you're not already running it. Seriously. It's like $10/mo and worth every penny.

Shadowstar
May 19, 2003

~~~~~~~~~
Yes I'm at Wiredtree. I already use litespeed and cloudflare serves our static files. The problem seems to be something in how the site code is being run. Today we are upgrading MySQL, which sadly someone at Wiredtree botched considerably. Site has been down for hours. Now it's up on Apache but barely moving while they fix litespeed up.

Ned
May 23, 2002

by Hand Knit

Shadowstar posted:

Anyone know a better guide than the one in the codex for optimizing Wordpress? We're stretching up to 100,000k monthly views on a site with several high-powered plugins and it's pushing our VPS way too hard. I'm doing tons of stuff on the server side that is helping but I think I need more pointers on optimizing the WP and plugin code itself somehow.

I use WP Super Cache, which is great, but we have a ton of logged in users who I can't serve cached pages to due to cookies and whatnot. :(

You need to get away from a VPS and move to AWS or some sort of solution where you can set up the appropriate stack for serving WP quickly.

My preferred stack right now is Nginx + PHP-FPM on AWS with Memcached running on the server. If you want to be fancy you can stick MySQL on a micro instance and connect to it over TCP/IP. I also suggest tossing Pagespeed on top of Nginx to make your pages optimized to for quick downloads. Pagespeed does some really amazing things!

Nginx is great because it can serve up your static files very quickly. PHP-FPM isn't as fast as Apache for pure PHP stuff but it is easier to run than having Nginx act as a reverse proxy with Apache handling your PHP requests. Memcached should be used in combination with Batcache and you'll want to look into using things like set_transient and get_transient for storing commonly accessed objects and html chunks. If you can get away with the main calls on each page being the post info and comments the site won't rely on the DB as much which is the bottleneck most sites run into once they get a decent amount of traffic.

nonathlon
Jul 9, 2004
And yet, somehow, now it's my fault ...
My searches aren't coming up with anything but this plugin should exist. So:

When I was running my website on Plone (don't laugh) there was a tool that handled redirections for content that had moved. That is, you moved that page and if someone visited the old URL, they'd get an appropriate redirection. Simple. So what's the Wordpress equivalent?

Gyshall
Feb 24, 2009

Had a couple of drinks.
Saw a couple of things.
I've been using the plugin Redirection for that purpose for as long as I can remember.

nonathlon
Jul 9, 2004
And yet, somehow, now it's my fault ...
That'll do nicely, thanks.

Shadowstar
May 19, 2003

~~~~~~~~~
Well one of my major problems turned out to be the Wordpress Popular Posts plugin. This thing does a great job but I guess once the database of stats gets big enough it becomes increasingly unwieldy. Scrapping it eliminated the freezes in service I was seeing. Pages still take longer than I like to load but that's just a bit more fine tuning to do from here.

In case anyone's looking for a good popular posts plugin I replaced it with this one, which is awesome. It has most of the same functionality of WPP but it draws straight from your Analytics data instead of making its own view counts, which is so much better for all the obvious reasons.

DizzyBum
Apr 16, 2007


What's everyone's best practice for upgrading Wordpress while keeping everything locked down and secure? We have some scattered Apache and nginx servers with WP instances that I'm in the process of updating. I've been keeping it as simple as possible:

- Back up the Wordpress folder
- Dump the database
- Check file/folder permissions, remove world write permissions, fix 777s
- chown everything to apache:apache or whatever works on the system
- Login to Wordpress, update plugins, update Wordpress

My last company would chmod 777 on WP directories when things didn't quite work the way they wanted and that bothered me a lot.

Gyshall
Feb 24, 2009

Had a couple of drinks.
Saw a couple of things.
A better question would be - why are you having to change/chown stuff after upgrading? I've never had to do that.

kedo
Nov 27, 2007

Gyshall posted:

A better question would be - why are you having to change/chown stuff after upgrading? I've never had to do that.

Agreed... the only directory you should ever have to change permissions on is wp-content and potentially some of the sub-directories. WordPress core directories/files should never need permission modifications unless your server is set up weird.

Other than that your process is nearly identical to my own.

Small White Dragon
Nov 23, 2007

No relation.
I need to bulk import a bunch of articles into wordpress from a specialized legacy CMS. Anyone done direct SQL INSERTs into the post table before? Any gotchas to be aware of?

Ned
May 23, 2002

by Hand Knit

Small White Dragon posted:

I need to bulk import a bunch of articles into wordpress from a specialized legacy CMS. Anyone done direct SQL INSERTs into the post table before? Any gotchas to be aware of?

Don't do direct SQL inserts if you can avoid them. I prefer to use the WP code like wp_insert_post so you can handle things like taxonomies more easily.

If you can spit out a CSV and have some PHP parse that and then use the WP functions for inserting posts things might go more smoothly.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

Just throwing this out there quick, do you wordpress guys have any opinions on a .net solution that is 'most like' wordpress? I've a client who insists on getting a .net blog up >today< to replace their previous Wordpress install. It's on a dedicated server that I control completely, so preferably something self-hosted.

EDIT-Sorry guys, had to do this one on a timeline. Went with BlogEngine.net in case anyone is curious. Pretty easy to set up and modify, had it going in about 2 hours.

Scaramouche fucked around with this message at 01:01 on May 25, 2013

Alfalfa
Apr 24, 2003

Superman Don't Need No Seat Belt
Is there a way to link sub menu options in the nav bar to specific locations of a page?

For example, in my nav bar I have a "Programs" tab.
When that is hovered over, I would like for a sub-menu of all the different programs to pop up so one of the can be selected.

But when one is selected I would like it to go to a specific location listing that program on the programs page which lists all the programs, instead of have a separate page for each individual program.

Ned
May 23, 2002

by Hand Knit
I guess you can make the subnav links go to anchors on a page and set the anchors on the page properly. Doesn't seem complex and nothing you have to do at a system level.

The only thing is you'll have to type the appropriate url in rather than picking it from a list.

kedo
Nov 27, 2007

Ned posted:

I guess you can make the subnav links go to anchors on a page and set the anchors on the page properly. Doesn't seem complex and nothing you have to do at a system level.

The only thing is you'll have to type the appropriate url in rather than picking it from a list.

Yup, this is what you want to do. To expand on it a little, your menu will need to be a custom one you created in Appearance > Menus (ie. can't just be the default wp_list_pages), and the links will need to be custom links, as Ned suggests, rather than any of the selectable pages listed there.

If your anchor half way down the page is called "foobar" for example, your URL would be something like: http://yoursite.com/programs/#foobar

PS. If you're using HTML 5 note that <a name="foobar"></a> has been deprecated and may eventually be unsupported. Use ids instead.

\/\/ Yeah I know. Amazing how many people still use them though... sadly it's still the easiest way I'm aware of for clients to make internal page navigation themselves, as TinyMCE includes an anchor button with a name field.

kedo fucked around with this message at 16:30 on May 29, 2013

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

kedo posted:

Yup, this is what you want to do. To expand on it a little, your menu will need to be a custom one you created in Appearance > Menus (ie. can't just be the default wp_list_pages), and the links will need to be custom links, as Ned suggests, rather than any of the selectable pages listed there.

If your anchor half way down the page is called "foobar" for example, your URL would be something like: http://yoursite.com/programs/#foobar

PS. If you're using HTML 5 note that <a name="foobar"></a> has been deprecated and may eventually be unsupported. Use ids instead.

Using element IDs as the target has been around since HTML4/ XHTML, so folks should have stopped using name= long ago.

Delzuma
Dec 4, 2004

Question that shouldn't be too hard for anyone with Wordpress experience...

I am currently remaking a Drupal site in Wordpress; https://www.fpsba.org to https://www.fpsba.us (I'll move it back to the .org address when I'm done recreating it).

In drupal I used custom content types and views to create a "business card" content type. This allowed me to upload an image and attach an url to it which would then be added to my Local Businesses page. Does such an arrangement exist in Wordpress? I know I can just upload the imaes and create a gallery but the auto-alphabetizing and direct linking is perfect for my needs and I'd like to keep the experience as similar as possible.

kedo
Nov 27, 2007

Delzuma posted:

Question that shouldn't be too hard for anyone with Wordpress experience...

I am currently remaking a Drupal site in Wordpress; https://www.fpsba.org to https://www.fpsba.us (I'll move it back to the .org address when I'm done recreating it).

In drupal I used custom content types and views to create a "business card" content type. This allowed me to upload an image and attach an url to it which would then be added to my Local Businesses page. Does such an arrangement exist in Wordpress? I know I can just upload the imaes and create a gallery but the auto-alphabetizing and direct linking is perfect for my needs and I'd like to keep the experience as similar as possible.

You could create a custom post type for these items and include the images as post thumbnails.

Or, if these don't need to be a feed (which is really the only reason why you'd do it with posts), you could super-easily accomplish this using the Advanced Custom Fields plugin + a static page + a custom page template for that page. I'd probably achieve it using a repeater, image and text fields (text to house the URL, repeater to allow you to add new ones to the page on demand).

PS. Advanced Custom Fields is literally the best plugin in existence and it will make everything you do in WordPress 1000x easier.

Delzuma
Dec 4, 2004

kedo posted:

You could create a custom post type for these items and include the images as post thumbnails.

Or, if these don't need to be a feed (which is really the only reason why you'd do it with posts), you could super-easily accomplish this using the Advanced Custom Fields plugin + a static page + a custom page template for that page. I'd probably achieve it using a repeater, image and text fields (text to house the URL, repeater to allow you to add new ones to the page on demand).

PS. Advanced Custom Fields is literally the best plugin in existence and it will make everything you do in WordPress 1000x easier.

Thanks, I've worked in Drupal for years now, mostly tooling around nothing major. But I've gotten sick of waiting for them to start focusing on UX so I'm giving Wordpress a go. So far it's pretty nice but different enough where I've got to relearn how to do almost everything.

Pythagoras a trois
Feb 19, 2004

I have a lot of points to make and I will make them later.
I need a couple of nice looking themes for the civic hacking event this weekend so I can put together a couple of non-profit websites.

What (free as in beer) theme resources can I trust?

Gyshall
Feb 24, 2009

Had a couple of drinks.
Saw a couple of things.
What do you mean by resources?

Some good free themes that I use on a monthly basis:

http://themes.simplethemes.com/skeleton/
http://wordpress.org/themes/responsive
http://wordpress.org/themes/atahualpa
http://wordpress.org/themes/attitude
http://wordpress.org/themes/custom-community
http://wordpress.org/themes/catch-box

CrushedWill
Sep 27, 2012

Stand it like a man... and give some back
I am in the process of setting up a photo site. I bought hosting from Apis (in SA-Mart, fantastic service/speed/price), uploaded WP, and even bought myself a 'portfolio framework' theme. After doing all of that, I'm finding myself stuck and unable to do what I would like to do. What is that? I'm glad you asked.

The theme I bought supports portfolios and portfolio tags. It even includes a nifty portfolio shortcode that can limit the display of portfolios based on category. What it won't do is allow me to specify granularity to the client level. Given that I am hoping to have multiple artists' work on the site, it sure would be nice to be able to specify that in shortcode call, i.e.

[portfolio_classic column="6" posts_per_page="20" $client="Sam Smith"]

Now I did think about the fact that I could simply create a different portfolio category for each artist, but that doesnt allow for sharing portfolio categories between artists (i.e. Sam Smith and Pete Smith both have portfilios tagged with Family).

The theme author doesn't support theme mods outside of original functionality, nor would I expect them to as they have a business to run.

I'm not even sure what question to ask here. Does anybody know of multi-artist themes available? Should I look elsewhere from WP? Such a modification seems fairly straight forward, but I learned a long time ago that nothing in coding is ever straight forward.

kedo
Nov 27, 2007

CrushedWill posted:

I am in the process of setting up a photo site.

What's the theme? Though I guess if it costs $$$ I probably can't find it.

Okay, so if you're uploading images as posts, and then displaying categorized posts on pages with shortcodes, one way to do what you're asking (as far as I can figure) is with tags, like you suggest.

CrushedWill posted:

(i.e. Sam Smith and Pete Smith both have portfilios tagged with Family).

If you tag posts logically, you could then modify that plugin (or perhaps some function in functions.php, hard to know where they put it) to get posts based on tag instead of category. You could probably copy and paste the function that gets the category and find + replace each instance of a category search with a tag search. Make it accessible via the shortcode and viola!

If that's too complex for you (lots of PHP), SA mart is your friend again. This is all just a guess since it's really impossible to know what's going on with your theme without seeing some code (read: post some code).

Then again, maybe something like this already exists in the theme for all I know!



e: Far, far simpler solution: have you considered just making a new category and uploading the images all over again? It's a less elegant solution and there'd be duplicate images on your site, but it'd be way easier.

kedo fucked around with this message at 03:04 on Jun 8, 2013

CrushedWill
Sep 27, 2012

Stand it like a man... and give some back

kedo posted:

What's the theme? Though I guess if it costs $$$ I probably can't find it.

Dano - http://themeforest.net/item/dano-multipurpose-responsive-wordpress-theme-/3676334

As I said, the author has been responsive, but isn't interested in providing advice so far on what to modify.

quote:

Okay, so if you're uploading images as posts, and then displaying categorized posts on pages with shortcodes, one way to do what you're asking (as far as I can figure) is with tags, like you suggest.

If you tag posts logically, you could then modify that plugin (or perhaps some function in functions.php, hard to know where they put it) to get posts based on tag instead of category. You could probably copy and paste the function that gets the category and find + replace each instance of a category search with a tag search. Make it accessible via the shortcode and viola!

If that's too complex for you (lots of PHP), SA mart is your friend again. This is all just a guess since it's really impossible to know what's going on with your theme without seeing some code (read: post some code).

Then again, maybe something like this already exists in the theme for all I know!



e: Far, far simpler solution: have you considered just making a new category and uploading the images all over again? It's a less elegant solution and there'd be duplicate images on your site, but it'd be way easier.

This is where I get confused. This theme (and others like it) utilize portfolio categories. These categories are specific to the portfolio and have nothing to do with the blog categories associated with posts. Instead of trying to explain the issue, let me show it to you. Excuse the mess, I didnt start modifying it for my use because I am trying to tackle how to only display portfolios from a specific artist (known as client right now):

http://brokenmortal.com/test-port/

That is a test page which illustrates the problem. Both Pete Jones and Bob Smith have a gallery associated with the portfolio category "Family" Since the shortcode specifically designates the category Family as being allowable in both the portfolio calls for Pete Jones and Bob Smith, the Pete Jones gallery shows up in Bob Smiths listing.

The more I think about this, the more I think it might just be a good idea to create separate categories for each artist (i.e. PJJ-Family and BSS-Family) instead of having the artist tag, that would make a detailed listing possible. Ugly category tags, but Im not sure how else I can keep artists work separate while maintaining portfolio tags.


E: NM, I just realized I can make the slug name different even know the display name is the same. So while both the portfolio categories appear to be "Family", they are different categories. My apologies for confusing the gently caress out of everybody.

E2: Page isnt borked and is working properly. The only place the difference is noticed is in the URLS for the two different family tags, works for me :)

CrushedWill fucked around with this message at 06:32 on Jun 8, 2013

Heskie
Aug 10, 2002

CrushedWill posted:

Portfolio problems

I may misunderstand, but does your theme use custom post types for the Portfolios and Clients?

I recently started using Posts 2 Posts, a plugin that lets you assign many-to-many relationships between Post Types. You'd be able to associate Portfolios with Clients on the add/edit page in the admin, and automatically display the appropriate portfolios and galleries on that page. No shortcodes required.

I've found combining Posts 2 Posts, Custom Post Types and Advanced Custom Fields opens a lot of doors.

CrushedWill
Sep 27, 2012

Stand it like a man... and give some back

Heskie posted:

I may misunderstand, but does your theme use custom post types for the Portfolios and Clients?

I recently started using Posts 2 Posts, a plugin that lets you assign many-to-many relationships between Post Types. You'd be able to associate Portfolios with Clients on the add/edit page in the admin, and automatically display the appropriate portfolios and galleries on that page. No shortcodes required.

I've found combining Posts 2 Posts, Custom Post Types and Advanced Custom Fields opens a lot of doors.

Part of the problem I am having with WP is that everything works differently than other packages (like EE) that I am a bit more familiar with. So to answer your question, I'm not sure what kind of post types are used with the theme I purchased. Example: I'm not sure if portfolios and portfolio categories are a standard WP feature, all I know is that they appear in the admin control panel after the theme is installed.

Another thing that is very confusing to me is that the trail of PHP is difficult for me to follow, partly because I am not an advanced PHP programmer and partly because I suspect that WP has standards which I don't comprehend. WP is very different than the CSS frameworks I was considering using, that is both a good and a bad thing.

I have the basics of the site working well enough for now. Although certain things wont work well without modification and introducing separate portfolio categories for each artist introduces other issues (especially when displaying multiple artists on the same page), it will do until I increase my level of understanding on how wp works or until I can find somebody to modify it.

Lastly, I'm not sure what standard policy is when asking somebody to modify a theme. I'm somewhat leery of either sending a coder a copy of a theme they didn't buy nor am I sure if I want somebody mucking around in my admin panel (I've seen the effect that a random malicious douchebag can have on a site when offering to 'help').

Ned
May 23, 2002

by Hand Knit

CrushedWill posted:

Lastly, I'm not sure what standard policy is when asking somebody to modify a theme. I'm somewhat leery of either sending a coder a copy of a theme they didn't buy nor am I sure if I want somebody mucking around in my admin panel (I've seen the effect that a random malicious douchebag can have on a site when offering to 'help').

Send them a copy of the theme and an export of your content + the contents of your wp-uploads folder. Any theme you purchase should be GPL so you can do what you want with it as long as you include the license.

Stoph
Mar 19, 2006

Give a hug - save a life.
Tons of paid WordPress themes aren't GPL. Usually the licensing on sites such as ThemeForest is done so that you are only allowed to use the theme on a single website. I wouldn't worry about any issues with providing someone a copy of the theme so they can make changes for you. That pretty much happens all the time.

Alfalfa
Apr 24, 2003

Superman Don't Need No Seat Belt
I'm having an issue trying to get text to wrap around images in a page instead of starting at the bottom of the image.

This is what it currently looks like when I try to add the pic to the left:


Here is what the basic code looks like
code:
<h3><strong><span style="color: #cc0000;"><img class="alignleft  wp-image-1799" alt="david profile" src="http://genesisstrength.com/wp-content/uploads/2013/05/david-profile-190x300.png" width="114" height="180" />David Claiborne - Owner - Trainer</span></strong></h3>
Any suggestions on something I need to fix or might be screwed up in the theme files I should look for?

The page I'm trying to get it to work on is http://genesisstrength.com/about/coaches/

Wheeze
Jul 31, 2007

You need to define alignleft, alignright, and aligncenter in your theme CSS. Like so:

code:
img.alignright {float:right; margin:0 0 1em 1em}
img.alignleft {float:left; margin:0 1em 1em 0}
img.aligncenter {display: block; margin-left: auto; margin-right: auto}
.alignright {float:right; }
.alignleft {float:left; }
.aligncenter {display: block; margin-left: auto; margin-right: auto}
Adjust margins to taste.

a lovely poster
Aug 5, 2011

by Pipski
Is there an easy way to figure out which template files are being used for a particular page being viewed?

kedo
Nov 27, 2007

a lovely poster posted:

Is there an easy way to figure out which template files are being used for a particular page being viewed?

Put a unique string of characters in a comment on each template file, then view source.

There may be some more WordPressey way to do it, but :effort:

e: Also assuming the site is constructed in a logical manner, you should be able to narrow it down beforehand so you only have do that on a few files.


e2: Googled

code:
global $wp_query;

$template_name = get_post_meta( $wp_query->post->ID, '_wp_page_template', true );
apparently works.

kedo fucked around with this message at 02:14 on Jun 12, 2013

Adbot
ADBOT LOVES YOU

lunar detritus
May 6, 2009


a lovely poster posted:

Is there an easy way to figure out which template files are being used for a particular page being viewed?

body_class will tell you which page template is being used.

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