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
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

Adbot
ADBOT LOVES YOU

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

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.

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!

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 :)

fuf
Sep 12, 2004

haha
I want to put some French translations I've done online and I'm hoping I can use wordpress because it's the only thing I really have any experience with.

I want to publish both the French version and my translation, so basically I'd have two versions of every post, one in French and one in English (I figure this is the best way to do it, but maybe not).

What I'd really love is if visitors could easily flip between the two using tabs at the top of the page or something. Can anyone think of a way to do this?

Actually it's just occurred to me that this is basically the same situation as any blog that supports different languages, so maybe there are already plugins or something?

edit: there are some multilingual plugins, but they all seem to do too much. I just want a way of establishing a correspondence between pairs of posts so that the English post can link to it's French version and vice versa.

edit 2: or perhaps a better solution would be to have the English and French both in the same post and then have a clever "collapsible" layout?

edit 3: I got this working by putting the english and french in two separate divs in the same post and then using jquery to show / hide them.

fuf fucked around with this message at 15:59 on Sep 3, 2011

fuf
Sep 12, 2004

haha
Thanks for the tips.

I don't think I'll splash out for WPML but maybe I'll take a closer look at qTranslate. I did give it a quick try but not in too much depth.

I guess in the long run something like qTranslate would be better than my current solution, which requires putting css directly into each post (not ideal).

fuf
Sep 12, 2004

haha

Ned posted:

Why does it require you to do this? You should be able to stick the language into body_class() and modify the layout with the regular css files.

Are you talking about qTranslate? I don't know what body_class() is. :shobon:

I was talking about my own clunky solution where I put the French and English in the same post but in two separate divs and then use jQuery to switch between which is visible.

fuf
Sep 12, 2004

haha
One thing I've always wondered is what happens to a child theme if the parent theme gets an update? Could that cause conflicts or problems?

Are there any themes that are particularly suited to serve as the basis for a child theme? The few times I've done it I've always used the twenty eleven theme. I like fairly minimal sites so I'd quite like a theme where I have to add features, rather than spending a lot of time taking features out. What's the most minimal it gets without actually having to start from scratch?

Finally, my retired dad is part of a little photography club. He mentioned that they'd quite like a website where they can each log in and upload their photos and have their own little gallery. Seems like a perfect job for wordpress, are there any plugins or themes that are particularly suited to that?

fuf
Sep 12, 2004

haha

Gnack posted:

The google term you're looking for is "skeleton" or "boilerplate" theme, there are a few around. I can't recommend a specific one since I haven't look too far into it but I have used a few way back and they're specifically made to serve as a basis for a child theme.

Edit: Had a very brief look and this one looks pretty good as it has all the basic stuff built in and you just have to add your bells and whistles on top: http://www.simplethemes.com/blog/entry/skeleton-wordpress-theme

Just wanted to say thanks for this. That Skeleton theme looks awesome, and I also found one that uses Twitter Bootstrap which is pretty cool.

fuf
Sep 12, 2004

haha
I want pages listing all the posts in certain categories, but I also want unique description text on each of those pages ("the posts in this category are about...").

Do I have to create a separate page template for each category? What I'd really like is to use a single template and then when I add a page somehow tell the template which category to list posts from.

fuf
Sep 12, 2004

haha
Is there a name for the way of displaying posts in a grid where each post has a little box with an image and the title?

Like this: http://www.theforge.co.za/portfolio/

I'm hoping there's a plugin that will display 12 random posts in a 4x3 grid but I don't know what to search for.

e: Obviously enough they seem to be called grids. I need to stop asking such retarded questions, I'm sorry. Here's the best plugin I found:
http://wordpress.org/extend/plugins/category-grid-view-gallery/

fuf fucked around with this message at 12:41 on Oct 6, 2012

fuf
Sep 12, 2004

haha
1. Is it possible to get the name of the author of a comment in the comment reply link?

Like "Reply to fuf" instead of just "Reply".

2. There's no way of controlling the text that facebook selects when you use a share button, right? It's annoying that it gets the post title from the title of the page but then repeats it in the little text summary bit.

fuf fucked around with this message at 20:15 on Nov 28, 2012

fuf
Sep 12, 2004

haha
Is it possible to change the comments form so that Name is required but Email isn't?

There's an "Comment author must fill out name and e-mail" option in the settings but I only want the name to be required.

Editing the comments form itself doesn't seem to help. If I remove the email field completely I still get the error page saying "please fill out required fields (name, email)." I'd also like to change the text of this error message if possible.

Any idea where I can edit that stuff?

edit: so it's all in wp-post-comments.php. But is it a good idea to edit that directly? Could an update wipe out my changes?

fuf fucked around with this message at 16:51 on Dec 13, 2012

fuf
Sep 12, 2004

haha

RentCavalier posted:

Well, I'll take my question here, since Wordpress was suggested to me in my other thread.

So I'm an inexperienced web designer who knows very little about programming, and I've been given the reigns to a pretty old website that hasn't been particularly well maintained for some years now.

