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
Claes Oldenburger
Apr 23, 2010

Metal magician!
:black101:

Okay this is something i've been fighting with for a while. Me and a friend have been working on this website on and off, and have a subfolder with wordpress in it. We have the loop on our index.php page even though it is separate from the blog pages or theme.

The posts we make style properly within the theme pages, but not when it shows on the front page. When I center align an image when i'm writing the post, the image is no longer aligned when it shows up on the front page, however it IS aligned if i click the title to open it up within the wordpress theme.

Is there something I need to add to the content part of the loop to get it to style as if it was a part of the theme?

Adbot
ADBOT LOVES YOU

biochemist
Jun 2, 2005

Who says we don't have backbone?
So I started off in the PHP thread with a question involving mySQL, but my needs evolved and I was pointed here.

I'd like to have each post on a page of mine contain a list of variable assignments that I can just go through and fill out, almost like a form. Then, on the template, each of those variables are called and they're inserted into my template the way I want. This would just make things much easier- if I want to keep everything looking the same, I only have to change content-single.php rather than go through sixty or some posts and copy-paste new code into each.

The post content is called with
code:
<?php the_content(); ?>
But it doesn't seem to pass variables back to the page template (scope problem?). Wordpress doesn't natively support PHP in the posts, but I found a little plugin that lets me insert PHP between tags. I'm by no means an expert in this stuff, just confident enough to give different things a try until they kinda work. If anyone can point me in the right direction, or offer an alternative, I'd really appreciate it.

Twiin
Nov 11, 2003

King of Suck!

biochemist posted:

I'd like to have each post on a page of mine contain a list of variable assignments that I can just go through and fill out, almost like a form. Then, on the template, each of those variables are called and they're inserted into my template the way I want.

What you want are Custom Fields:

http://codex.wordpress.org/Custom_Fields

Alfalfa
Apr 24, 2003

Superman Don't Need No Seat Belt
I want to rebuild a website using a different theme, but it will take a few days/weeks to tweak it so it looks correct.

What is the best way to do that while people who go to the website still see the current version, and then transfer the theme, settings, and changes to the website all at one time once I finish?

Apok
Jul 22, 2005
I have a title now!

Alfalfa posted:

I want to rebuild a website using a different theme, but it will take a few days/weeks to tweak it so it looks correct.

What is the best way to do that while people who go to the website still see the current version, and then transfer the theme, settings, and changes to the website all at one time once I finish?

Download WAMP (Windows), MAMP (Mac), or LAMP (Linux) which will allow you to host a local web server.

Make a Wordpress install on your computer and edit the theme locally. You can even import your content so that it looks the same. When you're satisfied with how the new theme looks/behaves, then upload the theme folder to your FTP, activate through themes, and change the header/background/etc to what you want.

dustin10
Jul 24, 2003

Alfalfa posted:

I want to rebuild a website using a different theme, but it will take a few days/weeks to tweak it so it looks correct.

What is the best way to do that while people who go to the website still see the current version, and then transfer the theme, settings, and changes to the website all at one time once I finish?

If you want I can set you up a little subdomain on my server with a worpdress install you can fool around with. Email me.

Gyshall
Feb 24, 2009

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

Alfalfa posted:

I want to rebuild a website using a different theme, but it will take a few days/weeks to tweak it so it looks correct.

What is the best way to do that while people who go to the website still see the current version, and then transfer the theme, settings, and changes to the website all at one time once I finish?

Seconding the WAMP/MAMP/LAMP stack - install it locally, enjoy 1 second page refresh times.

cocteau
Nov 28, 2005

The best Darcy.

dustin10 posted:

If you want I can set you up a little subdomain on my server with a worpdress install you can fool around with. Email me.

Or he could just set up a new WP install on a subdomain of his own if he wanted to develop it live...

Alfalfa
Apr 24, 2003

Superman Don't Need No Seat Belt

dustin10 posted:

If you want I can set you up a little subdomain on my server with a worpdress install you can fool around with. Email me.

Would this be the same as if I have my normal domain - https://www.genesis-ap.com and just install wordpress on like https://www.genesis-ap.com/test

