odie2
Forum Replies Created
-
Forum: Everything else WordPress
In reply to: Bug: get_post_gallery() on 7th executionFound that more complicated.
get_post_gallery()
sometimes return["src"]
empty, so this is likefalse
.It could be easily fixed:
if ( false !== get_post_gallery(0, false) ) : //that's true endif;
Forum: Plugins
In reply to: [Yoast SEO] Replacing specified texts like breadcrumbsAnyone?
Hook would be helpful for
sprintf
in PHP to translate texts.Forum: Fixing WordPress
In reply to: Post format url pre-slugAnyone?
Is it possible to get https://localhost/wordpress/galeria/?
If not, are mod_rewrite for specific post formats are safe? Or better is just “t” instead “type”?Forum: Hacks
In reply to: front page query_posts limit posts only on first pageThank you so much!
Did function to work in index.php
If someone want use it in functions.php / plugins, rebuild it for your own.global $query_string; $front_limit = 5; -- change it for your own - limit on front page $my_query = 'ignore_sticky_posts=1'; -- if you want sticky posts on start, change "1" to "0" if ( !is_paged() ) : $my_query .= '&showposts='.$front_limit; else : function wpsites_exclude_latest_post($query) { global $front_limit; $page = get_query_var('paged'); $limit = get_option('posts_per_page'); $offset = ( - ( ($page - 2) * $limit + $front_limit ) ); $offset = strval($offset); $query->set( 'offset', $offset ); } add_action('pre_get_posts', 'wpsites_exclude_latest_post'); endif; query_posts( $query_string . $my_query );
Forum: Plugins
In reply to: front page query_posts limit posts only on first pageWrong forum section.
Please close/delete.Moved to https://www.ads-software.com/support/topic/front-page-query_posts-limit-posts-only-on-first-page-1.
Ah, sorry, I have modified regex in that plugin for
<noscript>
.
It’s#1
Pull Request.
You could download it from https://maciej.kuzniczysko.pl/files/lazyload.zip.Also short video: https://maciej.kuzniczysko.pl/files/tiled.avi (ah, those recording lags)
It’s plain
[gallery]
created in post (type Tiled Mosaic + forced tiled from Media options page). If you wish, I could share you git project if more info needed.Yes, I want Tiled Galleries to be printed correctly when I am using LazyLoad extension for Tiled Galleries (https://www.ads-software.com/support/topic/tiled-gallery-hooks) the images are not loaded before I press “Print” (Ctrl+P) so result is https://maciej.kuzniczysko.pl/images/tiled2.jpg. Needs disable LazyLoad for printing.
Also second issue is for printing and general – when JavaScript is disabled, image sized are based on $content_width and are not resized with JavaScript. So there are overflow (in printing and normal browsing) like https://maciej.kuzniczysko.pl/images/tiled3.jpg.
For main width I could write if statement for with sidebar and without sidebar. But what with zooming? I have responsive layout so on mobile I could see only some pixels of first photo. Only way I see is disable Tiled Galleries when no JavaScript.Forum: Plugins
In reply to: Post format url pre-slugFound solution on https://wpdreamer.com/2014/01/how-to-change-your-wordpress-category-tag-or-post-format-permalink-structure/#removing-slug
add_action( 'init', 'mysite_change_taxonomy_permalinks', 1 ); function mysite_change_taxonomy_permalinks() { // changing the post_format permastruct $taxonomy = 'post_format'; // change the settings at will but make sure 'slug' is set to NULL $post_format_rewrite = array( 'slug' => NULL, // we don't want no slug! ); // overwrites default post_format permastruct add_permastruct( $taxonomy, "%$taxonomy%", $post_format_rewrite ); }
Forum: Plugins
In reply to: [Remove Taxonomy Base Slug] Support for post format and author base slugsAlso looking for remove post formats base slug.
Needed because local site and I translated post format slugs, sohttps://localhost/wordpress/type/obrazek/ (image)
is not clean.
== Edit ==
Found solution on https://wpdreamer.com/2014/01/how-to-change-your-wordpress-category-tag-or-post-format-permalink-structure/#removing-slugadd_action( 'init', 'mysite_change_taxonomy_permalinks', 1 ); function mysite_change_taxonomy_permalinks() { // changing the post_format permastruct $taxonomy = 'post_format'; // change the settings at will but make sure 'slug' is set to NULL $post_format_rewrite = array( 'slug' => NULL, // we don't want no slug! ); // overwrites default post_format permastruct add_permastruct( $taxonomy, "%$taxonomy%", $post_format_rewrite ); }
Forum: Plugins
In reply to: Post format url pre-slugForum: Plugins
In reply to: Post format url pre-slugAny ideas?
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Tiled gallery hooksLol, nice one ??
Thanks, I just installed it and did little modifications (I will fork on github some things) and works amazing!
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Tiled gallery hooksHi,
I need it only for that [gallery] tag in gallery post format, because I have even galleries with 50 photos+ and my target recipients are people with very low internet speed.Thanks for response,
GreetingsHi,
In many cases for me helps:- Open Custom Content Type Manager settings
- edit certain pos type
- click Save
- should works until you add some new posts – then repeat from point 1
Greetings