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
Boogaloo Shrimp
Aug 2, 2004

Alfalfa posted:

What is the easiest way to copy an entire blog and put it on another domain?

I want to make two separate blogs that are identical and use one to beta test and modify to see if I like it.

Is there a way to have them both be on the same domain as well?

like https://www.xxxxx.com - default blog and https://www.xxxxx.com/beta be the tester blog?

You can install a second copy of WordPress. I think you can have it pull from your already existing database as well. Or, if you're just looking to edit your theme, you can try ThemeDreamer if you have DreamWeaver.

Speaking of working with themes, http://brake-down.com/ is my current site, which I cobbled together by hacking apart the default theme back when it was Kubrick. The CSS is pretty mish-mash. I think I've gone as far as I can with editing and want to start making my own theme from scratch, mostly as a learning exercise. Any good resources on best practices, coding standards, etc. ?

Boogaloo Shrimp fucked around with this message at 21:54 on Mar 29, 2010

Adbot
ADBOT LOVES YOU

rugbert
Mar 26, 2003
yea, fuck you
I just started playing around with wordpress and I keep loving it up.

I gave my home server a new IP the other day which hosed WP up hard, it would load the HTML for the front page but wouldnt pull the css or any other pages. I fixed it by reassigning the server its old IP.

So I was playing around with the admin settings just now and found the spot where I could assign the URL to wordpress. It was set as http://192.168.1.104/wordpress or something (the server's IP) so I thought, maybe if I change that to 127.0.0.1 but that just killed it.

I just got back into the admin panel by using the browser on the server to log in, but for future reference, how can I:
a - make sure that a change in the IP wont mess everything up
b - which php file contains the general settings to change the word press url?

Ned
May 23, 2002

by Hand Knit
The settings are in the database, not a file. If you change the url/ip and it no longer responds you'll need to get into the wp_options table and change a couple of settings there.

You are much better off developing on cheap hosting than your own machine. It is much closer to a deployment environment and you don't have to do annoying sysadmin stuff.

Boogaloo Shrimp: use wp_enqueue_script and wp_enqueue_style for including stylesheets and javascript. Don't use jQuery and Prototype at the same time - pick one or the other.

Twiin
Nov 11, 2003

King of Suck!

Ned posted:

The settings are in the database, not a file. If you change the url/ip and it no longer responds you'll need to get into the wp_options table and change a couple of settings there.

This isn't exactly true. You can set your WP_HOME and SITE_HOME (or whatever they are) in your wp-config.php, and those settings will override and change whatever is in your db.

Doh004
Apr 22, 2007

Mmmmm Donuts...
I've really been enjoying getting into Wordpress. I've been doing PHP development for 6 years now, and never had an issue making my own pages with includes and handling the urls. But now that I'm creating sites for people that don't necessarily know how to program, Wordpress is incredible.

I recreated my fraternity's website, http://www.ehzlxa.com with Wordpress and it's truly incredible. Now we have an easy to update website that won't just get left alone by future generations. The plugins have made it great for SEO purposes, we're able to attract more of our alumni back, and a lot of our information is dynamically generated from our internal systems that we use to handle our information.

Say I have a preexisting system online (PHP MySQL), would it be hard to make it a WP plugin?

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice
Firstly, thanks for this thread, it has gotten me very far very fast.

I have been doing PHP development for a while, mainly using MVC frameworks ( CodeIgniter and Kohana ) but I recently have come across a bunch of freelance jobs doing dirt simple sites that the owner will update occasionally. I have WP doing exactly what I want ( pages only, custom minimal theme, doing the nav how I want, including pages inside pages so they can edit common sidebars and so on ) but one site I'm about to start on is a real estate site, which requires a bit more customization. I checked out that 'Great Real Estate' plugin mentioned way back at the front of the thread, but it's not doing much for me. So, I have a few questions:

- has anyone used an MVC plugin like Churro before?

- Using <?php include (TEMPLATEPATH . '/cutom/MyClass.php');?> at the top ( before header() ) I can include my own classes and they will have access to $wpdb and friends?

- I searched, but perhaps I didn't use the right term, but is there a plugin you can point to a DB table and it will generate a CRUD scaffold / interface in the wp-admin area? Not that it would be hard to make this, just :effort:

- Would I just be better off doing this in Kohana and adding a content editor for the pages? I think this would be a great learning experience, since I've been using WP for all of 36 hours now, but if adding "big" custom pieces to "WP as CMS" sites is a nightmare, I'll skip it.

