Need help in calling a html function from css file.

  • Praveen
    Praveen
    Senior Member 216 points
    August 17, 2013 at 1:06 pm

    Actually i need a html function to be called from css file.

    I need a new .css file so that i can modify it anytime rather that putting in style.css

    How can i define a new .css file and how to map it.

  • Praveen
    Praveen
    Senior Member 216 points
    August 17, 2013 at 1:25 pm

    Where exactly coupon theme is calling/linking all the .css files?

  • Mark Fail
    Mark Fail
    Super Guru 13,013 points
    August 17, 2013 at 2:42 pm

    iv never heard of a html function..

  • Praveen
    Praveen
    Senior Member 216 points
    August 17, 2013 at 5:45 pm

    Thanks mark, got to call those functions from css… thanks πŸ™‚

  • Stephen
    Stephen
    Senior Member 215 points
    August 17, 2013 at 9:37 pm

    If you are talkng about using CSS expressions, I highly advise against it. See this link for reasons: https://gtmetrix.com/avoid-css-expressions-pagespeed.html

  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points
    August 17, 2013 at 11:26 pm

    If yo need to be able to modify a style whenever you want without the need to edit the styles.css file in your child theme, simply place your styles in the New CSS Styles box under Color Changes in admin.

    Kind regards,

    Richard
    _____________________________________________________________________
    Wide range of PremiumPress and WordPress Plugins and add-ons
    PremiumPress customisation services and Website Design
    Selection of PremiumPress Child Themes

  • Praveen
    Praveen
    Senior Member 216 points
    August 18, 2013 at 9:03 am

    Great richard thanks for the info.

    I have created a bootstrap modal and tested it sucessfully, but how can i call it during the pop-up of the coupon code?

    From https://getbootstrap.com/2.3.2/javascript.html#modals, they have mentioned to use this javascript. But i dont know where exactly to place this, so that went a coupon is clicked modal should open automatically.

    $(‘#myModal’).modal(options)

  • Richard Bonk
    Richard Bonk
    Super Guru 2,739 points
    August 18, 2013 at 10:31 am

    You were initially talking about css but this is a javascript. That code would need to go somewhere in your footer.

    Kind regards,

    Richard
    _____________________________________________________________________
    Wide range of PremiumPress and WordPress Plugins and add-ons
    PremiumPress customisation services and Website Design
    Selection of PremiumPress Child Themes

  • Praveen
    Praveen
    Senior Member 216 points
    August 18, 2013 at 11:39 am

    Richard sent you a mail πŸ™‚

  • YAEL
    YAEL
    Newbie 18 points
    August 19, 2013 at 8:14 am

    Hi

    Function in css ? i don’t understand, it’s impossible.

  • Mark Fail
    Mark Fail
    Super Guru 13,013 points
    August 19, 2013 at 12:00 pm

    lol, Praveen has reinvented CSS πŸ™‚

  • Aaron
    Aaron
    Super Guru 920 points
    August 19, 2013 at 12:29 pm

    Hi Praveen, I think I understand what you are trying to accomplish. Since this theme is using Bootstrap you may find bootstrap-modal.js is already loaded.

    What you could do is turn the required modal php into a shortcode so you can use it as a replacement of the standard CBUTTON popup, a relatively big undertaking though not impossible.

  • Praveen
    Praveen
    Senior Member 216 points
    August 19, 2013 at 12:55 pm

    @Mark πŸ™‚

    Aaron, i have made it to work. But now the difficult situation is to call the coupon code and link inside a modal window. I tried to call inside a html its not showing anything. πŸ™

    <!– Modal –>
    <div id=”myModal” class=”modal hide fade” tabindex=”-1″ role=”dialog” aria-labelledby=”myModalLabel” aria-hidden=”true” >
    <div class=”modal-header”>
    <h3 id=”myModalLabel”>Title</h3>
    </div>
    <div class=”modal-body”>

    /* Trying to display the affiliate link below, but not working πŸ™ */
    <p><?php $post->link; ?></p>

    </div>

  • Mark Fail
    Mark Fail
    Super Guru 13,013 points
    August 19, 2013 at 1:09 pm

    this is invaid, there is no such data as $post->link;

    try: echo get_post_meta($post->ID,’link’,true);

  • Praveen
    Praveen
    Senior Member 216 points
    August 19, 2013 at 2:07 pm

    Mark, tried that getting below error.

    Here is how i have define in html box.
    <p>echo get_post_meta($post->ID,’link’,true);</p>

    On modal window its showing below exactly the same.
    echo get_post_meta($post->ID,’link’,true);

Viewing 15 posts - 1 through 15 (of 19 total)

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes