tweakimp Posted July 22, 2016 Share Posted July 22, 2016 hi, im new here i have a wordpress page for my table tennis club. there is a site with all the current standings and i want to parse a table from it to one of the wordpress pages. i created a dynamic table with php and styled it with css and javascript. i looks perfectly fine and works just as i want to it to when i run it locally in my broswer. however, i cant get it to work on the wordpress page. right now, im trying to embed it with a shortcode so i can embed it anywhere i want, but so far i am not able to apply the css and the javascript to the parsed table. but the css from the page is applied to the table, i dont want that. also the css and javascript i use in th i got the advice to use wp_enqueue_scripts, but i dont fully understand how it works. the theme i use is hemingway, its free. i am using a child theme of that for the page. its function.php looks like this <?php /* Enqueue parent stylesheet first, child stylesheet second*/ function child_theme_s_enqueue_styles() { $parent_style = 'parent-style'; wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ) ); } add_action( 'wp_enqueue_scripts', 'child_theme_s_enqueue_styles' ); so it already has enqueue style in it and i dont know how to add the infomation i need to make the custom css and js work without breaking the old code. also: is there a better way to do this? Quote Link to comment https://forums.phpfreaks.com/topic/301542-how-does-enqueue-style-work/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.