Alfalfa
Apr 24, 2003

Superman Don't Need No Seat Belt
Is there a way so when someone clicks on the tab of a page I created it automatically takes them to my YouTube channel in a different window instead of an actual page on my blog?

Moniker
Mar 16, 2004

Alfalfa posted:

Is there a way so when someone clicks on the tab of a page I created it automatically takes them to my YouTube channel in a different window instead of an actual page on my blog?

just add target="new" to the html of the link you want to change

Alfalfa
Apr 24, 2003

Superman Don't Need No Seat Belt

Moniker posted:

just add target="new" to the html of the link you want to change

where?

I'm talking about creating a page like YouTube so it is displayed in my navigation bar and when people click on it instead of taking them to the actual WordPress Page, it opens up a new window with YouTube.

Moniker
Mar 16, 2004

Alfalfa posted:

where?

I'm talking about creating a page like YouTube so it is displayed in my navigation bar and when people click on it instead of taking them to the actual WordPress Page, it opens up a new window with YouTube.

You'd just add target="new" to the link so then it opens in the new window. It might be tricky since there is a proper and improper way to do it but basically I'd hardcode a link into the template file of where ever you want the link to be. So if it's in the header you'd find the header template and edit the html to have the link to go to <a href="your youtube page" target="new">Click here!</a> and it would add that code to the template file so any time it's called upon it would have your new link code in it. But 1) I might not know exactly what you mean and 2) I might be telling you the improper way to do it, but that's what I'd do.

Ned
May 23, 2002

by Hand Knit

Alfalfa posted:

where?

I'm talking about creating a page like YouTube so it is displayed in my navigation bar and when people click on it instead of taking them to the actual WordPress Page, it opens up a new window with YouTube.

If you want to be lazy just put in some javascript to override the link and have it send them off to another page. Otherwise you'll probably have to code some crap.

Lumpy posted:

- Using <?php include (TEMPLATEPATH . '/cutom/MyClass.php');?> at the top ( before header() ) I can include my own classes and they will have access to $wpdb and friends?

- I searched, but perhaps I didn't use the right term, but is there a plugin you can point to a DB table and it will generate a CRUD scaffold / interface in the wp-admin area? Not that it would be hard to make this, just

- Would I just be better off doing this in Kohana and adding a content editor for the pages? I think this would be a great learning experience, since I've been using WP for all of 36 hours now, but if adding "big" custom pieces to "WP as CMS" sites is a nightmare, I'll skip it.

I think you should be able to have access to $wpdb as long as WP is calling the page - if you are hitting the template directly then you don't have access.

There isn't going to be any scaffolding available for you to deal with DBs. Maybe a plugin will allow that.

If you are happy building the stuff in Kohana go ahead and do that. Set up a template page that will call stuff from Kohana and try to do everything in there so it fits in with the site structure of your WordPress installation.

Doh004
Apr 22, 2007

Mmmmm Donuts...

Alfalfa posted:

where?

I'm talking about creating a page like YouTube so it is displayed in my navigation bar and when people click on it instead of taking them to the actual WordPress Page, it opens up a new window with YouTube.

Create a template page called youtuberedirect.php and put it in your theme's directory. In the PHP page put:
code:
<?php
header("Location: youtubeurl");
exit;
?>
Create the page in the Wordpress admin, and set it's Parent Template to your youtuberedirect.

*edit* Oh, it opens in a new page? Look at the wordpress documentation for wp_list_pages and edit your header.php.

*edit numba 2* It doesn't look like you can set the target in wp_list_pages; therefore, I'd also suggest editing your header.php and manually entering in the link.

Doh004 fucked around with this message at 05:35 on Apr 1, 2010

Alfalfa
Apr 24, 2003

Superman Don't Need No Seat Belt
Is there a way for posts in certain categories to not get posted on the front page? I update my own training workouts etc on the blog but would rather not have them break up my articles on the front page. I would only like them viewable when someone clicks on the training tab.

hmm yes
Dec 2, 2000
College Slice
Yes:

1- Edit your template to filter by category in the get_posts loop
2- Install a plugin that excludes categories for you

Alfalfa
Apr 24, 2003

Superman Don't Need No Seat Belt

atastypie posted:

Yes:

1- Edit your template to filter by category in the get_posts loop
2- Install a plugin that excludes categories for you

Thanks. I never remember that "hey maybe someone made a plug-in for exactly what I need".

