Support » Theme: OceanWP » My child stylesheet (style.css) is not working

  • Hello

    whatever I add to the style.css on my child theme is not working

    here is the function.php

    <?php
    /**
    * Child theme functions
    *
    * When using a child theme (see http://codex.wordpress.org/Theme_Development
    * and http://codex.wordpress.org/Child_Themes), you can override certain
    * functions (those wrapped in a function_exists() call) by defining them first
    * in your child theme’s functions.php file. The child theme’s functions.php
    * file is included before the parent theme’s file, so the child theme
    * functions would be used.
    *
    * Text Domain: oceanwp
    * @link http://codex.wordpress.org/Plugin_API
    *
    */

    /**
    * Load the parent style.css file
    *
    * @link http://codex.wordpress.org/Child_Themes
    */
    function oceanwp_child_enqueue_parent_style() {
    // Dynamically get version number of the parent stylesheet (lets browsers re-cache your stylesheet when you update your theme)
    $theme = wp_get_theme( ‘OceanWP’ );
    $version = $theme->get( ‘Version’ );
    // Load the stylesheet
    wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri() . ‘/style.css’, array( ‘oceanwp-style’ ), $version );

    and here is the style.css

    /*
    Theme Name: OceanWP Child
    Theme URI: https://oceanwp.org/
    Description: OceanWP WordPress theme example child theme.
    Author: Nick
    Author URI: https://oceanwp.org/
    Template: oceanwp
    Version: 1.0
    */

    /* Parent stylesheet should be loaded from functions.php not using @import */

    any idea why ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    Have you activated the child theme?
    Can you please tell me which CSS code have you added in the style.css file? If the CSS priority is lower than the main stylesheet, it will not work.

    yes it is been activated since 2019

    let me pass the CSS here as i am not sure what you mean ?

    /* hide product categories on product meta section */
    .product_meta .posted_in {
    display:none;}

    /* hide product tags on product meta section */
    .product_meta .tagged_as {
    display:none;}
    /*bottom for product*/
    .woocommerce ul.products li.product .button {
    background-color: #e4e4e4;
    padding: 5px 10px;
    border: 2px solid #e4e4e4;
    font-size: 13px;}
    /*product title archive*/
    .woocommerce ul.products li.product li.title a {
    display: inline-block;
    font-size: 13px;
    white-space:normal;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 160px;
    height:40px !important;
    margin: -15px 0px 0px -10px;
    }

    /*space btw title price vendor name
    .woocommerce ul.products li.product li.inner {

    display: block;
    margin: -15px 0 10px !important;
    line-height: 1px;
    }*/

    .blog-entry-title.entry-title {
    width: 180px;
    font-size: 12px !important;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    }

    a.oceanwp-login{
    visibility: hidden;
    position: relative;
    float: left;
    margin-left: -30px;
    margin-top: 10px;
    }
    a.oceanwp-login::before{
    content:’الدخول/تسجيل جديد’;
    visibility: visible;
    position: absolute;
    top: 0;
    left: -5px;
    width: 150px;
    }
    .fas.fa-sign-in-alt {
    float: right;
    margin-right: -80px;
    position: relative;
    margin-top: -19px;
    }

    p#apply_for_vendor label{
    display: none !important;
    }

    .woocommerce ul.products li.product .price, .woocommerce ul.products li.product .price .amount {
    color: #1e73be;
    margin-top: 10px;
    }
    article.entry-content.entry.clr ul.products li .product-inner.clr li.title {
    height: 45px;
    }

    /*botton for the restric area*/

    .default input#wdapzipsumit {
    color: #ffffff;
    background-color: #13aff0 !important;
    width: 36px;
    position:absolute; margin-right:-10px !important;
    }
    .default #wdapziptextbox {
    border: 0px solid #8e8e8e !important;
    width:200px;
    position:absolute;
    margin-right:15px !important;
    }

    .zipcode_test_desc{
    margin-top:50px;
    }

    /*vendor dashboar top header*/
    #menu-item-28195{
    margin-right: 15px !important;
    }

    /*vendor dashboard*/
    .wcv-navigation ul.menu.black {
    background: #878787;
    }
    .wcv-navigation ul.menu.black li.active {
    background: #7B7B7B;
    }

    .woocommerce-password-strength.short {
    color: red;
    }

    @media only screen and (max-width: 767px){
    .woocommerce div.product .woocommerce-tabs ul.tabs li {
    display: inline-block !important;
    }}

    /*welcome box after vendor register*/
    #wcfm-main-contentainer .wcfm_membership_thankyou_content_wrapper {
    background-color: white;
    }

    .store_hide_email.wcfm_title.checkbox_title.wcfm_ele {
    margin-top: 45px;
    }

    /*become a vendor bottom*/
    .wcfmmp_become_vendor_link {
    display: inline-block;
    background-color: #13aff0;
    padding: 4px 0px;
    width: 100% !important;
    align-items: center;
    position: relative;
    margin-left: 0px;
    text-align:center !important;
    }
    .wcfmmp_become_vendor_link a {
    margin-right: 27px;
    color: white;
    font-family: inherit;
    letter-spacing: 0.1em;
    line-height: 1;
    font-size: 12px;
    font-weight: 600;
    width: 100%;

    }
    #wcfm_membership_container input.wcfm_submit_button{
    display: inline-block;
    background: #13aff0 none repeat scroll 0 ;
    font-family: inherit;
    letter-spacing: 0.1em;
    line-height: 1;
    font-size: 12px;
    font-weight: 600;
    }

    /*address and info till end of 2019*/
    #wcfmmp-store .address {
    display: none;
    }
    .star-rating.wcfmmp-store-rating {
    display: none;
    }

    #wcfmmp-store img {
    max-width: 99%;
    }

    #wcfm-main-contentainer input[type=”number”] {
    max-width: initial;
    }

    body .tinv-wishlist.tinvwl-after-add-to-cart .tinvwl_add_to_wishlist_button.no-txt {
    margin-left: -17px;
    margin-top: -10px;
    }

    /*equry on single page product*/

    #wcfm-header { display: none; }

    /*store page*/
    #wcfmmp-store img {
    max-width: 100%;
    }

    #footer-widgets .oceanwp-newsletter-form-wrap input[type=”email”]
    {
    border-color: #A9A9A9 !important;}

    /*adds on*/

    .woocommerce div.product p.price {
    font-size: 20px;
    }
    label.wc-pao-addon-name {
    margin-bottom: 2px;
    font-size: 20px;
    color: red;
    }
    .wc-pao-addon-description p {
    margin-bottom: 12px;
    font-size: 20px;
    color: red;
    }

    .wcfmmp_sold_by_container .wcfmmp_sold_by_label {
    display: none;
    }

    .woo-entry-image-main {
    height: 160px !important;
    }

    a.wcfm_catalog_enquiry{
    background: white;}

    /*.wcfmmp-store-rating {
    display: none;
    }*/

    .wcfmmp_sold_by_container .wcfmmp-store-rating, .wcfmmp_sold_by_container .wcfmmp-store-rating span {
    display: none;
    }

    /*hide the login on myaccount page so the pop works*/

    .account-side-style .woocommerce #customer_login > div {
    display:none;
    }
    .account-side-style .woocommerce #customer_login .col-2 {
    float: right;
    }

    /*div#wcfm_store_header{
    height: 100px !important;
    }*/

    .wcfm_catalog_enquiry {
    float: right !important;
    }

    /* font for unavalible product on checkout page*/
    .woocommerce-info.cod-unavailable {
    color: red;
    font-size: 18px;
    }

    /* thisis for woo-plugin*/
    /*images size*/
    attachment-woocommerce_thumbnail.size-woocommerce_thumbnail.lazyloaded {
    width: 89% ;
    height: 199px;
    }
    .uael-woo-products-slider .slick-slide img {
    width: 100%;
    height: 178px !important;
    }

    /* cart and quick view*/
    .uael-woo-skin-grid-franko .uael-product-actions .uael-action-item{
    font-size:19px;}
    .uael-woo-skin-grid-franko .uael-product-actions {
    position: absolute;
    top: 0px;
    right:5px;
    transition: all .3s;
    margin-bottom: 2px;
    opacity: 0;
    }
    @media only screen and (max-width: 768px) {
    .uael-woo-skin-grid-franko .uael-product-actions {
    opacity: 3;
    }}
    @media only screen and (max-width: 768px) {
    .uael-woo-products-thumbnail-wrap:hover .uael-product-actions {
    right:5px;
    }}

    @media only screen and (max-width: 768px) {
    .uael-woo-skin-grid-franko .uael-product-actions .uael-action-item{
    font-size:14px;

    }}

    .uael-woocommerce .woocommerce-loop-product__title {
    display:inline-block;
    width:170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    }
    @media only screen and (max-width: 768px) {
    .uael-woocommerce .woocommerce-loop-product__title {
    display:inline-block;
    width:130px;
    color: black;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;}}

    .uael-woo-products-inner .slick-prev,.uael-woo-products-inner .slick-next{opacity:0;
    transition: opacity800ms;}

    @media only screen and (max-width: 768px) {
    .uael-woo-products-inner .slick-prev,.uael-woo-products-inner .slick-next{opacity:3;
    margin-top:40px;
    margin-right:-20px;
    margin-left:-20px;

    }}

    @media (min-width: 1281px) {.elementor-row:hover .slick-prev, .elementor-row:hover .slick-next{opacity:3;
    }}

    /*remove short describtion for the apps and size-font smaller*/
    @media only screen and (max-width: 768px) {.woocommerce div.product div.woocommerce-product-details__short-description {display:none;}}

    @media only screen and (max-width: 768px) {
    .woocommerce div.product .product_title {
    font-size: 16px;
    margin: 0 0 10px;}}

    /*title page header*/
    .page-header-title.clr {
    display: none;
    }
    .page-subheading {
    font-size: 15px;
    margin: 0;
    display: none;
    }

    .wcmenucart-cart-icon .wcmenucart-count {

    position: relative;
    display: inherit;
    font-size: 12px;}

    .oceanwp-mobile-menu-icon a.wcmenucart {

    font-size:19px !important;
    margin-left: 15px;
    margin-right: -25px;
    margin-top:0px;
    }

    /*plus sign when using the phone to request moeny vendor side*/
    table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child::before {
    left: -16px;
    }

    .woocommerce .has-product-nav span.onsale {
    top: 0px !important;
    right:0px !important;}

    /*mailchimp on checkout checkbox*/
    p.form-row.form-row-wide.mailchimp-newsletter {
    display: -webkit-inline-box;}

    /*changing icon on dropdown iphone*/
    .sidr-class-dropdown-toggle:before {
    content: ‘\f105’;
    font-weight: 600;}
    .sidr-class-dropdown-menu li.active>a>.sidr-class-dropdown-toggle:before {
    content: ‘\f107’;
    font-weight: 600;}
    /*on checkout page*/
    .woocommerce-info {
    font-size: 16px;}

    /*single product*/
    .woocommerce div.product form.cart {
    border: 0px; }
    .product_meta {
    clear: both;
    font-size: 13px;
    border-bottom: 0px solid;}
    .wcfm_ele_wrapper {
    margin: -30px 0;}
    .woocommerce div.product .woocommerce-tabs .panel h2:first-child {
    display: none;
    }

    .uael-woo-categories .products li.product a img, .uael-woo-categories ul.products li.product a img {
    border-radius: 50%;
    border: 1px solid #dbe3f0;
    }

    /*checkoutpage*/
    input#miniorange_otp_token_submit {
    width: 100%;
    font-size: 15px;
    line-height: 1.6;
    padding: 16px 20px;
    }

    .woocommerce-checkout #payment ul.payment_methods .wc_payment_method>label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    padding: 10px;
    cursor: pointer;
    letter-spacing: 0.9px;
    height: 85px;
    }

    .wcfmmp_sold_by_wrapper img
    { width: 10%;}

    /**/
    table.shop_table.my_account_points_rewards.my_account_orders {
    background: #f6f8f9;
    width: 100%;
    border: 1px solid #e7e9f3;
    border-radius: 5px;
    box-shadow: 0 1px 5px rgba(88, 95, 99, 0.06);
    padding: 20px 20px;
    margin-bottom: 25px;
    position: relative;
    font-size: 16px !important
    }
    .woocommerce-MyAccount-content p {
    font-size: 20px !important;
    background: #f6f8f9;
    width: 100%;
    border: 1px solid #e7e9f3;
    border-radius: 5px;
    box-shadow: 0 1px 5px rgba(88, 95, 99, 0.06);
    padding: 20px 20px;
    margin-bottom: 25px;
    position: relative;
    }

    /*share icon on single product page*/
    .woocommerce div.product .my-social-share {
    display: block;}
    .woocommerce div.product .my-social-share ul li{
    float: right;
    margin-right: 20px;
    margin-top: -39px;
    list-style: none;
    }
    .woocommerce div.product .my-social-share ul li a:hover {
    opacity: 0.6;
    }
    .woocommerce div.product .my-social-share ul li.twitter a {
    background-color: #00aced;}
    .woocommerce div.product .my-social-share ul li.facebook a {
    background-color: #3b5998;
    }
    .woocommerce div.product .my-social-share ul li.whatsapp a {
    background-color: #3fc387;
    }
    .woocommerce div.product .my-social-share ul li.email a {
    background-color: #3fc387;
    }
    .woocommerce div.product .my-social-share ul li a {
    display: inline-block;
    font-size: 16px;
    line-height: 1.5;
    width: 40px;
    height: 40px;
    line-height: 40px;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    }

    /*make register in middle*/

    @media screen and (min-width: 1024px) and (max-height: 1310px) {
    .account-side-style .woocommerce #customer_login {
    float: left;
    margin-left: -300px;
    margin-right: -400;
    }}

    input#mo_wc_send_otp {
    width: 100%;
    }

    button.woocommerce-Button.woocommerce-button.button.woocommerce-form-register__submit {
    width: 100%;
    }

    /*move stc pay img checkout*/
    li.wc_payment_method.payment_method_paytabs_stcpay [src=”https://akleel.com/wp-content/plugins/paytabs-woocommerce-master/icons/stcpay.png”%5D {
    margin-left: 100px;
    }

    .conditional-shipping-notice {
    font-size: 17px;
    color: red;
    }

    /*for tax price withouttax*/
    small.woocommerce-price-suffix {
    font-size: 11px;
    color:#868279;
    display: block;
    }

    small.woocommerce-price-suffix span.woocommerce-Price-amount.amount{
    color: #868279 !important;
    }

    @media (max-width: 767px) {
    .rtl .uael-woocommerce-pagination ul{
    display:inherit;
    }
    }

    /** Start Block Kit CSS: 136-3-fc37602abad173a9d9d95d89bbe6bb80 **/

    .envato-block__preview{overflow: visible !important;}

    /** End Block Kit CSS: 136-3-fc37602abad173a9d9d95d89bbe6bb80 **/

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