Support » Plugin: My Favorites » Styles not applied to Add to favorites button text

  • Resolved niksap

    (@niksap)


    Hello Takashi,
    I was trying to style my “Add to favorites” button text so I added the following style tags:

    [ccc_my_favorite_select_button post_id=”1234″ style=”text-align:center;font-size:28px;” text=” Favorite ?”]

    but I noticed that they weren’t taking effect. So I explored the code generated by the plugin and I noticed that there is an extra dash placed between the words button and style,
    <div class=”ccc-favorite-post-toggle” data-ccc_my_favorites-select_button-style=”text-align:center;font-size:20px;”><a href=”#” …………
    preventing the styles to work. If the dash is removed the styles are correctly applied.
    I think there isn’t much I can do to correct this, a plugin fix is needed, please confirm.
    Thanks Regards
    Nik

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Takashi Matsuyama

    (@takashimatsuyama)

    Hello @niksap
    Thank you for your question.

    If you want to change to your own style, you can use the
    You must specify the name of the style here and write it in your theme’s CSS file.

    [ccc_my_favorite_select_button post_id='1234' style='your_style_name' text='Favorite ?']

    You cannot put CSS properties directly on the attribute “style”.
    Sorry for the confusing attribute name.

    Please see the related topic for usage.

    Please, try it.

    Thanks Regards

    Thread Starter niksap

    (@niksap)

    Hi Takashi,
    following your indications I have changed to:
    [ccc_my_favorite_select_button post_id=”1234″ style=”favstyle” text=” Favorite ?”]
    and I have created the class:
    .favstyle {
    text-align:center;
    font-size:24px;
    }
    in my theme Customizer > Additional CSS. The style is not applied.
    What am I doing wrong ? thanks

    Plugin Author Takashi Matsuyama

    (@takashimatsuyama)

    Hello @niksap
    Thank you for your question.

    Shortcode:
    [ccc_my_favorite_select_button post_id="your post id" style="your_style_name"]

    HTML:

    <div class="ccc-favorite-post-toggle" data-ccc_my_favorites-select_button-style="your_style_name">...</div>
    

    CSS:

    .ccc-favorite-post-toggle[data-ccc_my_favorites-select_button-style="your_style_name"] {
      /* Please put your CSS properties. */
    }
    

    You can check it in the inspector of your browser (DevTools).
    Icons and styles can be adjusted with standard CSS.

    Please, try it.

    Thanks Regards

    —-
    Please see the related topic for usage.
    —-

    Thread Starter niksap

    (@niksap)

    Got it ! now it works !
    thanks
    Kind regards
    Nicola

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.