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
ProdigalSon
Sep 15, 2003
Does anyone here have much experience with making Wordpress sites in multiple languages? I'm wondering what the best way to do this is. The simplest solution (although not very elegant, perhaps) is two create two totally separate sites (each with their own databases) dedicated to a language with a button to toggle between the two. Aside from combining the two languages onto one site (which will get messy quickly) this is the only solution that I can think of.

Is there a better way?

Adbot
ADBOT LOVES YOU

Twiin
Nov 11, 2003

King of Suck!

ProdigalSon posted:

Does anyone here have much experience with making Wordpress sites in multiple languages? I'm wondering what the best way to do this is. The simplest solution (although not very elegant, perhaps) is two create two totally separate sites (each with their own databases) dedicated to a language with a button to toggle between the two. Aside from combining the two languages onto one site (which will get messy quickly) this is the only solution that I can think of.

Is there a better way?

Use the WPML plugin. Lets you have as many languages as you need. Create translations of posts/categories/whatever, allow users to toggle between them, etc.

ProdigalSon
Sep 15, 2003

Twiin posted:

Use the WPML plugin. Lets you have as many languages as you need. Create translations of posts/categories/whatever, allow users to toggle between them, etc.

Brilliant. Thanks

rugbert
Mar 26, 2003
yea, fuck you
Has anyone here ever sold a wordpress theme? Whats the best place to do so?

sim
Sep 24, 2003

I have not sold any, but I've bought a few from http://themeforest.net/

cocteau
Nov 28, 2005

The best Darcy.

rugbert posted:

Has anyone here ever sold a wordpress theme? Whats the best place to do so?

I'd be curious to hear whether any independent designers have had much luck with selling themes online. I'vIt seems like the real money is doing custom work for clients, unless you build a framework like Thesis.

Twiin
Nov 11, 2003

King of Suck!

cocteau posted:

I'd be curious to hear whether any independent designers have had much luck with selling themes online. I'vIt seems like the real money is doing custom work for clients, unless you build a framework like Thesis.

The price/sales stats on Themeforest seem to suggest there's good money to be made if you make a theme that doesn't suck. I'm planning to try my hand on there, I'll let you know how it goes.

Zorn
Oct 24, 2000
I'm helping someone out with their Wordpress site and they'd like to have a page with links that will open a lightbox-style "window" containing some HTML content. I've put together a simple example at http://dl.dropbox.com/u/293743/wordbox/index.html.

My problem is that they're not very technically inclined and I need a way for them to easily manage the content of each window in a wordpressy way. I haven't done any wordpress development or much web development, but I'm comfortable writing code (I write C++ & Python as part of my job) so creating a custom plug-in is an option. I've skimmed the API and plug-in docs but it isn't clear to me if that's the way to go or if there is an easier way to accomplish what I need through WP.

Basically I'm looking for general suggestions on how to implement this in a way that (ideally) doesn't require writing too much new code and is easy for the site owner to maintain.

Ned
May 23, 2002

by Hand Knit
I'd make a page called lightbox and then have a bunch of child pages for each piece of content. Then just make the script read through the children of the lightbox page and make the links for each of the children and have them set up to appear in the lightbox when clicked.

You can make a template for lightbox specific pages or modify page.php to check if $_GET[lightbox] == true and then have it do something different for the header and footer.

Zeshon
Dec 1, 2004
Ok, I'm yanking my hair out trying to get this problem worked out.

Essentially, I set up single.php to pull from blogpost.php or portfolio.php, depending on the category a post is listed in. In my navigation, I have a link to the blog and the portfolio, which are generated by wp_list_pages, which highlights the appropriate link depending on where you are.

My problem is I want to spoof what that function sees as the current page for the portfolio posts so that it will highlight portfolio, instead of blog.

Twiin
Nov 11, 2003

King of Suck!

Zeshon posted:

Ok, I'm yanking my hair out trying to get this problem worked out.