If so I can do that, but how would I transfer over the theme with all the settings and changes done to it, as well as the data to https://www.genesis-ap.com after I finish?

cocteau
Nov 28, 2005

The best Darcy.

Alfalfa posted:

Would this be the same as if I have my normal domain - https://www.genesis-ap.com and just install wordpress on like https://www.genesis-ap.com/test

If so I can do that, but how would I transfer over the theme with all the settings and changes done to it, as well as the data to https://www.genesis-ap.com after I finish?

First question: yes.

Second question: you'd do it just like Apok described. Or you could move the whole site/database by following these instructions: http://www.billerickson.net/how-to-move-your-wordpress-website/

Edit: since you're just wanting to change the theme, I really wouldn't worry about migrating content. That's just a pain in the rear end that isn't worth the effort, unless the new theme represents a substantially different way of organizing content.... and even then, I'd question whether it was worth it.

Apok
Jul 22, 2005
I have a title now!

Alfalfa posted:

If so I can do that, but how would I transfer over the theme with all the settings and changes done to it, as well as the data to https://www.genesis-ap.com after I finish?

If you open the folder in which Wordpress was installed, follow the following path:

wordpress > wp-content > themes

If you haven't messed around with anything in the themes folder yet, you'll see

twentyten
twentyeleven


folders.

Any themes or changes you make need to go in a new folder within the themes folder.

Here's some useful content for how to edit the existing themes:

http://codex.wordpress.org/Child_Themes

You can make marvelous looking Wordpress subthemes by editing the CSS of the twentyten or twentyeleven themes.

simcole
Sep 13, 2003
PATHETIC STALKER
I'm having a weird problem. I put up a wordpress blog on my site in a subdomain. blog.mysite.com
Directory wise it's mysite.com/blog

I bought a new domain name and added it to my webhost and then did a redirect to the blog. So newdomainname.com (redirect)-> blog.mysite.com

I want to eliminate the redirect and make it so people see newdomainname.com and not the subdomain in the url bar. What do I do, because googling isn't showing me what I need.

Apok
Jul 22, 2005
I have a title now!

simcole posted:

I'm having a weird problem. I put up a wordpress blog on my site in a subdomain. blog.mysite.com
Directory wise it's mysite.com/blog

I bought a new domain name and added it to my webhost and then did a redirect to the blog. So newdomainname.com (redirect)-> blog.mysite.com

I want to eliminate the redirect and make it so people see newdomainname.com and not the subdomain in the url bar. What do I do, because googling isn't showing me what I need.

If you open up the control panel for your new domain, you should see a forwarding option.

You'll want to domain forward with masking.

http://help.godaddy.com/article/422

This article has a nice table which explains the differences.



Apok fucked around with this message at 15:46 on Dec 7, 2011

Broccoli Must Die!
Aug 12, 2004

Meow.

Alfalfa posted:

I want to rebuild a website using a different theme, but it will take a few days/weeks to tweak it so it looks correct.

What is the best way to do that while people who go to the website still see the current version, and then transfer the theme, settings, and changes to the website all at one time once I finish?

There's a plugin that will do this - you see one theme, everyone else sees the one you want them to see.

Unfortunately it's only based on themes, and not different settings. If you're willing to work with that, then it's an easy solution.

I think it's called Theme Preview.

indulgenthipster
Mar 16, 2004
Make that a pour over

biochemist posted:

The post content is called with
code:
<?php the_content(); ?>
But it doesn't seem to pass variables back to the page template (scope problem?).

get_the_content(); is what you are looking for: http://codex.wordpress.org/Function_Reference/get_the_content

abelwingnut
Dec 23, 2002


A client has a site at x.com. I have been developing the update to this with WordPress at x.com/wordpress. We're nearly ready to fully move x.com/wordpress to x.com. The previous developer of the site that still owns x.com and has been allowing me to edit at /wordpress on their servers. Essentially he wants to bridge the gap using a PHP header() redirect.

Is this reasonable or is it worth pursing a full relocation of assets or an .htaccess redirect?

hedgecore
May 2, 2004

Abel Wingnut posted:

