AZ Managed IT
Forums
Connect, Share, Solve – Empowering IT Solutions Together!
Recent Posts
-
Option 1: Enable via functions.php
You can add a snippet of code to your theme's functions...
By azmanagedit , 2 weeks ago
-
dnn 4 and bonosoftmulti page content plugin
Bonosoft Multi Page Content for DNN 3.x Created by ...
By azmanagedit , 2 weeks ago
-
-
Moving Away from AWS After Disappointing Support Experience
Hey everyone,I wanted to share my recent experience wit...
By azmanagedit , 4 weeks ago
-
My Negative Experience with Visual Design Inc.
I feel compelled to share my unfortunate experience wit...
By azmanagedit , 4 weeks ago
-
Disable the product magnifier in Elementor
To disable the product magnifier in Elementor, you can ...
By azmanagedit , 1 month ago
-
How to enable Cross-Origin Resource Sharing (CORS) g...
By azmanagedit , 2 months ago
-
Yes, it’s possible to give access to specific pages on ...
By azmanagedit , 2 months ago
-
RE: Need Advice on Protecting and Promoting My WordPress Plugins
I guess the obvious thing to ask: sequii2016 (@sequ...
By azmanagedit , 2 months ago
-
https://wordpress.org/ Need Advice on Protecting and Promoting My WordPress Plugins
James Huff (@macmanx) 1 hour, 7 minutes ago ...
By azmanagedit , 2 months ago
Online Members
No online members at the moment
WordPress plugin to display upcoming movies
[upcoming_movies_with_filters]
Usage Instructions:
-
Install the Plugin:
- Upload the plugin ZIP file through the WordPress admin panel (
Plugins > Add New > Upload Plugin
). - Activate the plugin once uploaded.
- Upload the plugin ZIP file through the WordPress admin panel (
-
Configure the API Key:
- After activation, go to the Upcoming Movies settings page by navigating to the WordPress dashboard sidebar.
- Enter your TMDB (The Movie Database) API key in the provided field. If you don’t have an API key yet, you can sign up for one here.
- Choose the number of columns (1-6) to display the movie posters on your website. By default, it is set to 3.
-
Use the Shortcode:
- To display the list of upcoming and now-playing movies on your website, simply add the shortcode
display_movies
on any page, post, or widget where you want the movie data to appear. - The plugin will automatically style the movies based on the Flexbox layout, adjusting the number of columns according to your settings.
- To display the list of upcoming and now-playing movies on your website, simply add the shortcode
-
Movie Data Update:
- The movie data is automatically refreshed every 12 hours via the scheduled task, ensuring that your site always displays the latest information.
- The plugin fetches both upcoming and now-playing movies and stores them in a custom database table, which is displayed using the shortcode.
-
Deactivation and Cleanup:
- When the plugin is deactivated, the scheduled event to fetch movie data is cleared. This ensures no unnecessary background tasks continue running.
- However, the movie data stored in the database will persist unless manually removed. If you want to delete the data, you can either clear it manually or modify the deactivation hook to drop the custom table upon deactivation (though this is not recommended if you might reactivate the plugin later).
Styling and Customization:
-
Movie Item Styling:
- Each movie item is enclosed in a
div
with the classmovie-item
, making it easy to apply additional custom CSS if you want to further tweak the appearance. - You can add hover effects, animations, or additional styling in your theme's CSS file to match your website’s look and feel. For example, you can increase the scaling effect on hover or change the background color of movie items.
- Each movie item is enclosed in a
-
Movie Poster Sizing:
- The movie posters are fetched from the TMDB API and are set to a width of 200 pixels (
w200
resolution). You can adjust the size of the poster images by modifying the URL in the plugin code. If you want higher resolution posters, changew200
tow500
or another size.
- The movie posters are fetched from the TMDB API and are set to a width of 200 pixels (
-
Genre Representation:
- Currently, genres are displayed as IDs (as fetched from TMDB), but you can extend the functionality by mapping these IDs to actual genre names. You can create a lookup array of genre IDs to names, which will make the genre information more user-friendly.
-
Flexbox Layout:
- The Flexbox layout ensures that movie items are responsive and wrap correctly across different screen sizes. You can control the gap between movie items, adjust the width for smaller screens, and modify alignment using CSS.
Potential Future Enhancements:
If you’d like to extend the functionality of this plugin further, here are a few ideas:
-
Movie Filtering and Sorting:
- Add filters or sorting options for users to filter movies by genre, rating, or release date.
- You can provide dropdowns or checkboxes that dynamically filter the displayed movies without reloading the page (using AJAX).
-
Pagination:
- If you want to display more movies than can fit on one page, you can add pagination to break the list of movies into multiple pages. This can be easily done using WordPress’s built-in pagination functions or by implementing AJAX to load more movies without reloading the page.
-
Movie Details Modal:
- When a user clicks on a movie poster, instead of redirecting to the TMDB page, you could show additional movie details (such as overview, cast, trailer, etc.) in a modal window. This can be done using a combination of AJAX and the TMDB API to fetch additional details.
-
Custom Movie Widgets:
- You can extend the plugin to include custom widgets for WordPress. These widgets could allow users to display the top-rated movies, currently trending movies, or personalized movie recommendations in their site’s sidebars or footers.
-
Caching Movie Data:
- For performance improvements, you can add a caching mechanism to store the fetched API results locally for a set amount of time. This would reduce the number of API calls to TMDB and improve page load times.
-
Multi-language Support:
- The TMDB API supports multiple languages, so you could extend the plugin to allow users to select the language in which they want to display movie titles, overviews, and other content.
Changes Made:
- Trailer Fetching: Added an API call to fetch movie trailers from TMDB for each movie and store the trailer URL in the database.
- Popup Functionality: Added a JavaScript modal that opens when users click the "Watch Trailer" button. The trailer is embedded in the popup using an iframe.
- Improved Styling: Added flexible layout support to display movies in columns and updated the layout for better appearance.
Latest Post: Option 1: Enable via functions.php Our newest member: Joe Quintero Recent Posts Unread Posts Tags
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed