WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
[resolved] Adding raw html (23 posts)

  1. Oxygen89
    Member
    Posted 7 months ago #

    Hi all,

    I've raw html like this to display the images in a slider form :
    <div style="margin:20px; width:934px; ">
    <marquee >
    <img src="link_here">
    </marquee>
    </div>

    My requirement is to add slider above the featured images on home page. So, if i add this raw html inside a variable using this snippet, is it a really good practice?

    I've tried adding small slider using plugins, but, none worked great for me. Could anyone suggest a solution to this.

    Site

    For reference, see this image(it will be moving)

    Thanks

  2. ElectricFeet
    Member
    Posted 7 months ago #

    If you don't like Customizr's slider, then Metaslider is a good option. There is also a pro version (which I don't have) which offers even more functions.

  3. Oxygen89
    Member
    Posted 7 months ago #

    @Electricfeet: I've two questions. Firstly, is marquee an example of meta slider?

    Secondly, Is it a good practice to include raw html inside a php variable using snippet for adding content above featured images?

    Plus,actually, my requirement cannot be fulfilled by using Customizr slider as the image size is very small (basically a logo of partners).

    Thanks

  4. ElectricFeet
    Member
    Posted 7 months ago #

    No, I don't think Metaslider does marquee. Flexslider2 seems to, but it's not in the WP repository, so I don't know how good it is (I've never used it). But it's from Woothemes, so it should be pretty reliable.

    Royal slider gets good reviews, but again it's not in the WP repo and it's also a paid plugin. They don't do marquee, but they do an iOS-style "Gallery with Visible Nearby Images".

    Here's a codepen that makes the underlying bootstrap carousel (of Customizr) do what you want: http://codepen.io/szymipl/pen/nLdiI but I've no idea how good the code is. It requires javascript—about which I know very little— so I cannot help, I'm afraid.

    Re the good practice: not often, but sometimes :-) Not if the text is changing—it's not the sort of thing you'd give an editor, for example. But if it's something like a tagline that wouldn't generally change, it's OK. If your setup doesn't allow for it, you could take a different approach and drag a page in like in this snippet.

  5. ElectricFeet
    Member
    Posted 7 months ago #

    p.s. with may sliders (including metaslider free), you can specify the size of the slider easily, so you can make it as small as you need for your logo.

  6. Oxygen89
    Member
    Posted 7 months ago #

    @Electricfeet: Thanks a lot for giving me too many workarounds for slider.
    But, my basic question is if is not a good practice to include too much html into a php variable (i'm also very scared to put too much html inside php variable ), then could you tell me any workaround for that.

    So far, i found that snippet only to put some content above the featured images, but, in that putting html inside php is very scary.

    So, is there any other solution?

    Thanks

  7. ElectricFeet
    Member
    Posted 7 months ago #

    With Metaslider—as with Customizr—your text is in the slider, not in php.

    I think it would be helpful to take a step back and ask: What exactly are you trying to achieve?

  8. Oxygen89
    Member
    Posted 7 months ago #

    @Electricfeet: I'll sit and analyze, what can be done in this. Thanks a lot.

  9. Oxygen89
    Member
    Posted 7 months ago #

    One question: I've d'loaded meta slider plugin, but, i need to implement on home page above the featured images, so, how do i paste the shortcode inside a home page?

    Thanks

  10. rdellconsulting
    Member
    Posted 7 months ago #

    Look at this snippet, but look down the comments where Nic posted a solution.

  11. Oxygen89
    Member
    Posted 7 months ago #

    I got the snippet working, but my requirement slightly differs from this. What i need is, 4 boxes at a time (with four different images shown), and then next 4 images and so on.

    So, the slider will act for more than one image(may be 3 or 4), not for single image.

    So, @rdellconsulting/Electric feet: Could you recommend anything else or any workaround. See this image. Need something like this.

    Thanks

  12. rdellconsulting
    Member
    Posted 7 months ago #

    What site is showing that image? Need to investigate the html

  13. Oxygen89
    Member
    Posted 7 months ago #

    Yes, i can give you the url.

    The slider is just above the footer.

    Thanks

  14. rdellconsulting
    Member
    Posted 7 months ago #

    Looks to me like its using WP Slick Slider. Did you investigate that (don't see it mentioned above)?

    Not much documentation on their website

  15. Oxygen89
    Member
    Posted 7 months ago #

    I searched slick slider, but, its reviews are bad and in fact it is not compatible with 3.9.1. So, will try something else. Anyways, thanks a lot.

  16. ElectricFeet
    Member
    Posted 7 months ago #

    It has 2 bad reviews, one of which didn't like where it places itself on the WordPress dashboard--which is purely a subjective view and nothing to do with the functionality of the slider..

    What makes you say it's not compatible with 3.9.1? It seems to have been updated quite recently.

  17. Oxygen89
    Member
    Posted 7 months ago #

    @Electricfeet: I'm afraid, but, it is written in the plugin description. But, i'll still install and try the plugin.

    Thanks

  18. Oxygen89
    Member
    Posted 7 months ago #

    @Electricfeet/rdellconsulting: Thanks, it worked. But, need a small help from css side. I'm not able to align it in center.

    I tried this code :

    #wpss_slideshow_sampleslider {

    height: 200px;
    margin-bottom: 5px;
    overflow: hidden;
    padding: 10px;
    position: relative;
    width: 700px;
    }
    But it is not picking up, rather, if i'm changing the height and width from settings page, it is changing that.So, need help for css.

    Thanks

  19. Oxygen89
    Member
    Posted 7 months ago #

    See site.

  20. rdellconsulting
    Member
    Posted 7 months ago #

    Easy:

    #wpss_slideshow_sampleslider {
      margin:  0 auto;
    }
  21. Oxygen89
    Member
    Posted 7 months ago #

    @Electricfeet/rdellconsulting: Thanks a lot. You guys are great.

    Thanks

  22. joisaac
    Member
    Posted 7 months ago #

    Please how can I resize the slider? It is occupying too much space I want to make it smaller. Thank you for the anticipated help.

  23. acub
    Member
    Posted 7 months ago #

    joisaac, you need to ask your question in a separate thread.

Reply

You must log in to post.

About this Theme

About this Topic