A client has a site at x.com. I have been developing the update to this with WordPress at x.com/wordpress. We're nearly ready to fully move x.com/wordpress to x.com. The previous developer of the site that still owns x.com and has been allowing me to edit at /wordpress on their servers. Essentially he wants to bridge the gap using a PHP header() redirect.

Is this reasonable or is it worth pursing a full relocation of assets or an .htaccess redirect?

I think you want this second method - "Using a pre-existing subdirectory install".

http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

Apok
Jul 22, 2005
I have a title now!

Abel Wingnut posted:

A client has a site at x.com. I have been developing the update to this with WordPress at x.com/wordpress. We're nearly ready to fully move x.com/wordpress to x.com. The previous developer of the site that still owns x.com and has been allowing me to edit at /wordpress on their servers. Essentially he wants to bridge the gap using a PHP header() redirect.

Is this reasonable or is it worth pursing a full relocation of assets or an .htaccess redirect?

If what you're saying is that your wordpress install is ready to go and you want the site to display the wordpress site in the root domain, all you have to do is:

Dashboard > Settings > General

Leave Wordpress address (URL) as http://x.com/wordpress
Change Site address (URL) to http://x.com

(You can enforce canonical https://www. as well if you want)

Make a copy of the index.php file from your /Wordpress directory.

Edit the line
code:
require('./wp-blog-header.php');
to
code:
require('./wordpress/wp-blog-header.php');
Place the edited index.php file in your root (http://x.com/) directory. You're set. Unless of course the previous developer has some wacky security settings on their server. Which they might.

Apok fucked around with this message at 17:05 on Dec 12, 2011

Exi7wound
Aug 22, 2004

LOGANO
Remember my name... you'll be screaming it later.
I haven't looked yet, but is there a plug-in or add-in of some kind that will allow for integrating a generic database with WP?

I'm looking for a way to keep track of a device where each device has a unique serial number, and the members of the site can search on the serial number, as well as add devices and ownership information.

Free or commercial, doesn't matter.

Twiin
Nov 11, 2003

King of Suck!

Exi7wound posted:

I haven't looked yet, but is there a plug-in or add0in of some kind that will allow for integrating a generic database with WP?

I'm looking for a way to keep track of a device where each device has a unique serial number, and the members of the site can search on the serial number, as well as add devices and ownership information.

You'll want a plugin that makes it easy for you to create custom post types (devices) and custom taxonomies (serial, ownership). All the info on how it works is on the WP site, this plugin might be a decent place to start testing:

http://wordpress.org/extend/plugins/custom-post-type-ui/

Gyshall
Feb 24, 2009

Had a couple of drinks.
Saw a couple of things.
Yeah, I'd do something like that in Custom Post Types. That plugin is the greatest thing ever for that type of stuff. It makes it piss easy for end-users to use once you hand over control to them (if you do.)

Any suggestions for a Business theme for a company trying to showcase their products? Not an e-commerce site. I have a client who wants to show off all their awesome fiber optic assemblies, cables, and custom wiring jobs. Currently I'm going to go propose a site based on Woothemes Empire, but I'm looking for other suggestions, preferably one without such a big-rear end slider.

Exi7wound
Aug 22, 2004

LOGANO
Remember my name... you'll be screaming it later.

Twiin posted:

You'll want a plugin that makes it easy for you to create custom post types (devices) and custom taxonomies (serial, ownership). All the info on how it works is on the WP site, this plugin might be a decent place to start testing:

http://wordpress.org/extend/plugins/custom-post-type-ui/

Thanks! I also found this, which sounds very interesting:

http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/

Apok
Jul 22, 2005
I have a title now!
http://wordpress.org/news/2011/12/sonny/

New Wordpress 3.3 is out. Don't back up your databases and posts for fun data loss action!

Omits-Bagels
Feb 13, 2001

Apok posted:

http://wordpress.org/news/2011/12/sonny/

New Wordpress 3.3 is out. Don't back up your databases and posts for fun data loss action!

Speaking of backing up, what is a good way to do it?

Ned
May 23, 2002

by Hand Knit
When you are backing up WordPress you need to do 3 things.

Make a copy of your database
Make a copy of your uploads directory
Be aware of what plugins you have installed and what theme you are using.

There are plugins that will backup your DB and they are easy to install. Easier than going through phpmyadmin.

For your uploads a regular ftp client should be fine.

Plugins/Theme don't really need to be backed up as long as you have a copy of your theme that you haven't modified or know it can be installed from inside WordPress and plugins are easy to download.

Apok
Jul 22, 2005
I have a title now!

Ned posted:

When you are backing up WordPress you need to do 3 things.

Make a copy of your database
Make a copy of your uploads directory
Be aware of what plugins you have installed and what theme you are using.

There are plugins that will backup your DB and they are easy to install. Easier than going through phpmyadmin.

For your uploads a regular ftp client should be fine.

Plugins/Theme don't really need to be backed up as long as you have a copy of your theme that you haven't modified or know it can be installed from inside WordPress and plugins are easy to download.

Some well designed plugins have the ability to import/export your settings. Joost Wordpress SEO does this and its awesome since I manage several sites which have similar content. Check and see because it can be a real timesaver to back up your plugin settings.

Peacebone
Sep 6, 2007
Hi,

http://www.wolveswhere.com

I'm having trouble getting my one column page no sidebar template to work with the page that posts my blog posts. All my other pages that have that template set are working with it fine. I am using my own child theme of the twenty ten theme. When using child themes am I suppose to copy all the other theme files with it. Right now I just have a style.css in there. Everything else seems to be working fine except for this. Anyone know what the problem is?

cocteau
Nov 28, 2005

The best Darcy.

Peacebone posted:

Hi,

http://www.wolveswhere.com

I'm having trouble getting my one column page no sidebar template to work with the page that posts my blog posts. All my other pages that have that template set are working with it fine. I am using my own child theme of the twenty ten theme. When using child themes am I suppose to copy all the other theme files with it. Right now I just have a style.css in there. Everything else seems to be working fine except for this. Anyone know what the problem is?

You have a sidebar on the home page and the blog page. Are you intending to get rid of it on both?

Did you choose the correct template on the right under page attributes? (One column, no sidebar).

You do not need to copy all the theme files for a child theme. Technically you only need a new style.css file, though some suggest you also have a index.php file.

Apok
Jul 22, 2005
I have a title now!

Peacebone posted:

Hi,

http://www.wolveswhere.com

I'm having trouble getting my one column page no sidebar template to work with the page that posts my blog posts. All my other pages that have that template set are working with it fine. I am using my own child theme of the twenty ten theme. When using child themes am I suppose to copy all the other theme files with it. Right now I just have a style.css in there. Everything else seems to be working fine except for this. Anyone know what the problem is?

I have no idea how you made your layout, but adding something like:
code:
.blog #primary {
    display: hidden;
}
.blog #content {
    width: 90%;
    margin: 0 auto;
}
might make it work.

