sojweb
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: copying darabase to transfer siteThere’s always that. Good luck!
Forum: Fixing WordPress
In reply to: copying darabase to transfer siteCheckout the import/export features. They’re under “Tools” in 2.7. Also, take a look at this for a more extensive solution: http://codex.wordpress.org/Backing_Up_Your_Database
http://codex.wordpress.org/Restoring_Your_Database_From_BackupForum: Fixing WordPress
In reply to: Invalid feed – XML parsing errorGlad to help :-). You might want to let the plugin author know so that they can fix it.
Forum: Fixing WordPress
In reply to: Invalid feed – XML parsing errorThe problem is the
&source=rssbeing appended to the RSS links. I’m not aware of WordPress doing that; is some plugin doing that? To fix it, it should be&source=rss.Forum: Fixing WordPress
In reply to: post_category NOT WORKINGChange:
$my_post['post_category'] = prep($row['category']);to:
$my_post['post_category'] = array(prep($row['category']));Forum: Plugins
In reply to: FCKeditor – using wrong toolbarsPost a little more information about what happened. When did it stop working, and what happened just prior? How have you used it before?
Forum: Fixing WordPress
In reply to: Warning message runs on top of page. Please help.Looks like a plugin problem. Line 473 of
wp-settings.phpis the one that includes plugin files, so it seems one or more of the plugins you installed is written incorrectly. Just delete/disable them. If you have WP-SuperCache installed, clear your cache after deleting them.If that doesn’t do it, you should be able to manually deactivate your plugins by sticking this line of code in your theme’s
functions.phpfile:update_option('active_plugins',array());Fair warning, that disables all of them, and will do so until that line is removed, so be sure to take it out when you’re done :-).
Forum: Plugins
In reply to: Dont close my HTML tagsI’ll second that. Seriously.
Besides, you can’t work with open tags in visual mode; when the view is rendered, the browser closes the elements whether they’re explicitly closed in the HTML or not. It has to. There’s no way around that.
Forum: Fixing WordPress
In reply to: post_category NOT WORKINGNo one’s going to be able to help you without seeing the script, but it looks like it relies on the old category system, which hasn’t been used for a couple years. Your script probably needs to be substantially rewritten.
Forum: Plugins
In reply to: use is_home() within plugin codeWhat exactly are you trying to do? Perhaps the
is_front_page()function could be of help?Forum: Fixing WordPress
In reply to: Getting WordPress to power our site’s root???If you updated your site’s address in the wordpress admin, then moved the files, then copied
index.phpand.htaccessto the root level, then editedindex.phpas they described, it should work. Do you now have an htaccess file that looks like this:<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>In the root of your Web site (I’m assuming you’re on an Apache server)?
Forum: Fixing WordPress
In reply to: Getting WordPress to power our site’s root???It might just be that there isn’t an htaccess file yet. I checked out http://relmonline.com/blog/ and it doesn’t look like you’ve enabled permalinks, so it’s likely that WordPress never created one for you.
http://codex.wordpress.org/Using_Permalinks#Creating_and_editing_.28.htaccess.29
Forum: Fixing WordPress
In reply to: IO error when uploadin a 2MB Mp3 fileCheck with your host to make sure you don’t have file size upload limits; if you do, and it’s smaller than your file, you’ll get an error regardless of how you upload it. They might increase it for you if you ask.
Forum: Fixing WordPress
In reply to: wp removes codeI assume you’re running in the administrative roles? By default, WordPress filters the HTML of certain roles. I’d download the Role Manager plugin and make sure that the role you’re running in is allowed unfiltered HTML.
Forum: Plugins
In reply to: How (where) to include php-file with variables?Is your theme using functions to include page sections (like
get_sidebar(),get_header(), etc.)? If so, it’s a problem of scope; those functions don’t have explicit access to any variables defined outside of them.There are a couple ways around this, you could use manual includes instead of functions in your template (for instance, instead of
get_sidebar();, userequire_once TEMPLATEPATH.'/sidebar.php';), and then put all of these variables at the top of your header file, or some other file that is common to all pages.Probably the simplest thing to do, though, is to create a function in
functions.phpin your theme directory that spits out the text you need when you pass it what you want. Doing this, you’re guaranteed that you’ll have access to the variables at any place in your theme, and you don’t need to modify any of your theme’s files (except functions.php, of course).For instance, you might make a function like this:
function echo_theme_text($type='', $language='') { /** * Include the translation data here; * copy and paste from translation.php, or do an include */ // Fail text; returned if no match found $fail_text = 'text retrieval failed.'; // Get the right text variable switch($type) { case 'home_teaser': $text_variable = $_PAGE_HOME_TEASERTEXT; break; case 'home_body': $text_variable = $_PAGE_HOME_BODYTEXT; break; /** Add however many blocks here as you have variables */ } // In case no matches where found if(!isset($text_variable)) echo $fail_text; // Make sure language data exists before returning if(isset($text_variable[$language])) echo $text_variable[$language]; // Otherwise, fail out else echo $fail_text; }Then, in your theme, wherever you needed a translation, you could use
<?php echo_theme_text('home_teaser','en'); ?>.