I am currently using Microsoft Expression, and it does this weird loving thing where it keeps duplicating bits of code whenever I publish a page, making that page display two headers or two banners or similar stuff.

I was told that I should just use a Wordpress CMS to take care of my site. My questions are thus:

1. What's the easiest way to transfer my web files into the Wordpress CMS? Is it even possible to maintain a currently-existing website on Wordpress or would I have to at the very least copy/paste all the data into new sheets?

2. Would using Wordpress change my web address? I answer to a board of directors and serve an organization that is largely populated by older folks, so they are a bit conservative regarding anything like "change" especially when it comes to technology. Would I be able to use the Wordpress CMS without having to alter my URL?

3. Would I have to drastically change the website's layout to make it function with Wordpress? Would using wordpress even solve the issue I described?

Thank you very much for your help in this matter.

It's hard to answer your questions without knowing all the details.

1) What kind of content are you talking about? You would probably have to copy / paste all of your content into individual WordPress posts or pages. You can't just copy the whole site into WP.

2) In theory you can install WordPress at the same URL as your current site. It depends on the details of your current hosting and the domain name. You could install WP on the same server as your current site, or point the domain to a different server (in both cases the url would remain the same).

3) Probably. If you're deeply attached to the current layout WordPress might not be the way to go. But if you don't mind the layout changing then it will certainly solve your problem of having two banners etc.

fuf
Sep 12, 2004

haha
Sounds like it was a DNS issue.

Speaking of moving from the move from wordpress.com to a self-hosted install: I did this recently for someone and he's complaining about losing features. Specifically, he's worried that people can't search for and "follow" his blog from wordpress.com any more. Does anyone have any experience with this? Is it possible to get externally hosted blogs to show up on wordpress.com or something?

fuf
Sep 12, 2004

haha

deimos posted:

You have to stop using the admin user.

What does this mean? Like disable it somehow?

fuf
Sep 12, 2004

haha
What's the best way to go about mobile themes?

I made a weird looking theme and of course it looks like poo poo on phones.

Is there a way to detect if someone's on a phone and load a whole different theme? Or would it be easier in the long run to just have one theme and modify it so it looks good on both?

fuf
Sep 12, 2004

haha
Thanks. I think I will bite the bullet and try using the @media thing. I've only ever seen it working in Twitter Bootstrap, so I think I'll have to use that as a basis and just keep copying stuff until it works.

Big images aren't a problem, the main challenge is going to be switching from a two-column desktop layout to a one-column phone layout.

fuf
Sep 12, 2004

haha
Is there a tried and tested way of using a responsive theme to turn a 2-column layout into a 1-column mobile layout? i.e. if the user's resolution is below a certain width it puts the sidebar contents in a row on the top of the page instead of along the side.

I am using http://www.rootstheme.com/ which so far I really like.

Alternatively, how else would you go about making a blog with a sidebar display nicely on narrow mobile screens? Maybe make the sidebar collapsible or something?

fuf
Sep 12, 2004

haha
Thanks kedo.

The roots theme actually already does exactly what you described, but because the sidebar is on the right it ends up below the main content instead of above.

I got it working by changing the content and sidebar to float:right and moved the sidebar code above the content code. (I just hope this hasn't had any other effects :ohdear:)

The sidebar itself actually has a pretty complicated layout, and it's gonna be pretty hard to make it look good when it's at the top of the screen. For future reference: is it feasible to have two completely separate divs, one sidebar and one topbar, and show/hide them depending on media queries? I guess I could do it with display:none, but that would slow down the site because it has to load both each time, right?

fuf
Sep 12, 2004

haha
I'm no expert but is your front page cached somehow? Can you make other changes to that menu (not the popdown bit)?

Maybe the theme is doing something weird? Looking for references to is_front_page() in the code might help.

fuf
Sep 12, 2004

haha

Flaggy posted:

I am an idiot and just figured it out, thanks for that though. It did help.

Literally the first time I have been vaguely helpful in this thread after years of asking stupid questions.

shelter posted:

FYI, you can post on the Roots Google Group to get answers for your questions: https://groups.google.com/forum/#!forum/roots-theme

(I made Roots)

Cool, thanks, I will.

Again: I really, really like Roots. :)

fuf
Sep 12, 2004

haha
Sorry double post.

I don't think this is a question about Roots but maybe I should be asking on that google group.

I'm trying to change the text for the comment-reply-link to something other than "Reply".

There's nothing in the theme, and the only reference I can find is to $reply_text in includes/comment-template.php, but I can't actually see where that is defined. I can get it working by just replacing $reply_text with my new text but that seems like a bad solution because I'm changing stuff outside the theme directory.

How else could I do it?

fuf
Sep 12, 2004

haha

Ned posted:

Stole the answer from here: http://wordpress.org/support/topic/how-to-change-wording-of-leave-a-reply

code:
function comment_reform ($arg) {
$arg['title_reply'] = __('Submit a comment:');
return $arg;
}
add_filter('comment_form_defaults','comment_reform');
Basically you need to apply a filter and that will replace the default text without modifying the core.

