back2music
Forum Replies Created
-
My apologies, guys, the plugin seems to be working fine, although initially everything pointed to WP Statistics—without it, the HTTP Uncaught SyntaxError error disappeared.
The real cause was an accidental duplication of lines:
define( ‘DISALLOW_FILE_EDIT’, true );
in wp-config
so everything is fine now
And thanks for your smart plugin, it’s very nice.
Good luck!Dear Matthew, thank you very much, it works perfectly!
Thank you for the answer!
The diagnostics page https://pagespeed.web.dev suggested me to defer the script execution. Could you explain why they think this is necessary?Forum: Plugins
In reply to: [DCO Comment Attachment] jQuery dependencyIt works fine, thank you and happy New Year!
Thank you!
I’m not very good at programming but I’ll have a try.IIt’s a pity.
I wrote the player script myself. Do you think there is a simple way to change the script so as to bind images to Photonick?Forum: Plugins
In reply to: [Redirection] Plugin rules not working in .htaccessHi John and thanks for your quick reply!
Please let me know if I got it right – the htaccess redirection code above has no mistakes and it should work under normal circumstances?Hello Sayontan!
Just in case you interested, i have found a nice way to use dropdown in an attachement categories gallery page using URL query strings. It utilises the wordpress function ‘wp_dropdown_categories’ and a short script right in the gallery page-id.php. Here is the code:
<?php $linkParam = sanitize_text_field( $_GET['acat'] );
wp_dropdown_categories(array(
'id' => 'drop',
'exclude' => '2395',
'hierarchical' => true,
'order' => 'ASC',
'orderby' => 'name',
'show_count' => 1,
'show_option_none' => 'Choose a category',
'taxonomy' => 'attachment_category',
'selected' => $linkParam, ) ); ?>
<script>
let dropdown = document.getElementById('drop');
let selIndex = new URL (window.location.href).searchParams.get('acat');
dropdown.addEventListener("change", onCatChange);
function onCatChange() {
let selIndex = dropdown.options[dropdown.selectedIndex].value;
location.href ="look?acat="+selIndex; }
</script>
<?php echo do_shortcode('[gallery style="random" category="' . $linkParam . '" main_size="full" order="DESC" orderby="ID" tile_size="full" link="file"]');?>It works perfectly with the Media Library Categories plugin. It also works fine when the gallery page is opened by an external link with a query string ‘?acat=X’ where X is the ID of the category you want the gallery page to show.
Thank you once again for your kind assistance, it really helped me to resolve the problem. Have a good day!I found out that accordions are based on CSS display:block/none and tested the feature. A display:none gallery loads as fast as a blank page and only starts loading images after selecting “display:block”. So, as far as I can tell, the idea works fine and I can use it with my dropdown.
Thank you again!Thanks for the tip!
I just trying to device a simple solution to print galleries on a page using dropdown where a user could select and see different attachment categories from my media library.
For now I coded a dropdown using JS, but still have no idea how to use it to change category value in shortcode.
I’m not sure if I should ask your advice on it in this topic though.I found the cause of the problem, it was my mistake – I just forgot to load the footer in the page-php. Everything work fine now, sorry to bother you with trifles.
I understand, no problem, thanks!
Another question, if you don’t mind. I print a gallery directly from a page-id-template like so:
<?php echo do_shortcode('[gallery category="200"]'); ?>
and everything goes fine, but as soon as I change it to<?php echo do_shortcode('[gallery category="200" style="random"]'); ?>
I get a blank area instead of the page content.
Interesting that when if I’m moving a mouse over the blank area I can see the gallery links in the left bottom corner of the browser. The links open in a new page on click, as if the gallery plugin wasn’t there at all. The same Photonic code works fine inside the page.
Is there a way to print Photonic gallery using PHP or may be JS?Forum: Plugins
In reply to: [Media Library Categories] [gallery category="slug"]Sorry, that was my mistake! I found that I was using “attachment_category” instead of just “category” shortcode. With the latter everything works fine.
PS – it’s weird that [gallery] works with the wrong option at all, so I didn’t notice it right away.Thank you for your lightning fast reply!
#1 – are you planning to add the Mosaic Trigger width and Random Tile height options for individual gallery shortcode?
#2 – tile_size option works perfectly, thanks!
