Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Scott (@scottsweb)

    (@scottsweb)

    In version 1.4 and above you can also customise the image loop completely by creating a parts/wp-instagram-widget.php file in your theme. This will allow you to add custom classes to everything.

    See https://github.com/scottsweb/wp-instagram-widget/blob/master/wp-instagram-widget.php#L100-L104

    If you wish to customise the Instagram link you could target it with

    p.custom_class a {}

    If you are using a CSS pre-processor you could easily add the same button styles as a mixin:

    p.custom_class a { @include .btn() }

    Plugin Author Scott (@scottsweb)

    (@scottsweb)

    Pull requests are also welcome: https://github.com/scottsweb/wp-instagram-widget

    Thread Starter ninetienne

    (@ninetienne)

    Thanks for a quick reply!

    I know that you may use a custom template for the image loop. I’m using it to add number of likes and comments.

    I also know that you can target the link via targeting the anchor inside paragraph. But it looks like going from New York to Los Angeles via Paris.

    I’m using SASS and there’s no easy mixin for a btn in Bootstrap. You may extend but it will result in extra code.

    In general your filter is called wpiw_link_class, not wpiw_clear_class or wpiw_paragraph_class, so I think it would be much more convenient to add the class to <a> rather than <p>.

    Moreover there’s a mixin for clearfix in Bootstrap ??

    I would submit a pull request, but I’m a git newbie.

    Would be more than happy if you could change the filter or add a new one.

    Thanks a lot for the great plugin anyway!

    Plugin Author Scott (@scottsweb)

    (@scottsweb)

    > I’m using SASS and there’s no easy mixin for a btn in Bootstrap.

    I think there is, you can see it in use here: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_buttons.scss#L63

    I will consider getting this added in future but will not move the existing filter as that would be a breaking change: https://github.com/scottsweb/wp-instagram-widget/issues/48

    Thread Starter ninetienne

    (@ninetienne)

    > I think there is, you can see it in use here: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_buttons.scss#L63

    It’s actually button varient only, i.e. color and background color. It doesn’t add any paddings or font styles. So I would have to add it myself, repeating the same code and losing consistency.

    Don’t think a lot of people using the filter. Sometimes breaking changes are inavoidable. However to be on the safe side, you my add a new one wpiw_anchor_class. However I do think, it’s strange to call a filter link and apply it on a paragraph.

    I would highly appreciate if you could add a filter for the anchor tag. Thanks a lot for your job anyway!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Filter for link class’ is closed to new replies.