{"id":11955760,"date":"2019-09-21T16:06:40","date_gmt":"2019-09-21T16:06:40","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/custom-css-not-working-74\/"},"modified":"2019-09-21T16:08:46","modified_gmt":"2019-09-21T16:08:46","slug":"custom-css-not-working-74","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/custom-css-not-working-74\/","title":{"rendered":"Custom css not working"},"content":{"rendered":"<p>I have been designing my site with free generatepress and child theme but if I add my custom css it affects only the desktop unless i add it directly to &#8220;additional css&#8221; in theme customization located in appearance.<br \/>\nI have below function..<\/p>\n<pre><code>function generatepress_child_enqueue_scripts() {\n\tif ( is_rtl() ) {\n\t\twp_enqueue_style( &#039;generatepress-rtl&#039;, trailingslashit( get_template_directory_uri() ) . &#039;rtl.css&#039; );\n\t}\n}\nadd_action( &#039;wp_enqueue_scripts&#039;, &#039;generatepress_child_enqueue_scripts&#039;, 100 );\n\nadd_action( &#039;wp_enqueue_scripts&#039;, &#039;tu_child_theme_enqueue&#039; );\nfunction tu_child_theme_enqueue() {\n    wp_enqueue_style( &#039;child-theme-style&#039;, get_stylesheet_directory_uri() . &#039;\/custom.css&#039;);\n}<\/code><\/pre>\n<p>but it doestn&#8217;t affect the mobile view when I check on my phone. Thanks in advance to whoever will help.<br \/>\nCurrently I have my css on &#8220;additional css&#8221; and its too many that it slows my site. <\/p>\n","protected":false},"template":"","class_list":["post-11955760","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11955760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11955760\/revisions"}],"predecessor-version":[{"id":11955767,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11955760\/revisions\/11955767"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=11955760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}