odie2
Forum Replies Created
-
Forum: Plugins
In reply to: [Yoast SEO] Breadcrumbs – help!It was really not hard to search in Google.
Three results from first page that describing breadcrumbs deep:
Forum: Plugins
In reply to: [Yoast SEO] Structured Data – help!Can’t you post in one thread about those validators?
Can’t you read FAQ?
Can’t you search in search engine first?Shame.
Forum: Fixing WordPress
In reply to: Child page old URL brokenAnyone?
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Photon working, but disabledFor now, I’m afraid I can only recommend that you avoid layout issues with CSS, as recommended here:
https://codex.www.ads-software.com/Content_Width#Adding_Theme_SupportThis makes sense ??
Why I didn’t got so simple idea ??
Will test when receipt of website after 20th June.
Thanks!There are 2 work-arounds to disable Photon for your Tiled Galleries
Hmm, but as I saw, when fix “
$content_width
issue” it will be even good images’ size difference for positive. So I will write then PHP check-for-response function, just for future (no one knows that someday will explose all website servers excluding mine ??Uhm, I am still writing too much “guess-yourself-what-I-am-talking-about” as it works in my native Polish language ??
By
I don’t like Tiled Galleries just for it, because the same when narrower full page width
and
Maybe could I do any fallback for disable Tiled Galleries when error?
I mean exactly the same on this paragraph, so
$content_width
overflow/loading larger images than needed.Also for
Maybe could I do any fallback for disable Tiled Galleries when error?
There doesn’t work JS resizing when page loaded to max useable width, just it stays overflowed (due those 305px with sidebar). But maybe first CSS suggestion will repair it. Will give feedback after 20th.
I found that ticket about
$content_width
and realized that my theme builded directly on TwentyFourteen also had trick to change value when conditionals met. Will check it.At the moment thanks, maybe I will change my mind on get rid of Tiled Galleries then ^^ (“guess-yourself-what-I-am-talking-about” explanation – maybe I will accept Tiled Galleries like they are).
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Photon working, but disabledI wanted disable module for custom image size 3 columns grid, but collaborator is opposite :/
So, I won’t dependent on Photon’s servers. Could I easier remove Photon’s prefix (to include image from my site) without test by PHP on load if server is responding?
Also, could I filter
$content_width
or Tiled Galleries depending on my PHP variable defined beforeget_header()
or in mainwhile
loop?
I am defining if include sidebar on certain WP theme file (category, content-gallery, page templates etc.). So with sidebar my$content_width
for useable galleries width (there are paddings) should be max 823px, when no – max 1128px.
It needed for older browser as when 1128px on 823px, JS can’t resize it to fact width, so 305px width (minus padding-right) are overflowed.
Also I don’t like Tiled Galleries just for it, because the same when narrower full page width (mobile responsive view or old, big monitors).
Maybe could I do any fallback for disable Tiled Galleries when error?
At the moment I can’t tell what browser exactly causing problem – because saw it on not my computer, but think that Opera 12.x (note that it’s still popular browser and very good pasing current technologies tests). I address site to school when some public computers are pretty old and only those browsers could work there with all available computer’s resources.As always, collaborator-graphic makes me confused ??
Forum: Plugins
In reply to: [WP Gallery Custom Links] Useful plugin – but not SEO friendlyAt the moment found working author’s solution in Add 2 more fields? thread.
add_filter( 'wpgcl_filter_raw_gallery_link_url', 'my_gallery_link_url_filter', 10, 3 ); function my_gallery_link_url_filter( $link, $attachment_id, $post_id ) { return $link . '" rel="nofollow'; }
Seems reasonably, should be added to FAQ section and I think it’s enought.
Forum: Plugins
In reply to: [WP Gallery Custom Links] Useful plugin – but not SEO friendlyHi,
It seems like there are no problem to add filter of output or add checkbox/dropdown.
But I don’t see GitHub or similar so I could do pull request.Came here from the same reason – just working locally on SEO and realized that two partnership pages with ~40 external URL aren’t good…
Looking for author response.
Greetings
I already did some changes and as child page of page, it’s now https://zschocianow.nazwa.pl/wordpress/prezentacja/technikum-mechatroniczne/ and “Najlepsze projekty uczniów” header in half of scroll, above video.
Of course I will do pull request, but my fork still seems like stopped currently on
c3b06b1b148b1605f26769349b191d2e17cdeb4b
(Revert) and slideshow’s files are completely outdated. Maybe it’s only my fork/Git Extensions bug – will delete fork and try again.Corrected it in plugin, because in my opinion it should depends on gallery images’ size and set
'full'
only if no specified.However there seems like little mess on GitHub after merge (so reverted Slideshow changes), so will wait with pushing pull request.
Forum: Plugins
In reply to: [FV Top Level Categories] category pagination breaks when used?Hi,
It seems like bug with own pagination_base. At least in my case with following in functions.php:
function custom_pagination_base() { global $wp_rewrite; $wp_rewrite->pagination_base = 'strona'; $wp_rewrite->flush_rules(); } add_action( 'init', 'custom_pagination_base' );
Already created pull request on project’s GitHub, so fix for this should be released soon.
Greetings
Forum: Everything else WordPress
In reply to: Bug: get_post_gallery() on 7th executionYes, I reported it linking this thread little before your post – https://core.trac.www.ads-software.com/ticket/31907
Many thanks for help…
Download modified and replace files – https://maciej.kuzniczysko.pl/files/manual-image-crop.zip
Or modify it by your own:wp-content\plugins\manual-image-crop\lib\ManualImageCrop.php
//prepares coordinates that will be passed to cropping function $dst_x = 0; $dst_y = 0; $src_x = max(0, $_POST['select']['x']) * $_POST['previewScale']; $src_y = max(0, $_POST['select']['y']) * $_POST['previewScale']; $src_w = max(0, $_POST['select']['w']) * $_POST['previewScale']; $src_h = max(0, $_POST['select']['h']) * $_POST['previewScale']; //saves the selected area $imageMetadata = wp_get_attachment_metadata($_POST['attachmentId']); $imageMetadata['micSelectedArea'][$_POST['editedSize']] = array( 'x' => $_POST['select']['x'], 'y' => $_POST['select']['y'], 'w' => $_POST['select']['w'], 'h' => $_POST['select']['h'],
->
//prepares coordinates that will be passed to cropping function $dst_x = 0; $dst_y = 0; $src_x = max(0, $_POST['select']['x']) * $_POST['previewScale']; $src_y = max(0, $_POST['select']['y']) * $_POST['previewScale']; $src_w = max(0, $_POST['select']['w']) * $_POST['previewScale']; $src_h = max(0, $_POST['select']['h']) * $_POST['previewScale']; $is_higher = ( $dst_h > wp_get_image_editor( $src_file )->get_size()["height"] ); $is_wider = ( $dst_w > wp_get_image_editor( $src_file )->get_size()["width"] ); if ( $is_higher || $is_wider ) : if ( $is_higher ) $scale = $src_h / wp_get_image_editor( $src_file )->get_size()["height"]; else $scale = $src_w / wp_get_image_editor( $src_file )->get_size()["width"]; $src_w = $src_w / $scale; $src_h = $src_h / $scale; $src_x = $src_x / $scale; $src_y = $src_y / $scale; endif; //saves the selected area $imageMetadata = wp_get_attachment_metadata($_POST['attachmentId']); $imageMetadata['micSelectedArea'][$_POST['editedSize']] = array( 'x' => $_POST['select']['x'], 'y' => $_POST['select']['y'], 'w' => $_POST['select']['w'], 'h' => $_POST['select']['h'],
wp-content\plugins\manual-image-crop\lib\ManualImageCropEditorWindow.php
$src_file_url = wp_get_attachment_image_src($_GET['postId'], 'full'); if (!$src_file_url) { echo json_encode (array('status' => 'error', 'message' => 'wrong attachement' ) ); exit; } $src_file = str_replace($uploadsDir['baseurl'], $uploadsDir['basedir'], $src_file_url[0]); $sizes = getimagesize($src_file); $previewWidth = min($sizes[0], 500); $previewHeight = min($sizes[1], 350); $previewRatio = 1;
->
$src_file_url = wp_get_attachment_image_src($_GET['postId'], 'full'); if (!$src_file_url) { echo json_encode (array('status' => 'error', 'message' => 'wrong attachement' ) ); exit; } $src_file = str_replace($uploadsDir['baseurl'], $uploadsDir['basedir'], $src_file_url[0]); $sizes = getimagesize($src_file); $original[0] = $sizes[0]; $original[1] = $sizes[1]; if ($width > $sizes[0]) { $sizes[1] = ( $sizes[1] * ($width / $sizes[0]) ); $height = ceil($height); $sizes[0] = $width; } $previewWidth = min($sizes[0], 500); $previewHeight = min($sizes[1], 350); $previewRatio = 1;
and
<?php _e('Original picture dimensions:','microp') ?> <strong><?php echo $sizes[0]; ?> x <?php echo $sizes[1]; ?> px</strong><br />
->
<?php _e('Original picture dimensions:','microp') ?> <strong><?php echo $original[0]; ?> x <?php echo $original[1]; ?> px</strong><br />
Forum: Hacks
In reply to: Stretch too short image for image sizeHi tormorten,
Thanks for leading me for right way. Aqua Resizer is little not good enough for me because I have some photos that should be croped manually due for example people faces, so I could give redactors Manual Image Crop.
However, large thanks for that. With keyword “upscale” from Aqua I found Thumbnail upscale & correct crop in WordPress article and now I am happy ??
Wish you the best ??
Without you I perhaps never find that unusually keyword.Forum: Hacks
In reply to: Pagination: posts limited only on first pageUnfortunately the same issue:
add_action( 'pre_get_posts', 'custom_pre_get_posts', 1 ); function custom_pre_get_posts( $query ){ if ( $query->is_main_query() ) : if ( $query->is_home && !$query->is_paged ){ $query->set( 'ignore_sticky_posts', true ); $query->set( 'posts_per_page', 5 ); } else { $query->set( 'posts_per_page', 10 ); $offset = ( (get_query_var('paged') - 2) * 10 + 5 ); $query->set( 'offset', $offset ); return; } endif; }
It’s looks like because offset. To show excluded 5 posts from first page it have to be here. However it also moves last posts to overflow so they are no attached on last (41) page.
I am definetely sure that will be used only in front page, so I think it’s better to include code only in index.php due my functions.php are going little large. Also I am not wrong, php hooks could be called also after code that is destination (at least in downloaded for my own and <title> tag).
+ for cleaner set query variables. Just note that you lose
$query->is_main_query()
so code took effect also for my slider’ and widget’ posts.Forum: Hacks
In reply to: Stretch too short image for image sizeAnyone?