Moniker
Mar 16, 2004

Doh004 posted:

Create a template page called youtuberedirect.php and put it in your theme's directory. In the PHP page put:
code:
<?php
header("Location: youtubeurl");
exit;
?>
Create the page in the Wordpress admin, and set it's Parent Template to your youtuberedirect.

*edit* Oh, it opens in a new page? Look at the wordpress documentation for wp_list_pages and edit your header.php.

*edit numba 2* It doesn't look like you can set the target in wp_list_pages; therefore, I'd also suggest editing your header.php and manually entering in the link.
I looked at the template files and you can't really hardcode the link in. At least I can't. It's set up so there is an admin utility which you can add or remove "page" and it automatically adds the links at the top depending on what pages are added to the list. I don't know how to do it

tonelok
Sep 29, 2001

Hanukkah came early this year.
WordPress 3.0 beta 1

http://wordpress.org/development/2010/04/wordpress-3-0-beta-1/

It's got the new default theme, Twenty Ten that they want everybody to test, plus the merge with MU, etc.

I think I'll wait for beta 2 to really mess around with it.

Broccoli Must Die!
Aug 12, 2004

Meow.

tonelok posted:

WordPress 3.0 beta 1

I installed it today on a test domain and was quite unimpressed with the lack of new features. Sure, there's some nice things included in 3.0, but considering it's the next major release I really thought there'd be a lot more cool features and improvements. Don't know what there is to include really, I just expected more.

Seems maybe it's more under the hood improvements than anything else.

Ned
May 23, 2002

by Hand Knit
Lots of under the hood stuff. Look for WordPress to explode in functionality very soon as people develop plugins based around custom post types actually working.

csammis
Aug 26, 2003

Mental Institution
I'm working on a WP site which uses page templates to replace all of the simple user account registration and post administration. When the site goes live, I won't want any users who don't have the Administrator role to be able to log in at the /wp-admin/ area...but I'm not wild on the idea of changing the core files in order to suit the purpose. Is there a way to write a plugin that can hook the admin login functions to filter out non-admins? Any resources on the subject would be much appreciated.

Ned
May 23, 2002

by Hand Knit
You probably want to add a hook to user_login and then something in the admin_init that checks the user permissions and boots them if they are on a bad page.

Twiin
Nov 11, 2003

King of Suck!

Broccoli Must Die! posted:

I installed it today on a test domain and was quite unimpressed with the lack of new features. Sure, there's some nice things included in 3.0, but considering it's the next major release I really thought there'd be a lot more cool features and improvements. Don't know what there is to include really, I just expected more.

Seems maybe it's more under the hood improvements than anything else.

Wordpress 3.0 isn't a major release, it's just another regular release. They count 2.8 -> 2.9 -> 3.0 instead of 2.8 -> 2.9 -> 2.10. Ten regular releases from now it'll be 4.0, regardless of what new features are in it.

It is a stupid way to number releases.

tonelok
Sep 29, 2001

Hanukkah came early this year.
Besides the custom post types, the merging of MU and regular is a huge deal, at least for the people actually developing WordPress. Most of us won't care.

No. 9
Feb 8, 2005

by R. Guyovich
I'm trying to design a site similar to those dime-a-dozen lamebook, people of walmart, etc. sites. I noticed some of these sites used to run on modified available themes but now seem to run their own. Is there a good starting template? I'm using one called LightWord right now, but I'd like something a little more easy for ad placement (planned 5 adspaces per page). Just something with a simple header graphic with an ad banner by it, then mostly picture updates with ads occasionally in between. Twitter, Facebook, square shaped ads, categories, etc. on the right side column.

Any idea? I'm new to Wordpress (the last time I did use it, it wasn't anything like it is now).

tonelok
Sep 29, 2001

Hanukkah came early this year.
This is the new WordPress theme coming out with 3.0:

http://2010dev.wordpress.com/

I haven't looked at it, but if it's as easy to use/modify as people are claiming, it might be a good starting poitn for you.

Otherwise hit up:

http://wordpress.org/extend/themes/
or
http://weblogtoolscollection.com/