Essentially, I set up single.php to pull from blogpost.php or portfolio.php, depending on the category a post is listed in. In my navigation, I have a link to the blog and the portfolio, which are generated by wp_list_pages, which highlights the appropriate link depending on where you are.

My problem is I want to spoof what that function sees as the current page for the portfolio posts so that it will highlight portfolio, instead of blog.

I have read this over and over and over and I have no idea what it is you're looking for.

Zeshon
Dec 1, 2004
I'm trying to trick wordpress so that when it looks at posts in the portfolio category, it thinks it's accessing them on the portfolio page. Currently when it looks at them it sees that they are posts, rather than sub-pages of portfolio, which highlights blog as the active page, instead of portfolio.

sim
Sep 24, 2003

A combination of
code:
<? if(is_page('portfolio') || is_category('portfolio') || in_category('portfolio')) ?>
seems like the obvious solution.

Zeshon
Dec 1, 2004

sim posted:

A combination of
code:
<? if(is_page('portfolio') || is_category('portfolio') || in_category('portfolio')) ?>
seems like the obvious solution.

It may be that simple, but the function I'm working with is

<?php //title attribute gets in the way - remove it
$pages = wp_list_pages('sort_column=menu_order&depth=0&title_li=&link_before=&link_after=&echo=1');
$pages = preg_replace('/title=\"(.*?)\"/','',$pages);
echo $pages;
?>

by my eyes, I can't see an obvious way to make that work that would still be clean code.

sim
Sep 24, 2003

Ah sorry, I forgot you are using wp_list_pages to generate your links. Without totally restructuring your content (putting everything in pages under your parent page), the only way I can see is to put an id on a container above your nav with an id of "portfolio" if any of those previous conditionals I posted are true. Then style the correct li differently if its under #porfolio instead of #blog, etc. Or apply the styles after the fact via Javascript.

Zeshon
Dec 1, 2004

sim posted:

Ah sorry, I forgot you are using wp_list_pages to generate your links. Without totally restructuring your content (putting everything in pages under your parent page), the only way I can see is to put an id on a container above your nav with an id of "portfolio" if any of those previous conditionals I posted are true. Then style the correct li differently if its under #porfolio instead of #blog, etc. Or apply the styles after the fact via Javascript.

Do you have any suggestions on the actual jQuery code? I tried writing something but it doesn't work. This is the code I wrote to target the lis, I haven't added the if statement yet.

<script type="text/javascript">
$(function() {
$("ul.sf-menu li.page-item-279").addClass("current_page_parent");
$("ul.sf-menu li.page-item-305").removeClass("current_page_parent");
});
</script>

EDIT

I managed to fix my problem with the following solution.

<?php if(is_category('33') || in_category('33') || is_category('32') || in_category('32') || is_category('31') || in_category('31') ) { ?>
<script type="text/javascript">
$(document).ready(function() {
$('.page-item-305').removeClass('current_page_parent');
$('.page-item-279').addClass('current_page_parent');
});
</script>
<?php } ?>

Zeshon fucked around with this message at 00:17 on Jun 7, 2010

Zeshon
Dec 1, 2004
Ok, I'm a noob. Here is the working code.

<?php if( is_home()==0 && in_category(array(31,33,42)) || is_category(array(31,33,42)) ) { ?>
<script type="text/javascript">
$(document).ready(function() {
$('.page-item-305').removeClass('current_page_parent').removeClass('current_page_item');
$('.page-item-279').addClass('current_page_parent');
});
</script>
<?php }; ?>

Zeshon fucked around with this message at 03:03 on Jun 7, 2010

ahobday
Apr 19, 2007

I've been Googling most of today for a solution to this:

I'm using the K2 theme (http://getk2.com/).

When I visit a page, by clicking one of the tabs at the top, I want the page to display posts from a certain category, in the same style that they'd be displayed within the main blog.

I have tried solutions which allow navigation tabs to link directly to category pages, but this doesn't keep the tab highlighted in white, which is a visual inconsistency.

