Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
kedo
Nov 27, 2007

^^^ Did you try adding !important? I find a lot of css gets overwritten by WordPress's default styling. Also maybe try list-style-type as opposed to list-style?

Can anyone recommend a plugin or gallery template that works with the NextGEN Gallery plugin... I'm looking for one that will run a slideshow and also show thumbnails. I'm using GalleryView currently, but it has some major flaws (preloads all images on page load, so you end up waiting forever for a gallery to show up if it has a lot of images).

Google is failing me. Javascript is preferred to Flash, and jQuery to MooTools.

kedo fucked around with this message at 22:23 on Nov 9, 2011

Adbot
ADBOT LOVES YOU

kedo
Nov 27, 2007

Zedlic posted:

What's the best tutorial/book you know of on making a Wordpress theme? I know basic HTML/CSS as well as PHP, but have never even looked at how a Wordpress theme works.

Googling gives me a million tutorials of course, but I want to avoid the crap.

Honestly if you already know HTML/CSS/PHP, the only thing you need to know is where things live in the theme, and all of that is covered by WordPress's codex: http://codex.wordpress.org/Theme_Development If you read through that entire section of the codex you will know pretty much everything.

One of the best ways to learn imo is to start with a good blank theme (such as http://whiteboardframework.com/ which is what I've generally used) and then just jump into it (at least that's what I force WP novices to do at work. :) )

kedo
Nov 27, 2007

Any WP / PHP guru tell me why this little chunk of code is causing my server to throw a "connection to server reset" error? It's recursive, so I imagine that's the problem... but I'm not sure exactly what the issue is (I have many other recursive functions working just fine). I know enough PHP to be dangerous, but not to fix diz shiz apparently. :smith:

code:
function root_parent($thePost) {
  // Get the post's parent
    $postParent = get_post($thePost->post_parent);

  // If there is no parent we're on the root parent! Return the slug.
    if ($postParent == 0) return $thePost->post_name;

  // Otherwise there IS a parent, so loop the function.  
    else return root_parent($postParent);
}
Or if anyone has a better way to do this, I'd be open to that as well. My goal is to be able to echo the slug of a page's root parent. So for example on either of these pages:

About > Our Staff > John Doe
About > Contact Us

it'd echo:

about

kedo fucked around with this message at 22:57 on Mar 20, 2012

kedo
Nov 27, 2007

Pento McGreno posted:

When get_post() is passed an empty value, it will try to get a post ID from $GLOBALS instead. Sanity check post_parent before you use it:

You are wonderful and I love you. And I also feel like a bit of an idiot. Lotsa feelings, man. :confused:

Anyhow, thanks much! That works perfectly.

kedo
Nov 27, 2007

Anyone know of a good multiple content block plugin that works with WP's revision tracking? I just realized the other day that Multiple Content Blocks doesn't, which is problematic. Apparently they're working on it, but who knows when it'll be done.

\/\/ Advanced Custom Fields looks like exactly what I need, and way more user friendly than MCB. Thanks!

kedo fucked around with this message at 22:07 on Jan 9, 2013

kedo
Nov 27, 2007

Flaggy posted:

Does anyone know of a way to make a "landing page" of sorts. Where customers are directed from a blog to download either a free brochure or to view a video but have to give a name and email address first and than clicking submit leads them to the page with the brochure or video and submits the info to me?

You're basically just talking about making a simple website. You could potentially accomplish this with a basic WP install and various plugins, but I'm guessing you might be kind of new to this and it'd probably be a huuuuuuge timesink for you. Hiring a web designer / developer may be a better option.

e: Also if you're forcing someone to give you their name and email address before letting them download a brochure or view a video it'd better be a drat good brochure or video, otherwise you're just going to piss off all your users. Most users just won't give you their details anyways.

kedo
Nov 27, 2007

Question for your WordPress gurus:

How idiotic would it be to somehow hack WP into working as a public login / posting system? I'm super comfortable developing in it so this is appealing to me, but I also realize this isn't really what it's made for.

Super basic functionality description:
• Ability for users to create accounts
• Ability for those users to make posts

I've only ever used WP for projects that were just glorified blogs or basic sites that needed a simple CMS. However now I'm working on a new project that's a little more community driven, and I've never really explored that. The reason why I'm even considering WP is because I know how I'd organize and act on content (eg. categories, tags, etc).

Any good plugins to look at? Anything I should be aware of going into this? Or is this just a dumb idea? Seems to me that the biggest problem might be number of users / posts. I worry that this wouldn't be sustainable if you had several hundred / thousand users.

kedo
Nov 27, 2007

Adraeus posted:

Take a look at BuddyPress and the premium plugins. What you're looking for is there. I saw it last night.

Looks promising – thanks!

kedo
Nov 27, 2007

caiman posted:

I'm completely new to Wordpress. I'm working on someone else's site and all I have access to is the Dashboard (no server access). What I'm needing to do is have the user fill out a form with their name, email address, and which document they want (three checkboxes), and upon submitting the form an email is automatically sent to the user with their chosen document attached to it. Is this even possible to do?

Without knowledge of and/or access to code you are pretty much limited to installing / using plugins. This one will should do what you want: http://wordpress.org/extend/plugins/contact-form-7/

If the FTP login info isn't saved in the dashboard, you'll need that to install a new plugin. And depending on how the server is setup it may or may not work out of the box. Sometimes you have to tweak various server settings for email forms to function properly. Just do lots of testing.

Flaggy posted:

Is there a way to embed video without using youtube. I want to upload a video and not have it associated to youtube. (Bosses request for that) is there a way to do it? What format should the video be in?

Either upload it on another site that's not YouTube (Vimeo is a good option) or there's always VideoPress (which costs money, but isn't associated with any video site – from your boss's perspective the video will just live on your site).

You could also just upload it as a .mp4 or whatever format it's in and hope that people have the right codecs to play it, but that's not a great option.

e: You can also use Flash CS3 or greater to wrap the video in a Flash player, which you could then just upload to your server and insert into a post via HTML. However this obviously would not work on all devices since it's Flash.

kedo fucked around with this message at 17:44 on Jan 28, 2013

kedo
Nov 27, 2007

DNQ posted:

I'm at my wits end with Wordpress and getting constantly hacked - to the extent I'm starting to wonder I don't have the knowledge or skills to run this anymore.

I received some excellent advice a couple of pages ago for my blog (http://www.themasterplanblog.com/) and followed this advice. I've installed Wordfence and run scans, I've changed my admin passwords, deleted all plugins and superfluous themes (other than official current Wordpress theme), and yet I'm still constantly getting hacked/having problems.

Latest issue is all my formatting and fonts have disappeared. No matter which theme I use there are no fonts or formatting.

Wordfence and Sucuri are both giving me nothing - no idea what's gone wrong and/or how to fix it.. ideas welcome.

I might look at your .htaccess to start – I tried to view your stylesheet and it redirected me to another URL.

Fixing a hacked WP site can be a huge pain in the rear end. I seriously doubt that installing plugins will fix the issue. The only way I've ever been able to completely fix a hacked WP site in the past has been to find the offending code (often in base64 – so look for that) in whatever files / parts of the database it resides in, deleting it, updating WP to the most recent version and as a last resort, exporting posts and starting over from scratch with a completely fresh install. I hope you have clean backups somewhere.

What you need to do is going to depend a lot on how exactly your site was hacked, so without seeing the files it's hard to give you a solid recommendation besides this: plugins won't fix your site.

fakedit: You should also consider changing all your usernames and and passwords both in WordPress and on FTP / hosting control panel, if you haven't already.

realedit: And if you're not up to trying to manually sanitize all the code, you might want to consider going with wordpress.com

kedo
Nov 27, 2007

Anyone aware of a plugin that allows the creation of nested ordered/unordered lists via the WYSIWYG editor? I have a client who hates editing HTML, but needs nested lists.


edit: Disregard this... turns out clicking the indent button while editing a list does exactly this. Not sure how I never figured that out until now. :downs:

kedo fucked around with this message at 21:21 on Feb 4, 2013

kedo
Nov 27, 2007

Flaggy posted:



I am having an issue where the text is supposed to be in the box, can't figure out why its doing it. Any help would be much appreciated, if you have any question or need the website let me know. I am using a TinyMCE widget plugin with 1/3 columns.

:10bux: says there's a set height on that box in a CSS doc somewhere.. Remove it, or change it to height: auto;

If not, try adding a clearfix to the bottom of that container. And/or overflow:auto; to the container.

kedo
Nov 27, 2007

el Brainvomito posted:

I feel so stupid to ask this, but since any embedding method doesn't work, how the corky hell you add Youtube/Vimeo-videos in the post? What plugin I need? All I get is these "Add gazillion videos on your sidebar/banner"-things, when I need just one video on my page.

drat you iFrame-haters!

Jetpack lets you just copy and paste the URL for a video into a page/post and then automagically converts it into an embed. It theoretically respects the maximum media dimensions you've set, but can be finicky at times. Also requires a WordPress.com account. But it's one of the easiest ways to embed video from a content editor perspective.

Not sure if it uses iframes or not, but those are hard to avoid with some video services. :smith:

kedo
Nov 27, 2007

Vintersorg posted:

Any reason one of the sites im working on is having issue creating new posts that have the same name as ones that were deleted in the past? I can create what is known as new Locations and they display properly.

Basically some companies were deleted back in January, we'll call one of them Company A. The client is trying to re-add them with all the exact same information but they won't show up on the live site. They show up in the backend but any links redirect to some other site.

EDIT: After some fiddling I noticed some weird behaviour. If I change the URL it will load the page up. But the moment I change it back it redirects to another site. Adding my test of "-1" to the end of the url will now ALSO redirect. Only if I change the permanent link again will it load the page up.

Does that make any sense? What the heck is going on there.

That actually sounds very much like their WP install has been hacked, assuming the "other site" is not one to which they intend to redirect. Check the code for large amounts of base64 encoded gibberish. I experienced the same thing with a client's site a few months ago. If this is the case, your best bet is to sanitize their theme, give a hard look at their database to make sure there's nothing in there (I don't remember seeing anything), and do a fresh WP / plugin install.

Otherwise I'd look at your .htaccess to see if there's something funky in there.

kedo fucked around with this message at 14:30 on Mar 13, 2013

kedo
Nov 27, 2007

I have a client who's having some weird issues with a specific post (when you'd try to edit it, it would throwing errors when trying to load the revisions). In the course of troubleshooting the problem, I found that every single image in all of his posts are saved in the database as base64. I checked a couple of other WP sites I maintain and did not see the same thing.

Anyone know if this is normal and/or caused by a plugin? Whenever I see base64 I get paranoid and automatically assume something's been hacked, however I tested all the images out – they're the correct images... just encoded for some weird reason.

e: Hmmm actually it looks like only some of his images are in base64... images which he created. I wonder if he's copying and pasting them from some other program that's sticking them in his clipboard as base64?

kedo fucked around with this message at 15:42 on Apr 18, 2013

kedo
Nov 27, 2007

-JS- posted:

Inline images in the post? I've seen this happen (although not specifically on Wordpress) when you drag the image or copy/paste into the TinyMCE editor.

Yeah, after discussing it with the client it sounds like that's it, although I think it might be the browser (Firefox) rather than TinyMCE?

Either way it's retarded and I need to figure out a way to disable it. This client's database is about a week old and is already up to 300MB since WP is basically duplicating every image he's inserted in the database every time it saves a revision. Oh god how will I sanitize and export this... :psyduck:

kedo
Nov 27, 2007

I'm not using that many and out of all of 'em I think TinyMCE is probably the most obvious culprit.

Advanced Custom Fields
Contact Form 7
Formstack plugin
Jetpack
MailChimp
TinyMCE Advanced

However a bunch of forums / blog posts I've read all state that Firefox automatically converts images dropped in a textarea into base64, and I know for a fact the client is both using Firefox and dropping images into textareas, but I haven't found anything from Mozilla confirming it. However I sort of have a hard time believing it because it's so idiotic.

Also dragging and dropping an image into a textarea in Chrome just opens the image in the window... it doesn't put the image in the textarea, which leads me to believe it's probably browser related.

kedo
Nov 27, 2007

Vintersorg posted:

I am in the middle of hell right now transferring a site designed in Twitter Bootstrap to WordPress. Overall it doesn't seem to bad aside from still waiting on content from the client. I am playing dangerous though as I need to include the Bootstrap JS and files. I looked around for plugins but the authors don't seem to keep things up to date.

Is my original method of just putting the Twitter BS files in the folders going to be okay?

The right way to do this would be to integrate Bootstrap into the theme itself, using plugins isn't what you want to do because they break / clients uninstall them randomly, etc.

kedo
Nov 27, 2007

Shadowstar posted:

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

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

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

kedo
Nov 27, 2007

Shadowstar posted:

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

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

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

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

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

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

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

kedo
Nov 27, 2007

Gyshall posted:

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

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

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

kedo
Nov 27, 2007

Ned posted:

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

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

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

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

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

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

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

kedo
Nov 27, 2007

Delzuma posted:

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

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

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

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

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

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

kedo
Nov 27, 2007

CrushedWill posted:

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

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

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

CrushedWill posted:

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

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

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

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



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

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

kedo
Nov 27, 2007

a lovely poster posted:

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

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

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

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


e2: Googled

code:
global $wp_query;

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

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

kedo
Nov 27, 2007

Anyone aware of a plugin that modifies search results to display the specific piece of content in a page/post which contains the query in the results? Here's an example of what I'm looking for (amusing text provided by the client):

quote:

(search query is for "good", italics = highlighted text)

Democrats are the best.
"...for a party that believes in good government, there's no..."
"...without economic fairness, what good is personal freedom..."

Republicans are the worst.
"...leaders are up to no good. Their policies favor the..."
"...means the greatest good for the greatest number..."

By default WP just shows the excerpt for whatever post/page it finds, of course.

kedo
Nov 27, 2007

Flaggy posted:

So I am having some trouble and I am hoping someone can help, I recently moved my wordpress site I was building to a new url, on the new url, the images are not loading, the plugins all had to be reactivated with none of the old settings or anything. All the images are in the correct folders on the server, and all the folders got moved over just fine. Can anyone help? If it helps I thought I had changed my permalinks before moving but apparently I didn't. I have tried using the search and replace plugin on the new url but it didn't work.

Five bucks says they're still trying to request images from the old URL, unless you did a find + replace in your database and/or code (depending on where the images are declared).

For example, when you insert an image into a post by default WordPress inserts it with an absolute URL. So if you built the site on whatever.com, your images would all be whatever.com/wp-content/uploads/2013/06/whatever.jpg If you then moved the site to the new server and did not update all those links in the database, it'll still be trying to load images from the old server.

e: Also a link to the actual site in question would be helpful.

kedo
Nov 27, 2007

Flaggy posted:

How would I go about changing this, I tried doing the search/replace using a plugin and nothing changed.

Manually in WordPress if you hate yourself, or by exporting the database, opening it up in a text editor, doing a find and replace for whatever.com --> newwhatever.com and then re-uploading it.

You could probably also do it with via SSH with SQL commands, but I am terrible at those and have no idea how you'd accomplish it.

kedo
Nov 27, 2007

Flaggy posted:

One other question, everything looks great in Chrome and Firefox but for older browers, Internet Explorer especially is a pain in the rear end, is there a quick way around this.

Nope. There is no magical "fix this for Internet Explorer" button. You'll have to debug the CSS manually or have someone else do it for you.

However depending on what version of IE you're talking about and your target audience, you could potentially ignore it. We've been discussing this in the web design & development megathread recently, actually. Unless your audience is on abnormally crappy computers you can generally ignore IE 7 and lower.

kedo fucked around with this message at 14:41 on Jun 21, 2013

kedo
Nov 27, 2007

GZA Genius posted:

I'm trying to install a theme right now and it is taking forever. It is 9mb and I'm using a wireless connection. It's been "unpacking the package" for a good 30 minutes right now. It only took about 15 minutes to upload. Is there a problem or do I just need to wait some more?

Probably stalled out or something. Are you on a wordpress.com account or a custom wordpress.org install?

If it's the latter, you're way, way better off uploading the theme via FTP and then activating it. If it's the former, might want to try again.

kedo
Nov 27, 2007

Ether Frenzy posted:

On a similar "How do I move this" question -

I've built a new theme/custom CSS design on a test WP location (e.g. https://www.test.mysite.com) and would like to move the whole thing to the live existing WP location (e.g.https://www.mysite.com) which already has content, etc. -- both locations are on the same server. I don't want to lose the content at the existing location.

Is there some easy method for making my live site look like the test one or is it just as straightforward to just copy all the CSS/edited php files and move them and the new media over manually?


(This is only for design/plugins/media, URL and domain are not changing)

If you developed your theme correctly it should all be contained within a single folder in the /wp-content/themes/ directory on your test site. Download that folder, upload it to the same spot on the live site, then activate the theme.

That should be it, unless I've misunderstood your question. Moving a theme does not change the content on a site unless you're doing something really weird.

kedo
Nov 27, 2007

Ether Frenzy posted:

Doh. Definitely was overthinking it, and trying to do it via the wordpress dashboard. Thanks.

Yeah, never do anything besides activating/deactivating things via the WordPress dashboard. You're just introducing more moving parts and weird PHP functions on top of what could be a very simple task.

Same thing goes for plugins, WordPress updates, etc. Those functions are in the dashboard for people who are like, "FTP? Whaaa :psyduck: like the people who send flowers?"

kedo
Nov 27, 2007

Shadowstar posted:

Huh? What are the downsides to upgrading core and plugins via the dashboard? Seems a lot quicker and more convenient than FTP, and I'm a developer.

I've just seen it fail enough that I don't rely on it anymore. Could be due to weird client servers or angry internet gods or whatever, but I just find FTP to generally be more reliable. It is not as quick or convenient, granted.

\/\/ Hmm, good points. Maybe the updater is better these days? The last time I used it must have been years ago... Mayhaps it's time to try it out again.

kedo fucked around with this message at 14:57 on Jul 9, 2013

kedo
Nov 27, 2007

Vintersorg posted:

Is there a way to add a dropdown in the editor for users to add my custom CSS for certain things? I have a couple classes that go with things and instead of having them add classes to divs in the background I was asked if I could get it in a menu. I thought I found some stuff earlier but it's nowhere to be found now.

EDIT: This sorta does what I need to do: http://alisothegeek.com/2011/05/tinymce-styles-dropdown-wordpress-visual-editor/

Seems I can just add my classes to that array and it'll apply to the element.

Yes, but that article is making it way more complex than it needs to be.

Basically just:

1) Install TinyMCE
2) Make a file called editor-styles.css in your theme directory and put your styles (classes) in it
3) Put the styles drop down in the TinyMCE toolbar

