Lrrr
Forum Replies Created
-
One more thing occurred to me, think about the problem the other way around.
Do not use the above code.
Create a child theme and in it an attachment page and try the difference in front without DFI and with DFI. Respectively with uninstalled and installed DFI. How come the image in the content block is rendered in one case and not in the other? How come there is a difference in behavior on a single attachment page? Thank you.Hi, thank you for try, but did you try make and use a child theme? I understand it as you did not. – Yes, you see the picture twice in that scenairo you described. Thats normal. The “fix” code is needed only for child theme. If you would be so kind to try it as I decribed, I would appreciate it. I did try almost everything (including disbaled all plugins). Thank you. Also, its concerning WP 6.9. You must manually allow the attachment pages if you are on fresh install. Attachment pages are disabled on fresh wp installs, but on already existing(only updated to 6.9+), they are normally available. Maybe it is due to this, as far as I understand WP is using featured image as content on attachmnets for wp 6.9 (but not sure)… And generally, yes, attachment pages are very useful, if you need content around your image. There are plenty use case. I dont understand the WP treat them as legacy…
- This reply was modified 4 months, 1 week ago by Lrrr.
Hi, (I tested it on the official twenty twenty five template and its child.) thanks to your answer, I tried something else, delete attachment.html in the child theme folder and finally delete the custom template for attachment in guttenberg. So when the child theme loads the attachment by default, everything works. However, as soon as I create a default copy of single.html as an attachment, and it doesn’t matter if it’s only in Guttenberg as a custom or some html file in the template folder, the image simply won’t load without the code and the space is empty. I tried both the feature image block and the content block. After this test, I’m not sure if the fact that I connected this behavior with your plugin is a combination of circumstances – that things changed at the time the plugin was uninstalled, or if it’s the behavior of wordpress. Anyway, I didn’t need the code before the plugin. On the other hand, I also tried to completely delete function.php in the child template and also without result, so the child theme is not the cause. But it doesn’t hurt in the parent template either. So it’s really weird.
Only parent theme – ok
child theme – ok
child theme with custom attachment page – need fix (code above)
After todays tests Im not sure, if your plugin is the cause. So, my apologize if not.Forum: Fixing WordPress
In reply to: 4.4 broked primary xoxo hieararchy…closing tospics, there was a Mistake in my function file. Sorry and thank you all! Its fixed.
Forum: Fixing WordPress
In reply to: Thumbnails generated with wrong css size class and img atributesMoving this topic to theme forum, because after long investigation, Im suppossing its parent theme issue, I have tested also WP default themes, but it has not excerpts with images. So I will post this to thematictheme.com
My end results are that issue will arise, only if excerpt printed out on screen…
Forum: Fixing WordPress
In reply to: Thumbnails generated with wrong css size class and img atributesVery Interesting partial result!!!
I had to comment out part of code becose it is not cropping thumbnails at all! Explanation in comment:add_theme_support( 'post-thumbnails' ); //set_post_thumbnail_size( 180, 180, true ); // not works with cropping setted in media backend!!! add_image_size( 'related', 150, 100, true ); //related , must regenerate thumnails afterUnfortunatelly Im still facing wrong dimension issue…
Forum: Fixing WordPress
In reply to: Thumbnails generated with wrong css size class and img atributesSorry all Im totally dissapoitnted, when I unsett all custom sizes and regenerated thumbnails I put in function.php
function wpdocs_setup_theme() { add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 180, 180, true ); } add_action( 'after_setup_theme', 'wpdocs_setup_theme' );And regenerate thumbnails again, and whats happen?! When I want to insert image into post it offers me only square images from 180 over 300 to 800px … but squares… anyone know what Im doing wrong? I set only thumbnail to square! ?! – Im stupid It was square image… lol… rofl…
Forum: Fixing WordPress
In reply to: Thumbnails generated with wrong css size class and img atributesactually thinking about
_wp_get_image_size_from_metawhich i think takes image size from image meta someway… Im stuck dont know where to track it…even I made several sizes like in screenshot that works as you can see on printscreen, even default thumbnail have 180px… but still in
<imgtag on main page http://www.danielkral.cz/clanky have 100px dimensions:<img width="100" height="100" src="http://www.danielkral.cz/wp-content/uploads/K9mailLogo-180x180.png" class="attachment-100x100 size-100x100 wp-post-image" alt="K9mailLogo" title="K-9 email" srcset="http://www.danielkral.cz/wp-content/uploads/K9mailLogo-180x180.png 180w, http://www.danielkral.cz/wp-content/uploads/K9mailLogo.png 300w" sizes="(max-width: 100px) 100vw, 100px">Forum: Fixing WordPress
In reply to: wordpress website isn't opening on particular computer browserwhat about try switch of firewall and antivirus for a while? If it will works then, then it could be blocking it for that browser, and also try a ping some server (wordpress) in cmd…
secondly, try a run PC in safe mode with network,
third, if you say its your laptop only there could be some restriction on network possibly changed?
Very hard said from far, try to find some colleague with IT capabilities 🙂Forum: Fixing WordPress
In reply to: Thumbnails generated with wrong css size class and img atributesI found today somethimg could be linked to my issue (maybe not becose there is AJAX used): http://wordpress.stackexchange.com/questions/42860/wp-get-attachment-image-returns-different-image-size
Now Im searaching for the function which is responsible for wordpress that gets the image dimensions to check it, actually have not found so if you know please share… thx Im probably close cos im rewieving
wp_calculate_image_sizesfunction and theirs variables…Actually i can get rid of the dimension atributes on image even I can filter classes but I do not want to do it, I want to know why Im getting 100×100 image size on image with other size…
Forum: Fixing WordPress
In reply to: Thumbnails generated with wrong css size class and img atributesUpdate 3: I will keep it simple, deleted all files .php and .js from theme folder, issue persist. Other wp default templates works normally.
Issue: wrong sizes attachment-100×100 size-100×100 and width=”100″ height=”100″, also the responsive sizes are wrongly generated sizes=”(max-width: 100px) 100vw, 100px at home page and archives. But on single page it is correct.
Have done: changed default thumnail size at settings media backend, regenerated thumbnails. Leaving a try to put custom size. Default size changed thumbnail must work.Forum: Fixing WordPress
In reply to: Thumbnails generated with wrong css size class and img atributesThanks, I have this issue only when using excerpt on my main page, in single page even it is original thumbnail its resized corectly because ut was setted in media setting on backend… so this, Its happening on main page when using excepts.
Also i observed that issue is gone, when switch to other template, so I will have to check my function file…
Thank you, but I do not uderstand to it much, even if I did put your code the image appears in position I putted the code, so its totally wrong… you code should only change the value of variable not the print image…
I did read it before I wrote here… Im solving it and googling all day…Update: I totally deleted my function.php and problem persist, so really its somewhere in other template files…
Update2: this is my single article img, its correct, but on main page where are excerpts there is wrong sizes as I posted here before.<img src="http://www.danielkral.cz/wp-content/uploads/K9mailLogo-180x180.png" alt="K9mailLogo" width="180" height="180" class="alignleft size100px size-thumbnail wp-image-5330" srcset="http://www.danielkral.cz/wp-content/uploads/K9mailLogo-180x180.png 180w, http://www.danielkral.cz/wp-content/uploads/K9mailLogo.png 300w" sizes="(max-width: 180px) 100vw, 180px">Please understand that I dont need specially sized images, it is enough to change default thumbnail size, what I even did in wp settings… but now Im facing this issue, that thumnails css and sizes are incorect when displayed on archive template, sorry for longer descrition I should do that first time yet… 😉
I found the fix: disable “Enable full-height editor and distraction-free functionality.” in the menu of displayed boxes of edit post…
Other solution is to allow fullscreen…I have same issue, even I have more rows of custom buttons so Im not seeing more lines than you… I think its CSS issue and it should be easy to fix it.
<div id="ed_toolbar"is overlaping the edit code box…Forum: Fixing WordPress
In reply to: 4.4 broked primary xoxo hieararchy…Hi, I found the issue, not actual function in my Own theme: heres the code which if I disable , everything works fine. Sorry for incovenience.
function XYXcustom_tax($args) { global $wp_query; global $post; $dk_page = get_page_by_title( 'foto' ); $je_fot = has_parent( ($wp_query->post), $dk_page->ID) ; if( is_tax( 'attachment' ) || $je_fot ) { $args = array( 'taxonomy' => 'attachment'); $args['largest'] = 1.8; //largest tag $args['smallest'] = 1; //smallest tag $args['unit'] = 'em'; //tag font unit } if( !is_tax( 'attachment' ) && !$je_fot) { $args = array( 'taxonomy' => 'post_tag'); $args['largest'] = 1.8; //largest tag $args['smallest'] = 1; //smallest tag $args['unit'] = 'em'; //tag font unit } return $args; } add_filter('widget_tag_cloud_args','dk_display_custom_tax');Please if you get the idea where is the my code loosing actuality, and why this code caussing the missing envelop tag for tag cloud, please would be kind to tell me… Thanks, and happy New Year!
Thats it: was not compatible due to taxonomy reallocating, dont know why there must be:
$args['taxonomy'] = 'post_tag';for working switching the tag cloud in the new WP…
Forum: Fixing WordPress
In reply to: 4.4 broked primary xoxo hieararchy…Main theme is thematic, but my own is child… But still have to say it worked before update to 4.4… https://thematictheme.com/