Basically, to make the tabs at the top work properly, I need a way to display posts from a certain category on the page itself, and not use a link to a category page.

I've seen people suggest writing the PHP and using templates for the pages, to display the posts within a category, but I can't write/understand PHP very well, so I always get lost when I try.

Does anyone have any suggestions?

BuddytheRat
Aug 14, 2005
This seems like it should be the simplest thing in the world but I am having a hell of a time finding solutions.

I am trying to grab the page ID from the blog page, (which is not not being used as the front page, and has instead been told to display on a page called "news") so, I use the $post->ID variable, and this works on every other page, but not on the posts page, where instead, it returns the ID of the most recent post.

How am I supposed to access the page ID, short of grabbing it from the URL? (That doesn't seem like a very secure method.)

Ziir
Nov 20, 2004

by Ozmaugh
I want to style the title/link of the newest blog post differently from the previous older ones. Is there a way I can add a "newest" ID or something automatically to the newest entry, or is there another way to do this?

Edit: I also want my front page to display the content from my about me page so that I don't have to manually edit the index file to update the information. I can't seem to find a way to do this though searching through Google.

Ziir fucked around with this message at 04:45 on Jun 12, 2010

fuf
Sep 12, 2004

haha
I need to create a blog (or a wiki or something) that contains posts on the works of two authors.

There are three levels of posts (or maybe I should use pages?):

1. Two posts about the authors themselves (top level posts)
2. A post for each of their respective books (middle level)
3. A post for each of the individual chapters of each of these books (bottom level)

I would like the top level posts to automatically list all of the middle level posts that refer to that author (i.e. at the bottom of the post titled "Author A" there would be a list of all the posts that are about his books).

I would then like each of these middle level posts to automatically list the bottom level posts that refer to that book (i.e. at the bottom of the post titled "Book C" there would be a list of all the posts that are about the chapters of that book).

So the visitor would initially be presented with two posts, Author A and Author B, then they can click the name of a book contained in one of those posts and get a post about the book which contains a list of all the chapters of that book.

Ugh, sorry if that made no sense.

Is there a way to do this with wordpress? Tags, categories, or some other method?

Or is a blog totally inappropriate for this, and I should look into a wiki or something? I want to use wordpress because I love the admin interface and the layouts etc.

edit: I think I can do this with a combination of categories, tags and custom fields. I'll work on it.

fuf fucked around with this message at 19:05 on Jun 13, 2010

Doh004
Apr 22, 2007

Mmmmm Donuts...

fuf posted:

I need to create a blog (or a wiki or something) that contains posts on the works of two authors.

There are three levels of posts (or maybe I should use pages?):

1. Two posts about the authors themselves (top level posts)
2. A post for each of their respective books (middle level)
3. A post for each of the individual chapters of each of these books (bottom level)

I would like the top level posts to automatically list all of the middle level posts that refer to that author (i.e. at the bottom of the post titled "Author A" there would be a list of all the posts that are about his books).

I would then like each of these middle level posts to automatically list the bottom level posts that refer to that book (i.e. at the bottom of the post titled "Book C" there would be a list of all the posts that are about the chapters of that book).

So the visitor would initially be presented with two posts, Author A and Author B, then they can click the name of a book contained in one of those posts and get a post about the book which contains a list of all the chapters of that book.

Ugh, sorry if that made no sense.

Is there a way to do this with wordpress? Tags, categories, or some other method?

Or is a blog totally inappropriate for this, and I should look into a wiki or something? I want to use wordpress because I love the admin interface and the layouts etc.

edit: I think I can do this with a combination of categories, tags and custom fields. I'll work on it.

Yes. Each page can have a parent. So you have your Home, then you can have your author posts. Then when you make your book page, you assign its parent to be the author's page. After you do that for each book, you create your individual chapters' pages and set their parents to their respective books.

Then, when you want to display the various books of the author/chapters of each book, you can use the built in wordpress functionality to display that page's children.

Ned
May 23, 2002

by Hand Knit
Yeah, just use pages instead of posts. Posts are for categorized/tagged content that is associated with a date. Pages are for content that has hierarchical structure. The idea is that you can get at posts in multiple ways but pages only live on a single url.

fuf
Sep 12, 2004

haha
Nice, thanks guys. It does seem pretty easy to do it all with pages.

Two more (hopefully trivial) questions and I should be set:

1) Is there a piece of code I can put in a page that will display a list of all its children pages? (preferably in alphabetical order)

