nikc
Forum Replies Created
-
Forum: Plugins
In reply to: [RSS Image Feed] Bug in RSS Image Feed options pageI patched the plugin with this code to fix the issue:
function validate_options($input) { $newinput = array(); $newinput['image_size'] = trim($input['image_size']); $newinput['image_number'] = trim($input['image_number']); $newinput['excerpt_size'] = trim($input['excerpt_size']); $boolFields = array( "responsive", "media_content", "enclosure", "notext", "force_excerpt", ); foreach ($boolFields as $fieldName) { if (isset($input[$fieldName]) && is_bool($input[$fieldName])) { $newinput[$fieldName] = $input[$fieldName]; } elseif (isset($input[$fieldName]) && "1" === $input[$fieldName]) { $newinput[$fieldName] = true; } else { $newinput[$fieldName] = false; } } /* ... */
Forum: Fixing WordPress
In reply to: Change CSS/Style of posts by different post tags?Use
get_the_tags
and match for the tag you’re looking for. If you get a match, add a css-class to add a border.Forum: Fixing WordPress
In reply to: 301 to non-www (instead of default 302)What you’re looking for is mod_rewrite. There are plenty of howtos around that will hand the solution to you. Google is your friend here.
I recommend the Apache reference, if you’re already atleast vaguely familiar with mod_rewrite https://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
But basically, this is what you’re after (mind you, this is off the top of my head and untested):
RewriteEngine on # Turns on the RewriteEngine RewriteCond %{HOST} ^www\.host\.com$ # Match to your domain with www-host RewriteRule .* https://host.com$1 [R=301] # Redirect to non www-host
Good luck in your endeavors.
Forum: Fixing WordPress
In reply to: 2.6.0 > 2.6.2 upgrade. Lost access to Admin loginYes, the redirect seems to be broken, or atleast crippled.
If I access the admin via myblog.com/wp-admin it shows me the login screen regardless if I’m previously logged in or not, and always returns me to the login screen regardless of successful login or not.
However myblog.com/wp-admin/ (with trailing slash) redirects correctly with or without authentication in between.
IIRC this behaviour (requiring the trailing slash) wasn’t there in previous versions. To non-techy users this is also a possible cause of confusion and desperation. (Witnessed with my gf.)
Forum: Plugins
In reply to: WordPress.com stats and WP-CacheThanks for your reply. It made me look elsewhere and find out that the problem was a theme-issue. (No wp-footer() -call.)
Forum: Fixing WordPress
In reply to: 2.6.0 > 2.6.2 upgrade. Lost access to Admin loginSame problem with me.
Further than that, WP is losing my password all the time, ever since I upgraded.
Forum: Installing WordPress
In reply to: hmmm ? about blog templateYou should upload and decompress it to the wordpress/wp-content/themes/ directory, where it should after that have it’s own subdir. After that it should show up as a separate theme that you will be able to activate.
Forum: Fixing WordPress
In reply to: New page returning 404It just hit me why this solution (remove blog from the slug) worked for me, but should’nt be considered a fix for this problem.
I am running my WP installation on a subdomain blog.nikc.org. This is achieved by using mod_rewrite for redirecting the request to the appropriate directory, instead of having a “real” VirtualHost.
This directory contains the word blog, and matching is performed against it (in the $REQUEST_URI) to avoid a never ending redirection loop.
Because I am matching blog/ (with the slash) is probably why the page worked without the trailing slash. Why it didn’t work, was because the url (about-this-blog/) which ended in blog/ didn’t match the RewriteCond, and thus never reached WP.
Forum: Fixing WordPress
In reply to: New page returning 404That solved it, thanks!
I tried meddling with the slug myself, but always kept the word ‘blog’ in it.
Forum: Fixing WordPress
In reply to: New page returning 404Experimented some more, and turns out this link works when you omit the trailing slash.
https://blog.nikc.org/about-this-blog
I’m baffled. The link to my other page works like a charm, with or without a trailing slash.
https://blog.nikc.org/books-read-while-in-thailand/
https://blog.nikc.org/books-read-while-in-thailandHere’s the contents of my .htaccess just in case it could help. I do however suspect the fault is elsewhere.
—————–8<—————–
# BEGIN WordPress
### BEGIN wp-recent-links rules
RewriteRule ^recent-links/feed?/?$ wp-recent-links-rss2.php [QSA]
RewriteRule ^recent-links?/?$ wp-recent-links.php [QSA]
RewriteRule ^recent-links/([0-9]{4})?/?([0-9]{1,2})?/?$ wp-recent-links.php?y=$1&m=$2 [QSA]
### END wp-recent-links rules
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
—————–>8—————–I have tried removing the recent links-part, but it doesn’t change anything.
Many thanks!
Forum: Fixing WordPress
In reply to: New page returning 404Yes, it is writeable by WP, and I have recreated it several times with no avail.