CSS in luxury theme
-
Hi there, the octopus post, you have a blank paragraph that is directly above the paragraph that starts with “Don’t even bother…”. The blank paragraph is what is triggering that special formatting.
Open that post in the editor and remove that blank paragraph and the text will return to normal.
I notice that the horizontal rule is going over into the sidebar. Add this to your custom CSS to prevent that.
hr { width: auto; } -
I removed the space between paragraphs and that just moved the special formatting down a paragraph. What seems to be triggering it is the caption. I removed the captions and everything is okay. However, it’s only the captions on specific pictures — and the only common factor I can find with those pictures is they are .png or .jpg files that have been converted from .eps and .ai files, and they were purchased from the same stock image company. Images from other stock image companies — and I’ve purchased from several — don’t have that problem.
I know this all sounds weird and I’ve said it before, I know enough to be dangerous. So I defer to the expertise of others. But I would really like to be able to include captions with some images.
-
-
Update on the funky formatting: it appears to be .png files that cause the problem. When I convert the .png files to .jpg, they work fine.
-
Hi, hmmm, looking at the code, the first-paragraph formatting is triggered by an empty paragraph, which the theme inserts at the beginning of your content during creation of the page, and then hides it, it does not look at image type at all. Are there any other places on your site right now where this is occurring? I’ve not been able to reproduce this behavior on my test site and have tried about every combination of things I can think of. If possible, I would like to look at one of your pages or posts where this is happening.
-
I think I may be on to something here — it may not be the file type, but the file name that is causing the problem. Since I was converting these files, when I saved it, Illustrator re-named it by adding [converted] to the end of the file name. When I remove that, there’s no problem.
Could the brackets be causing the problem?
-
Well, that theory (above) doesn’t seem to fly, since the file name isn’t saved like that in WP. But re-naming the file did help. I’ve gone back to the octopus post and added back one of the original images that was causing the problem. It also only happens when there’s a caption.
So the file name plus a caption? None of this makes sense to me, and I know I’m throwing out some off-the-wall theories, but there’s some truth in there somewhere.
-
-
Hi, I went into the editor on the Octopus post, and when I switched to the HTML/Text tab in the editor and scrolled down to your octopus/cat image, this is what I found:
[caption id="attachment_23258" align="alignright" width="251"]<img class="alignright wp-image-23258" src="https://belindaostrowski.files.wordpress.com/2017/03/adobestock_141887934-converted1.jpg?w=600" alt="AdobeStock_141887934 [Converted]" width="251" height="251" /> "What are you doing here? I told you to stay in the tank!"[/caption]Apparently, that isn't the case...
Look toward the end. Notice that Apparently starts right after the ending bracket on the ending caption tag? That was the problem. When I put my cursor at the beginning of Apparently and hit return to make it into its own paragraph, the issue went away.This first paragraph code this theme is using seems finicky. I’m going to chat with one of our developers and see what they think about making some sort of change so it is less problematic.
I went ahead and saved that change to the post, so if you look at it now, it is fixed.
-
Thank you! It did work. It still seems strange to me that that only happened when I used particular files, but it goes to show you things aren’t always what they seem or how you perceive them…I think I have a blog post idea…
-
You are welcome.
It may be that when you switched files once, the code corrected and the paragraph was below the image code, and when you again changed, the code moved back up for some reason.
If you have that happen again, switch to the HTML/Text tab and look to see if the paragraph that has the issue is like the above, starting right after the code. If so, put your cusor at the beginning of the text after the closing caption tag while still in the HTML/Text tab and hit return/enter twice (that does a paragraph break when in the HTML/Text tab).
I’m going to file a bug report on this to see if there is a way they can have the software check for this situation and NOT apply the first paragraph code to it.
-
@belindao919, I’ve still not been able to reproduce this issue, no matter how hard I try, but I do have a suggestion to perhaps keep it from happening in the future.
Go here in your wp-admin dashboard (Settings > Writing) and under Formatting at the top, check the WordPress should correct invalidly nested XHTML automatically and save changes. The WordPress software will then look at everything in the post or page and fix a lot of issues that may cause problems. I’m not sure if it will fix this if it happens again, but it just might.
-
I’ve played around with it, and it oddly seems to happen with only some files. I’ve tried to find a common factor, and the only thing seems to be adding a caption, but even with that it isn’t consistent. Adding that space removes the problem, but removing the space doesn’t also seem to create it again.
Anyway, I followed your suggestion. Hopefully that helps.
Again, I appreciate all of your help. Always glad when you’re the Happiness Engineer who responds to my requests for assistance!
-
- The topic ‘CSS in luxury theme’ is closed to new replies.