MrOrsh
Forum Replies Created
-
Thank you! Realised WordPress automatically overwrites any changes made inbetween the # WORDPRESS.
I found a secound solutions that seems to be working just fine, generating 301 redirects with only one redirect with every attempt to reach the page (www, non-www, http, https). All gets forwarded to https://www. Is this also an OK way of doing the redirect through the htaccess-file. Or should I stick with your example?
# All to HTTPS <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://www.enkelteknik.se/$1 [L,R=301] </IfModule>Just wanted to give an update on this, and ask a follow-up-question.
I (FINALLY!) managed to solve the problem creating (as far as I can see) a perfect clone backup of my site on a localhost. I did this by completely removing the “Path” under “New settings” (leaving it blank). To use the picture below as reference I completely removed the text:
C:/xampp/htdocs/offline

I am however unsure of this possibly can do anything to mess up the site? Does the Path under New Settings need to be set? It seems like everything is working 100% as it is supposed to. Featured images showing and all. But I get a bit unsure since I guess the “Path” under “New Settings” is there for a reason?Thanks
I´ll support a ticket if I can´t figure it out 🙂
Stumbled across this question: https://wordpress.org/support/topic/images-srcset/ where someone has had the same issue. There the problem was solved with enabling rewrite_module in wamp. However in XAMPP it is already enabled so that didn´t really help me.
I have also seen that my featuerd pictures for articles too get the same “wrong” img-link. So they don´t display at all, even though they are not using the scrset attribute. So the problem doesn´t seem to be the srcset-attribute. Rather the faulty link structure seem to get applied to the images that have been somehow rezised (and/or using the srcset attribute).
I was able (as a test) to remove the whole srcset attribute from the images all together by using this code (and making the images appear):
function meks_disable_srcset( $sources ) { return false; } add_filter( 'wp_calculate_image_srcset', 'meks_disable_srcset' );However this didn´t solve the original problem. I know you wrote you didn´t really know what could be causing it. Just thought I´d ad in som more data to the conversation anyway 🙂
If i look at the srcset-link on the actual page it is displayed correctly as:
srcset="http://www.page.se/wp-content/uploads/2016/11/picture.jpgThere is an option for setting the page-url again under Advanced Options. But the only thing that works there is to leave it as the installer suggests (http://localhost/offline).
Can´t att all see where the added “C:/xampp/htdocs/” comes from! Been trying to go through my plugins and everything but can´t figure anything out :-/
The pictures that doesn´t use the srcset-attribute (that doesn´t need any kind of resizing) displays correctly. So the issue must be somewhere in the srcset… Making my head in 😛
This is how the installer looks like before step 2: http://i65.tinypic.com/21kcfp0.png

Does it look right?
- This reply was modified 9 years, 5 months ago by MrOrsh.
I´m gonna try and check the database.sql as soon as I can!
I checked with the theme creators and it´s not a theme function since the srcset is built in to wordpress nowdays.
Could it have something to do with that I tried to use the copy on localhost (xampp installation) instead of an actual host?
Forum: Fixing WordPress
In reply to: How to properly categorise postsThank you for the answer.
But are there any recommendations for wether one should place a post both in the main category and also in the sub category, or only in the subcategory (having the main category unchecked)?