Awesome, thanks.

The function I need to change is actually "comment_reply_link", so I tried this instead:
code:
function comment_reform ($arg) {
$arg['reply_text'] = __('new reply text');
return $arg;
}
add_filter('comment_reply_link','comment_reform');
but it didn't work (because I have no idea what I'm doing).

But that link you posted had another solution based on where comment_reply_link is called in the theme's comment.php file and I got it working that way (I was gonna post the code but the lines are too long and break the tables).

The main thing is there are no changes to the core files anymore. :)

fuf
Sep 12, 2004

haha
What's a good way of letting someone check a site before it goes live?

I looked at a bunch of "maintenance mode" plugins that let logged in users see the site as normal, but display something else for everyone else. This would be ideal, but the "something else" always seems to be some embarrassing, garish page.

I basically just want the site to look like this:
code:
<html>
coming soon
</html>
unless someone is logged in.

edit: never mind I found a good one. "Dashboard Maintenance Mode" just puts a very basic maintenance.php in /wp-content that gets shown to non-logged in people.

fuf fucked around with this message at 18:01 on Sep 9, 2013

fuf
Sep 12, 2004

haha
If your shared hosting is not that good then the slow loading times might not be anything to do with wordpress at all.

Switching to dedicated would almost certainly speed things up but maybe it's not necessary.

I just switched from Dreamhost to Lithium hosting (goon run and good goon discounts) and even though it's still shared hosting (and actually cheaper) the difference in speed is staggering. I always thought WP was just kinda slow, but now I realise a lot of it was because of bad hosting.

fuf fucked around with this message at 16:03 on Sep 10, 2013

fuf
Sep 12, 2004

haha
In the loop where the posts are displayed, give the div for each post a unique id based on their post id:

code:
id="<?php the_ID(); ?>"
Probably here:

code:
<article <?php post_class(); ?> id="<?php the_ID(); ?>">
Then change this line of your nav:

code:
echo '<li><a href="' . get_permalink($recent["ID"]) . '" 
to:

code:
    echo '<li><a href="#' . $recent["ID"] . '" 

fuf
Sep 12, 2004

haha

enthe0s posted:

How does Wordpress minify its CSS? Is it an automatic thing or do you have to do it yourself?

All the css is in your theme folder, and you have to minify it yourself.

(I might be wrong about this but it's what I've always assumed)

fuf
Sep 12, 2004

haha

enthe0s posted:

I was hoping that was not the case, since Google mostly came up with plugins to minify it as well. Oh well, thanks!

It's not too hard to minify everything locally before you upload though? I'm not sure why you would want wordpress to do it.

fuf
Sep 12, 2004

haha
Can we discuss "useful plugins that should go on every WP install"?

I like Limit login attempts and BackupWordPress

Do people use Akismet? It looks like you have to pay now?

fuf
Sep 12, 2004

haha
What happened wordpress thread I thought you were cool :(

fuf
Sep 12, 2004

haha
Yeah you need a wordpress.com account, and turns out you can choose a personal plan for free. :)

fuf
Sep 12, 2004

haha
This is a long shot but does anyone have any experience with the 3 clicks theme?

http://themeforest.net/item/3clicks-responsive-multipurpose-wordpress-theme/5092225

I can't work out how to edit the goddamn css. I swear every time I refresh the page it decides to use a different stylesheet located in some random place.

fuf
Sep 12, 2004

haha
Thanks. Changes to the child theme css weren't registering either. Or rather some of them would suddenly register after a few refreshes. It was weird.

Anyway turns out there was some weird caching going on (and complicated css generation like you guessed). I think I have a handle on it now.

Half the time I'm really impressed with these monolithic wordpress themes, and the rest of the time I get super frustrated when I have to spend ages figuring out how they work.

fuf
Sep 12, 2004

haha
Yeah the server php.ini is nothing to do with your wordpress install. Ask Lithium.

fuf
Sep 12, 2004

haha
I'm looking for an image slider plugin where the slides are added to an "extra images" box underneath the "featured image" box on the edit post page. Ring any bells?

Alternatively what's a good image slider plugin for inserting images into a post?

fuf
Sep 12, 2004

haha
Thanks that looks useful. I'm actually more comfortable with code than I am trying to work out convoluted plugin menus most of the time. :v:

Is WordPress SEO the same thing as Yoast? I was just asked to install that as well.

fuf
Sep 12, 2004

haha
Does chrome / firefox dev tools show any javascript errors in the console?

Are you sure you're including jQuery itself (not just that easing plugin) somewhere? If it says "$ not defined" or something similar then you're probably not loading jQuery properly.

Adbot
ADBOT LOVES YOU

fuf
Sep 12, 2004

haha
Yeah so you need to include jQuery and the plugin.
Probably easiest just to use versions hosted elsewhere.

Replace your line:
<script src="jquery.easing.1.3.js" type="text/javascript"></script>

with:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>

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