2) Is there an easy way to set a particular page as the default home page?

edit: put this in my page template file, which I found in the documentation for "wp list pages":

code:
<?php
  $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
  if ($children) { ?>
  <ul>
  <?php echo $children; ?>
  </ul>
  <?php } ?>
edit2: If I am messing around with the page template then I can't easily switch between themes right? I kind of wanted to have a mobile theme as well...

fuf fucked around with this message at 15:33 on Jun 14, 2010

cocteau
Nov 28, 2005

The best Darcy.

fuf posted:

2) Is there an easy way to set a particular page as the default home page?

edit2: If I am messing around with the page template then I can't easily switch between themes right? I kind of wanted to have a mobile theme as well...

Question 1: go to Settings > Reading and then choose the page you want as your home page under "Front page displays".

Question 2: You can use the plug in WP Touch for a mobile-friendly site. It offers a much more generic version but you can go in and tweak it if you want.

fuf
Sep 12, 2004

haha
Thanks.

I ended up using the Carrington Mobile theme which is loving sweet. It even looks good enough on a pc that I am just going to use it as my only theme.

raej
Sep 25, 2003

"Being drunk is the worst feeling of all. Except for all those other feelings."
I've been searching high and low for a plugin that I can use to keep records of things.

I'm running BuddyPress and I want to have a way for members to keep track of say, a record. Each record could have title, band, record label, etc, and people could add them to their own section with some extra things like what year they got it, condition, etc.

That way, when someone goes to a member's page on the site, they can see what records they have, sort them, etc.

Is there anything like that, or is that something I could do with the built in functionality?

I've found these two, but they don't quite do what I'm looking for:
http://wordpress.org/extend/plugins/objects/
http://wordpress.org/extend/plugins/my-record-collection/

Hanpan
Dec 5, 2004

I'm trying to settle on a PHP based CMS which I can use for the smaller client jobs where they jut need a simple sit with a few pages. I've been using Expression Engine, but a lot of my clients complain that the backend isn't easy to use and even the overdue EE2 hasn't really improved that much. The main reason I like EE was that if the client wanted a forum or some simple commerce, I could simply install the modules and it was done.

There seems to be a lot of complaints with EE2 so I was thinking of moving across to WordPress instead. Has anyone else here had a similar experience moving across, was it a smart move?

Ned
May 23, 2002

by Hand Knit
I've been to a ton of WordCamps and the people who seem to love WordPress the most are the small business owners who are able to put in content easily. It doesn't get easier than WordPress.

sim
Sep 24, 2003

I find Wordpress 100 times better than EE to develop in and about 20 times easier for the client to use. But, I have yet to settle on a good forum or e-commerce plugin.

fuf
Sep 12, 2004

haha
Any idea how I would get rid of the word "Protected" that appears in front of a page title if you add a password to the page?

I'm sure it just requires editing one of the theme files but I have no idea which one - it's like a maze sometimes!

Ned
May 23, 2002

by Hand Knit

fuf posted:

Any idea how I would get rid of the word "Protected" that appears in front of a page title if you add a password to the page?

I'm sure it just requires editing one of the theme files but I have no idea which one - it's like a maze sometimes!

Actually. It is slightly complex because that is hardcoded in there.
code:
function remove_protected_title_format($title) {
return str_replace('Protected: ', '', $title);
}

add_filter('protected_title_format', 'remove_protected_title_format');
Just toss this into your functions.php and it should work.

fuf
Sep 12, 2004

haha

Ned posted:

