[Resolved] All php & css at my site. Just wanted to confirm if its correct?

Home Forums Support [Resolved] All php & css at my site. Just wanted to confirm if its correct?

Home Forums Support All php & css at my site. Just wanted to confirm if its correct?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1627356
    Juned

    Hi,

    Below is the details of total external coding I am using at my site:

    A) via Code Snippet Plugin:

    i) For WooCommerce Product Sale Badge:

    add_filter(‘woocommerce_sale_flash’, ‘woocommerce_custom_sale_text’, 10, 3);
    function woocommerce_custom_sale_text($text, $post, $_product)
    {
    return ‘<span class=”onsale”>40% OFF</span>’;
    }

    B) at Additional CSS: (Some css was given by GP team and some I copied from support topic)

    .woocommerce-breadcrumb a{
    color: #f7f7f7;
    }
    .woocommerce-breadcrumb a:hover{
    color: light green;
    }
    .woocommerce-breadcrumb {
    color: white !important;
    font-weight: 600;
    }
    h2.woocommerce-loop-category__title mark.count {
    color: white;
    opacity: 1;
    }

    /* GeneratePress Site CSS */ .inside-article,
    .sidebar .widget,
    .comments-area {
    border-right: 2px solid rgba(0, 0, 0, 0.07);
    border-bottom: 2px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 0 10px rgba(232, 234, 237, 0.5);
    }

    /* Featured widget */
    .sidebar .widget:first-child,
    .sidebar .widget:first-child .widget-title{
    background-color: #83b0de;
    color: #fff;
    }

    .separate-containers .page-header {
    background: transparent;
    padding-top: 20px;
    padding-bottom: 20px;
    }

    .page-header h1 {
    font-size: 1.5em;
    }

    .button, .wp-block-button .wp-block-button__link {
    padding: 15px 25px;
    }


    @media
    (max-width: 768px) {
    .post-image img {
    max-width: 100%;
    }
    } /* End GeneratePress Site CSS */

    C) at Simple CSS:

    /* button lifts on hover */

    .button:hover {
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    }
    a.button.product_type_simple.add_to_cart_button.ajax_add_to_cart {
    border-radius: 8px;
    }
    .woocommerce ul.products li.product a.add_to_cart_button {
    border: 1px solid #fff;
    }
    .woocommerce ul.products li.product a img {
    border-right: 2px solid rgba(0, 0, 0, 0.07);
    border-bottom: 2px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 0 10px rgba(232, 234, 237, 0.5) !important;
    }
    /* Static color */
    .select2-container–default .select2-results__option {
    background-color: #414a4c;
    color: #fff;
    }
    /* Static color */
    .select2-container–default .select2-results__option {
    background-color: #414a4c;
    color: #fff;
    }
    /* Selected color */
    .select2-container–default .select2-results__option[aria-selected=”true”],
    .select2-container–default .select2-results__option[data-selected=”true”] {
    background-color: #b3dc6c !important;
    color: #fff !important;
    }
    /* Hover-focus color */
    .select2-container–default .select2-results__option–highlighted[aria-selected=”false”],
    .select2-container–default .select2-results__option–highlighted[data-selected=”false”] {
    background-color: ##54cdf1 !important;
    color: #fff !important;
    }
    .slideout-widget.widget_product_search {
    width: 100%;
    margin: 0;
    padding: 20px;
    }
    .slideout-widget.widget_product_search input {
    border-radius: 25px;
    }

    1. Could you please guide me if any modification/alteration/deletion is required?
    2. Is it all pasted at correct locations?

    I am just reconfirming it so it won’t affect my site’s performance.

    #1627438
    David
    Staff
    Customer Support

    Hi there,

    looks correct to me.

    Your PHP Snippets in the Code Snippets plugin is in the Correct Location.

    Now you can if you want, move the Additional CSS into the Simple CSS. But there is no problem leaving them where they are.

    #1627456
    Juned

    Thanks.

    #1627501
    David
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.