jass78
Forum Replies Created
-
Forum: Plugins
In reply to: [WP YouTube Lyte] Custom poster imageHey Frank,
sure! Sorry, i thought german was ok. I have now solved the problem like this:
add_filter( ‘lyte_match_thumburl’, ‘lyte_my_own_thumburl’ );
function lyte_my_own_thumburl( $thumb ) {
// Get the queried object and sanitize it
$current_page = sanitize_post( $GLOBALS[‘wp_the_query’]->get_queried_object() );
// Get the page slug
$slug = $current_page->post_name;
if ( $slug == ‘site-name 1’ ) {
return ‘https://url.de/wp-content/uploads/thumbnail-1.jpg’;
}
if ( $slug == ‘site-name 2’ ) {
return ‘https://url.de/wp-content/uploads/thumbnail-2.jpg’;
}
if ( $slug == ‘site-name 3’ ) {
return ‘https://url.de/wp-content/uploads/thumbnail-3.jpg’;
}
}
Why don’t you improve the plugin so that you can insert an custom poster image directly in the shortcode f.e.?Best,
Jasmin- This reply was modified 2 years ago by jass78.
Forum: Developing with WordPress
In reply to: PHP 7.4 to PHP 8.1: Uncaught TypeErrorThanks for your quick answer. I also think it’s a plugin issue caused by the theme. But I can’t update the theme or plugin because the theme is no longer supported. Do you have an idea how I can fix this anyway?
What is meant by: … must be of type Countable|array … ?
- This reply was modified 3 years, 1 month ago by jass78.