Hi is there any way to add a text overlay to your meteor slides?
Hi is there any way to add a text overlay to your meteor slides?
Hi, Meteor Slides doesn't have captions or titles by default, but you can add text using a custom slideshow template.
thanks for your quick response - i will give it a go
No problem, let me know if you have any questions.
hi i've only just had a chance to look at your plugin and customising it.
Adding a title (as in your example) is easy enough but if i want to add paragraphs of text with the slide i.e. a caption, how would I go about it? Is it a case of adding another field to your custom post ype for Slides (is this in meteor-slideshow.php?) and then telling the slideshow to use the_excerpt.. or soemthing like that?
There are a few ways to do this. You can add metadata from the slide image to the slides, like the alt text and description. You can also add more fields to the custom post type and use that content
I usually like to add fields right to the slide editor, this makes it easier to manage the content. To do this you just need to drop this into your theme's functions.php file:
// Add excerpts to Meteor Slides
add_post_type_support('slide', 'excerpt');
And then drop this into your custom slideshow template, somewhere within the .mslide div:
<?php // Get the slide post's excerpt
the_excerpt();?>hey, that's really helpful. Thank you! I'd added the excerpt to your meteor-slides-plugin.php code but knew that wasn't very good due to upgrading the plugin.
Adding it to my theme's functions.php code is prefect.
Thanks again
No problem!
@JLeuze your plugin is solid and your support is amazing! This function was just what I was after!
Thanks, glad to help!
Wow Josh, that was amazingly simple. I had already added the titlew but wanted to add a 2nd text field. This worked perfectly. This plugin just got even better for me. I wonder why you don't just implement the 2nd text field in the plugin natively, unless you want to keep it simple. I'm happy to create my own template as I did with your guidance. Thanks again!
@inhouse Cool, thanks for the feedback! Yeah I designed it to be minimalist, that's why the slideshow doesn't have any text by default.
But I'm always looking for ways to make it easier to customize the plugin without actually adding more options or anything. I'd like to make some skins that people can use to add captions or thumbnail navigation, or just as an easier starting point for custom templates.
Sorry, I've tried it, but I don't know where have to put the second part of the code:
"<?php // Get the slide post's excerpt
the_excerpt();?>"
I haven't seen the ".mslide div" in the document meteor-slides-plugin.php
and when I put the code in the page, all the code is inavilited.
Could you help me? maybe you could upload the modified document to replace it. I would be very grateful.
Pardon my ignorance, I'm new to programming in wordpress and do not understand English well at all.
Finally, many thanks for the plugin, it really works very well.
@mandagenberke Hi, you need to edit the sideshow template called meteor-slideshow.php, you will find this file in the includes folder. Make sure you use a custom slideshow template so that you don't lose your changes when updating.
Thank you very much! now it works! It still give me an error when I click "update" with the excerpt method, but I guess it was problem of my template:
Warning: Cannot modify header information - headers already sent by (output started at /homepages/38/d395034803/htdocs/wordpress/wp-content/themes/imbalance/functions.php:209) in /homepages/38/d395034803/htdocs/wordpress/wp-includes/pluggable.php on line 866
I finally made it using the title method.
I modified the root of the background, I think it needs ../ because of the folder css
.meteor-slides p {
background: transparent url('../images/title-bg.png') repeat-x;
Thanks a lot for the suport!!
Glad that helped, something must not be running on an early enough hook if you are getting that error.
I've tried following the steps in your blog to add the title with a background PNG, and while the title works, I can't for the life of me get the PNG image to work.
I've named it the same 'title-bg.png' - added it to the meteor-slides/images folder.
But alas, nothing is showing up. :(
Mike, make sure you are using a custom stylesheet in your theme, and adding the title-bg.png file to your theme's images folder.
Hi Josh. I followed this thread and put the above mentioned code into functions.php as well as meteor-slideshow.php to display it, but nothing seems to happen. Chiefly I can't find any extra field in the slide editor to add a description to be displayed. Any thoughts? I'm using weaver. Cheers, p/
I tested this with Weaver and it seems to work OK, make sure that you have this added to your functions.php file, at the end:
// Add excerpts to Meteor Slides
add_post_type_support('slide', 'excerpt');I must be missing something. Should the excerpt field be displayed in the slide editor then? That's what I assumed but there's nothing extra there when I add or edit a slide. Thanks for the swift reply.
Yes, the excerpt metabox should show up on the slide editor page right below the slide link metabox. I can take a look at it if you want to send me the login info.
I had tested this in Weaver, not Weaver II. When I tested it in Weaver II in my dev setup the excerpts didn't show up for me either.
Not sure why it's not working in Weaver II, so I created a plugin with this code instead. I installed that on your site and the excerpts are showing up fine now.
Here is the code for anyone else who might need it, I had to open up the screen options and enable the excerpts after activating the plugin:
<?php /*
Plugin Name: Meteor Excerpts
Description: Adds excerpts to Meteor Slides.
Author: Josh Leuze
Author URI: http://www.jleuze.com/
Version: 1.0 */
add_action( 'init', 'meteorslides_add_excerpt' );
function meteorslides_add_excerpt() {
add_post_type_support( 'slide', 'excerpt' );
} ?>Thanks Josh, that's great. Cheers for the support.
You're welcome!
Is there a way to make the width of the slideshow change based on the image width. I am trying to do an overlay of the info but have it stay on top of the slide. My problem is some images are horizontal and some are vertical so the widths are all different.
Thanks.
That might be tricky. Try wrapping an inline object around the image like a span and put the other content inside that span.
ok I will see if that works. Thanks
ok another question I have the caption box where I want it. But I want to add 3 elements to the box.
1. title
2. shot for (client name)
3. a link to click on.
I need to style each differently. It doesn't appear to allow excerpts to have html code since everything disappears.I'm not very good with PHP so any help would be great.
You must log in to post.