And that's it.


e: Protip – use only lowercase letters and nothing else for class names, as it seems to have problems with any other characters.

kedo
Nov 27, 2007

fuf posted:

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.

This is very easy to accomplish with media queries, which requires you have a basic understanding of CSS and the ability/know-how to edit the theme. Here's a simple example:

XML code:
<style type="text/css">
#left, #right {
  width: 50%;
  float: left;
}
@media screen and (max-width: 700px) {
  #left, #right {
    width: 100%;
    float: none;
  }
}
</style>

<div id="left">
  Blah blah blah
</div>

<div id="right">
  Blah blah blah
</div>
700px is an arbitrary breakpoint of course.


fuf posted:

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?

That's really vague, there are a million solutions. Check out some of these sites and pick a treatment you like.



fakeedit: Gah, how do I get HTML syntax highlighting :'(

kedo fucked around with this message at 16:54 on Jul 16, 2013

kedo
Nov 27, 2007

Lumpy posted:

use: code=html

However, I don't think it does syntax highlighting for HTML anyway.

Yeah, I always try that and am bummed out when it doesn't work.

Oh well.

kedo
Nov 27, 2007

Lumpy posted:

So I guess use XML maybe? Let's test!

Wooo, XML it is! Now I'll just have to post a disclaimer every time saying, "no, this isn't really XML," but whatever. It highlights syntax nicely so who gives a gently caress!


fuf posted:

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 only downside I can think of is that depending on what content you have living in the sidebar it could logically make more sense below the main content area from a content hierarchy perspective. Generally speaking you want your most important content first for SEO and users who disable stylesheets, but this is super granular and won't matter a whole lot for 99% of your users.


fuf posted:

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?

Yep, but as long as it's not loading huge images or something we're probably talking milliseconds. Duplicate content of any sort is usually considered bad. However you can accomplish a lot with media queries and targeted Javascript, so even if you have shitloads of stuff going on in the sidebar I'd bet you could find a way to make it work in a mobile layout... it'd just require more time and effort.

kedo
Nov 27, 2007

clockworkjoe posted:

a friend of mine got his wordpress site hacked and he'll have to recreate it from scratch. If he downloads the mysql database file, is there a local database browser program he can use to copy the posts from his site so he doesn't lose them entirely? How do you view/browse/copy data from a mysql database locally? I know it's just a text file but sorting through it with notepad++ is a pain in the rear end.

The easiest solution might be to do a local WP install with MAMP or something, import the database and then export a WordPress backup. You could try browsing the SQL file with phpMyAdmin or some similar program, but it's not going to be much easier than doing it with a text editor.

e: Also, what kind of hack was it? As long as they didn't get into the database you could probably just upload a fresh copy of WP and keep using the same database... most WP hacks I've seen in the past only infect php files and whatnot.

kedo fucked around with this message at 19:07 on Jul 16, 2013

kedo
Nov 27, 2007

Sad Panda posted:

If no one has an idea for that. One thing that came to mind, is there a way to update widget text by email? I've got a Kindle that nearly always has email access so if I could email something saying for example "Medellin, Colombia" and then the wordpress widget displayed that it'd be something.

This might work for you – WP Google Maps. It's not going to be quite as easy as just pressing a button on Latitude, but them's the breaks. You may need to get the professional version if you want to create a map for each post, or whatever.

Depending on how technologically / code proficient you are you could potentially do something that's a little more customized with the Google Maps API.

Adbot
ADBOT LOVES YOU

kedo
Nov 27, 2007

A client of mine is getting ready to launch a network of WordPress-driven blogs. I have tons of experience working with WP, but not with a network of individual blogs. I know there's a slew of plugins out there designed to make managing a bunch of separate installs easier... can anyone point me to their favorites and/or some articles about best practices?

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