• Resolved JRDLtd

    (@jrdltd)


    Hello,
    You’ve done a great job with the plugin Meteor Slides and I want to thank you for all your hard work.

    Is there a way to remove the title from the images so that nothing will appear when you rollover the slide?

    Here is a link to where I am using the slide show currently: http://thewell.tk/sample-page/

    Thanks

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Josh Leuze

    (@jleuze)

    Thank you, I’m glad you are liking Meteor Slides!

    The title is automatically added to the slide images by WordPress, you would have to use JavaScript to remove them. But you can also change the content of these titles by editing the slide images in the media library and changing the image title.

    Thread Starter JRDLtd

    (@jrdltd)

    I need it to be blank and WordPress won’t allow that. I guess it will have to be done with JavaScript as you said.

    Could you make an example script please? I am sure I could figure it out but I am not the fastest JS coder so if I had an example to work from it would be a real help.

    Thanks.

    Plugin Author Josh Leuze

    (@jleuze)

    There’s a plugin that you might be able to use. Or take a look at some of these options.

    I would suggest using css to bump the title off of the screen.

    use text-indent:-9999px;

    This should get rid of the title and still leave it available for screen readers and SEO.

    I will test this idea, if not I will go the javascript route and post that solution.

    Thread Starter JRDLtd

    (@jrdltd)

    @jleuze, Thanks that second option looks like it would work.

    @adaptive Design, css can affect the title attribute? Thanks I may try that.

    Thread Starter JRDLtd

    (@jrdltd)

    Using css did not work for me.

    Using the javascript jQuery method did. I added this code:
    <script type="text/javascript">
    jQuery(document).ready(function($) {
    $('img[title]').each(function() { $(this).removeAttr('title'); });
    });
    </script>

    To the end of the custom template file “meteor-slideshow.php” after:
    </div><!-- .meteor-slides -->

    Thanks for all your help! πŸ™‚

    Plugin Author Josh Leuze

    (@jleuze)

    Awesome, glad you got it figured out!

    Hello !

    I have the same problem (I want to remove the attribute title on the pics) but I can’t code at all so I don’t know where to put the bit of code you gave ! Can you please specify ?

    Cheers,
    Thomas

    Plugin Author Josh Leuze

    (@jleuze)

    Hi Thomas, you can do this in an easier way now with a custom slideshow template. Here is a post that explains how to do it.

    Thanks for your answer JLeuze ! I don’t really understand how that works though. I’m not sure it’s for the same problem exactly : what I want to do is remove the attribute “title” from the image, not add a title to my slides.

    By the way, it would be cool if I could also set the “alt” attribut for SEO (right now it takes the name of the image and I don’t see how I can change that)

    Plugin Author Josh Leuze

    (@jleuze)

    You need to use a custom slideshow template, but you can ignore that example about adding titles. You just need to follow the instructions in this post:
    http://wordpress.org/support/topic/how-do-i-hide-the-alt-text-on-slide-images?replies=7#post-2457311

    You can set the alt text in the media library by editing the slide image’s metadata, but if you are editing the image tags anyways, an easier method would be to use the slide post’s title as the alt text so that you can edit it right from the slide posts.

    Here is an example that would do that:

    <?php // Get just the URL for the slide featured image
    
    $featuredslide = wp_get_attachment_image_src( get_post_thumbnail_id($GLOBALS['post']->ID), 'featured-slide' ); ?>
    
    <?php // Adds slide image with Slide URL link
    
    if ( get_post_meta( $post->ID, "slide_url_value", $single = true ) != "" ): ?>
    
    	<a href="<?php echo get_post_meta( $post->ID, "slide_url_value", $single = true ); ?>"><img src="<?php echo esc_attr($featuredslide[0]); ?>" alt="<?php the_title(); ?>" /></a>
    
    <?php // Adds slide image without Slide URL link
    
    else: ?>
    
    	<img src="<?php echo esc_attr($featuredslide[0]); ?>" alt="<?php the_title(); ?>" />
    
    <?php endif; ?>

    Worked perfectly, sorry for not having read thoroughly the post you mentionned before… (I always get a bit scared when I see php lines πŸ™‚ )

    I copied the file meteor-slide.php in the “root” of my theme directory (where there is the index.php file). I’m using Suffusion theme, so I put it in the folder “Suffusion”. Is that correct ? (there are some subfolders to this folder such as “admin”, “custom”, “functions” etc, I was wondering if I had to put “meteor-slide.php” in one of those ?

    Thanks a lot for you help and great pluggin !

    Thomas

    Plugin Author Josh Leuze

    (@jleuze)

    No problem Thomas, that’s right the custom template file goes in the root of your theme.

    Cool, thanks again πŸ™‚

    Cheers,
    Thomas

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Plugin: Meteor Slides] Can the "title" be removed from slides?’ is closed to new replies.