Actually. It is slightly complex because that is hardcoded in there.
code:
function remove_protected_title_format($title) {
return str_replace('Protected: ', '', $title);
}

add_filter('protected_title_format', 'remove_protected_title_format');
Just toss this into your functions.php and it should work.

worked perfectly, thanks.

This thread has been a million times more useful than all the official wordpress support :)

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

fuf posted:

worked perfectly, thanks.

This thread has been a million times more useful than all the official wordpress support :)

Ned should write a book if he hasn't already.

Midnight-
Aug 22, 2007

Pain or damage don't end the world, or despair, or fuckin' beatings. The world ends when you're dead. Until then, you got more punishment in store. Stand it like a man - and give some back.
Started really getting into wordpress and have just built my first custom design using Thematic, was a lot smoother than I thought and did everything I needed to do, took less than a day to get right.

My general question is, which framework is the best? The majority of the sites I make/will be making are small information sites that don't really use the blog aspect beyond News/Announcements and thats about it.

A friend of a friend recommended Genesis, but I'd rather not pay for something, my next port of call was Starkers.

Ned
May 23, 2002

by Hand Knit

Lumpy posted:

Ned should write a book if he hasn't already.

I know a couple of folks who have written WordPress books. I think the market is pretty saturated right now. I actually need to redo my website and try and build up my brand. I get introduced to major companies who want to use WordPress but I can't communicate well because I am in Japan now and the time difference is pretty drat rough.

People over here still use Movable Type but a lot of folks are starting to switch to WordPress. I think the market will explode in about a year so I am trying to set things up over here and take advantage of the opportunity when it arrives.

Midnight-: I don't you really need a framework. Just build off of the Twenty Ten theme that is the default in 3.0 - it is quite well written and a lot of the theme frameworks toss in a bunch of stuff that might be outdated by now.

cocteau
Nov 28, 2005

The best Darcy.

Midnight- posted:

Started really getting into wordpress and have just built my first custom design using Thematic, was a lot smoother than I thought and did everything I needed to do, took less than a day to get right.

My general question is, which framework is the best? The majority of the sites I make/will be making are small information sites that don't really use the blog aspect beyond News/Announcements and thats about it.

A friend of a friend recommended Genesis, but I'd rather not pay for something, my next port of call was Starkers.

Thematic is pretty good, but I find their PHP to be more complex than some themes. If you're a good coder it shouldn't matter, but if you just like to tweak existing code, it's not the best option.

My local WP guru has always developed off the default theme, but now is now using Genesis and likes it a lot. I understand your reluctance to to pay for it, but as I discovered, it's actually pretty reasonably priced. Furthermore, you get to pay once and use it over and over, and they don't care if you remove the Genesis links from your sites. So if you're doing professional development, it might not be a bad option. I haven't taken the plunge yet but I think I might in the next month or so.

I agree with Ned that Twenty-Ten may be a good option as well, although I haven't used it yet. One thing that was pointed out to me is that many themes do not properly utilize all WP hooks, which cripples much of the potential functionality. Furthermore, some themes like Starkers actually have some bad code (I can't remember what I found now, but I remember having to go in and replace some of the PHP at one point). Using the WP default theme helps avoid these problems, and Twenty-Ten looks really good.

One thing I have discovered is that by playing around with new themes and using different ones as springboards, you really get to learn how WP works, what good and bad code looks like, how to properly use the hooks, functions, stylesheets and so forth.

SmirkingJack
Nov 27, 2002
3.0, hot off the press!

http://wordpress.org/development/2010/06/thelonious/

Twiin
Nov 11, 2003

King of Suck!
I have not seen a WP theme/framework that comes anywhere close to Carrington for pro/CMS development.

Adbot
ADBOT LOVES YOU

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Twiin posted:

I have not seen a WP theme/framework that comes anywhere close to Carrington for pro/CMS development.

For us n00bs, can you give a quick summary of why this is so? I made my own "bare bones" theme and use that, but am always looking to be more lazy efficient.

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