What audio player are you using (or other goons, which audio player is the best)? I need one for one of my photography clients and would rather use a WP app than embed my own.

hohum
Mar 17, 2010

umoms.
I hope I can get some help here because the wordpress.org forums are loving useless.

I'm trying to write an authentication plugin to auth my Wordpress installation off of my SMF database.

So far I've figured out that I need to replace the get_userdata and get_user_by pluggables to get the login portion working but I'm not sure how to pass permissions back into wordpress after that.

After the call to _fill_user I immediately do something like this:

code:
		$user->wp_capabilities['edit_posts'] = 1;
		$user->wp_capabilities['publish_posts'] = 1;
		$user->wp_capabilities['read'] = 1;
		$user->wp_capabilities['administrator'] = 1;
but it doesn't appear as if get_userdata or get_user_by are called again after the initial login because after I'm logged in I can't even access the dashboard page. What else do I need to investigate in order to pass wp_capabilities back to wordpress properly?

hohum fucked around with this message at 22:05 on Dec 15, 2011

Peacebone
Sep 6, 2007

Apok posted:

I have no idea how you made your layout, but adding something like:
code:
.blog #primary {
    display: hidden;
}
.blog #content {
    width: 90%;
    margin: 0 auto;
}
Yeah, that didn't do anything. The one column layout is the stock one from twenty ten. It works on my shows page but not on the blog one. I have no idea why not.