Atahualpa (http://wordpress.org/extend/themes/atahualpa) and some of the other more popular themes listed i the WordPress.org themes section would probably do what you want with minimal modding.

Grumpicat
May 27, 2005
Mood: Angsty
Hey guys..

So I made a post in the newsletter category with the content being just the url of a pdf like

http://blabla.com/stuff/publications/hello.pdf

Then on a certain page (called publications) I set up a query to display this post, using <?php the_content()> to insert the url into the <a href="">

code:
<?php $my_query = new WP_Query('category_name=Newsletter&posts_per_page=1'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>

<a target="_blank" href="<?php the_content(); ?>"><img src="http://www.blabla.com/newsletter.jpg" /></a><br />
Latest Newsletter<br />
<?php the_title(); ?> (<a target="_blank" href="<?php the_content(); ?>">PDF</a>)
<?php endwhile; ?>
Unfortunately what I get where the <?php the_content ?>'s are is like

http://blabla.com/publications/<p>http://blabla.com/stuff/publications/hello.pdf</p>

I guess wordpress thinks the_content() means [url of current page]<p>[the actual content of my post]</p>

I went ahead and IDed the <a>'s and wrote some super special javascript to remove the offending parts which looks like a bunch of these:

code:
var removeThis = 'http://blabla.com/publications/%3Cp%3E';
var theReplace = '';
document.getElementById('newsletterlink1').href = document.getElementById('newsletterlink1').href.replace(removeThis,theReplace);
But I'm wondering what the heck is wordpress doing? Is there an easier way to get around this? Will this behavior be fixed in the future, possibly messing up my links?

Also if i disable wpautop it messes up the other stuff on the page.

Ned
May 23, 2002

by Hand Knit
do get_the_content() instead of the_content and echo it out maybe?

Grumpicat
May 27, 2005
Mood: Angsty

Ned posted:

do get_the_content() instead of the_content and echo it out maybe?

Holy crap that worked perfectly! Thanks :)

Ok here's another question:

I think to display the content of a page (content that we create in the page edit area of wp-admin) we use the_content() or get_the_content() or something but as soon as I start querying posts I'm not sure how to display the page content after that because get_content() shows post content instead of my page's content. Can I query the page back?

Grumpicat fucked around with this message at 21:27 on Apr 4, 2010

Ned
May 23, 2002

by Hand Knit
You probably need to save it as a different variable.

code:
$page_data = $post;
$posts = get_posts($args);
foreach ($posts as $post) {
setup_postdata($post);
//Do your stuff related to posts here.
}
$post = $page_data;
setup_postdata($post);
//Do your stuff for page content here;
setup_postdata puts everything in place so you can do stuff like the_content(); - you can mess with variables directly but you'd have to apply filters to them manually.

Grumpicat
May 27, 2005
Mood: Angsty
Today I ended up doing it like this:

code:
<?php
$args=array(
   'post_type'=>'page',
   'post__in' => array('39')
);
$the_query4 = new WP_Query($args);
?>

<?php while ($the_query4->have_posts()) : $the_query4->the_post(); ?>

//blabla

<?php endwhile; ?>
Ok I have just two more questions >_<

I installed xLanguage today and it seems to work ok on every page except my index.php. Usually the English/Japanese links go to http://blabla.com/lang/jp/page

But on the index.php they go to http://blabla.com/index.php/

which is my index page with half the images broken. If I type in blabla.com/lang/jp I get the same half broken index page.

I have the Index.php fix plugin which "allows a blog installed at root to be addressed by /index.php. Remedies stripping of filename by includes/canonical.php" and I currently only access the index page by going to blabla.com/index.php because I set up the .htaccess to redirect blabla.com to a temporary site.

Any idea what's going on?

And finally..Ned I was looking at your EW.com site and was wondering how you made the link to the current page (DVD, TV, MUSIC, BOOKS) turn red. Currently I'm using this crazy css that has a ton of lines like this:

code:
body.pageid-366 div#menu li.page-item-366 a:link, body.pageid-366 div#menu li.page-item-366 a:visited,
body.pageid-366 div#menu li.page-item-366 a:hover,
but every time I make a new page I have to add more lines and I duno it's a mess.

I appreciate any tips you might have!

Grumpicat fucked around with this message at 03:26 on Apr 6, 2010

Ned
May 23, 2002

by Hand Knit
The EW.com site has those links hard coded. The header/footer come from outside of WordPress and I just call the specific template.

For xLanguage you might need to query the language on the homepage and apply some filters. If you link me to the actual site and possibly some code I should be able to figure it out for you.

If you set a class on the homepage you can probably set the CSS to indicate which section you are in - there are a few ways to do that. is_home, is_category etc...It just depends on how your content is laid out.

I'd need to get a link to figure out what is up with your index.

rugbert
Mar 26, 2003
yea, fuck you
Still learning wp and php but Im getting the hang of it. I made my first template from scratch for a little project Im working on (to learn, and for potential clients) and the last thing I need to add is some sort of filter that lets me filter posts based on some custom fields I have. Kinda like newegg's filter. I could just select some check boxes, or use drop down fields and hit filter.

Are there any plugins to help me accomplish this relatively painlessly?

albedoa
May 3, 2004

I'm looking for a theme like Manifest ( http://jimbarraud.com/manifest ) that has two columns. I have limited programming knowledge, but want to start with something like that theme to hack just enough to fit my needs.

Anyone know of one?

Mine GO BOOM
Apr 18, 2002
If it isn't broken, fix it till it is.
I'm looking for a way to prevent bloggers using Wordpress from hotlinking other sites. When they make a new post, they drag and drop images from their browser into the post, despite me telling them how to do it correctly. Is there a way to automate this so any <img src=xx> all get converted into the media library and not be linking off other's sites? Otherwise I'll just have to write something myself, probably a dumb caching system.

My attempts to find such a thing result in plugins/how tos to prevent other from hotlinking us, which I don't mind.

EDIT: Found one, requires it to be manually ran, but works pretty well.

Mine GO BOOM fucked around with this message at 23:44 on Apr 17, 2010

identikit
Dec 24, 2005

I'll show you and your massive chebs the time of your lives you sexy fuck

albedoa posted:

I'm looking for a theme like Manifest ( http://jimbarraud.com/manifest ) that has two columns. I have limited programming knowledge, but want to start with something like that theme to hack just enough to fit my needs.

Anyone know of one?

Do you want two columns of entries or a column plus a sidebar?

albedoa
May 3, 2004

identikit posted:

Do you want two columns of entries or a column plus a sidebar?

Sorry, I want an entry plus a sidebar. I might just get one of those barebones themes and hack away. I've looked at hundreds of themes, and none of them really do what I want while looking like I want.

identikit
Dec 24, 2005

I'll show you and your massive chebs the time of your lives you sexy fuck

albedoa posted:

Sorry, I want an entry plus a sidebar. I might just get one of those barebones themes and hack away. I've looked at hundreds of themes, and none of them really do what I want while looking like I want.

http://speckyboy.com/2010/03/22/10-blanknaked-wordpress-themes-perfect-for-development/

http://tammyhartdesigns.com/free-wordpress-themes/fifty-fifth-street/

http://www.thomasveit.com/bluebubble-free-premium-wordpress-portfolio-theme/

Any of those fit the bill?

Edit: http://speckyboy.com/2009/04/20/40-stylish-minimal-and-clean-free-wordpress-themes/

o3o
Nov 29, 2002

1890 - 1918
Just a heads up in case you guys don't know about this one: http://graphpaperpress.com/ has really awesome free themes for portfolios and whatnot.

rugbert
Mar 26, 2003
yea, fuck you
Can someone explain how the search template works? Im very, VERY new to wp. but its just a template page with the loop in it right?

I figured out how to filter my posts based on custom fields but I cant get the search page to load. I have the search.php in my directory, but I cant direct link to it. Do I need some search plugin or something to make it work?

Nothing is being passed into it right now, Im just testing it out with a set value that modifies the loop.

rugbert fucked around with this message at 23:20 on Apr 17, 2010

Adbot
ADBOT LOVES YOU

Cavepimp
Nov 10, 2006
Just a warning for people out hunting for nice-looking free themes, as I was recently doing it and found it to be highly frustrating.

Some bastards are embedding malicious code into nice-looking free themes (as well as doing other things, like putting their own ad code & affiliate junk) and could potentially do a lot of damage if you upload/activate them. Stolen credentials, compromising the web server, etc.

Check any theme's header.php and footer.php for any encrypted code (it appears as a giant string of random characters) or anything else suspicious BEFORE you upload it to your server or activate it. Not all encrypted code is necessarily malicious (sometimes they're just protecting their credit in the footer), but my advice would be to ditch anything with any hints of weirdness.

This stuff is EVERYWHERE now, and it proved to be a highly frustrating search. I ended up just buying a handful of real themes from WooThemes.com that are awesome. It was worth the few bucks in exchange for how ridiculous it was getting trying to search/download/check code, not to mention the themes they're making over there look great. There are a lot of other great premium theme companies out there too.

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