Apok posted:

What audio player are you using (or other goons, which audio player is the best)? I need one for one of my photography clients and would rather use a WP app than embed my own.

I'm using Cash Music's sound flower for audio. It's very simple to use and wordpress compliant: http://cashmusic.org/tools/flower/

Nimrod
Sep 20, 2003

Peacebone posted:


I'm using Cash Music's sound flower for audio. It's very simple to use and wordpress compliant: http://cashmusic.org/tools/flower/

I really like this music player, it's really simple and not terribly hard to style.

Peacebone
Sep 6, 2007

cocteau posted:

You have a sidebar on the home page and the blog page. Are you intending to get rid of it on both?
[quote="cocteau"]

No just on the blog page.

[quote="cocteau"]
Did you choose the correct template on the right under page attributes? (One column, no sidebar).

Yes, I did. I even created a new page and tried adding attaching my posts to it with the template one column, no sidebar and the sidebar remains there. It only works for pages that don't show my posts. I'm thinking there's a box somewhere maybe in wordpress that I have to check or something?

FluffyShuffle
Jan 15, 2007

biochemist posted:

But it doesn't seem to pass variables back to the page template (scope problem?). Wordpress doesn't natively support PHP in the posts, but I found a little plugin that lets me insert PHP between tags. I'm by no means an expert in this stuff, just confident enough to give different things a try until they kinda work. If anyone can point me in the right direction, or offer an alternative, I'd really appreciate it.

Try http://wordpress.org/extend/plugins/exec-php/ for a plugin which lets you use PHP in wordpress posts/pages. You may already have this?

Next, just remember to change the scope of your variables which you will use inside your posts/pages to global.

ie:
code:
 <?php global $your_var; ?>
At least that worked for me?

Deus Rex
Mar 5, 2005

an odd question I know, but is there a URL I can use to get to a page by its page ID, instead of by its permalink?

Something like http://site.com/post.php?id=xxxx , but that doesn't seem to work for me.

Apok
Jul 22, 2005
I have a title now!

Deus Rex posted:

an odd question I know, but is there a URL I can use to get to a page by its page ID, instead of by its permalink?

Something like http://site.com/post.php?id=xxxx , but that doesn't seem to work for me.

If you don't set permalinks up.

Nimrod
Sep 20, 2003

Deus Rex posted:

an odd question I know, but is there a URL I can use to get to a page by its page ID, instead of by its permalink?

Something like http://site.com/post.php?id=xxxx , but that doesn't seem to work for me.

Try the "Get shortlink" link on your edit post page. Should end up being something like http://site.com/?p=xxxx

Deus Rex
Mar 5, 2005

Nimrod posted:

Try the "Get shortlink" link on your edit post page. Should end up being something like http://site.com/?p=xxxx

This is what I was looking for. Unfortunately WP is still redirecting that request to the permalink URL, which isn't what I want (right now, a load balancer is sending that permalink URL to another site, and I want to test this page in the meantime). Thanks!

Pento McGreno
May 4, 2004

Cheese.

Deus Rex posted:

This is what I was looking for. Unfortunately WP is still redirecting that request to the permalink URL, which isn't what I want (right now, a load balancer is sending that permalink URL to another site, and I want to test this page in the meantime). Thanks!

Go to http://site.com/?p=xxxx&preview=true

Note that this will show the latest version of the post, even if it's a draft version - but it won't redirect to the permalink.

Adbot
ADBOT LOVES YOU

Omits-Bagels
Feb 13, 2001
I'm chugging away on the design of our new site and I have a questions that is probably simple to fix but I'm not sure what that solution is called.

On this page we have a long description of the apartment but I would like the page to display the first few paragraphs and then be able to click a link to view the rest of the description. I think the page is really long as it is now and I want to give the users the option of not having to scroll a lot if they want to view the things under the description.
Page in question: http://feelslikehomeinparis.com/newflhp/paris-vacation-rentals/grand-lepic/

Any ideas?

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