7:16 AM
0
A: Unable to access Wordpress functions from functions.php

talentedaamercheck your header.php it should contain <?php wp_head(); ?> before the closing </head> tag. check your footer.php it should contain <?php wp_footer(); ?> before the closing </body> tag. You also need to hook your function to wp_enqueue_scripts action hook and then add wp_enqueue_script() and wp...

 
thanks for the response. I had not done that yet but it did not help. can you think of any other reason why I wouldn't be able to use the wp_enqueue_style() function?
 
i mean check your header.php file there you should have <?php wp_head(); ?> before closing </head> and also check your footer.php file you should also have <?php wp_footer(); ?> function before </body>
missing wp_head() and wp_footer() does not enqueue the scripts and styles.
you also need to hook your function to wp_enqueue_scripts and then add wp_enqueue_script() and wp_enqueue_style() inside that function. e.g; function add_theme_scripts_styles() { wp_enqueue_style( 'style-name', 'path_to_the_style.css' ); wp_enqueue_script( 'script-name', 'path_to_the_script.js', array('jquery'), '1.0.0', true ); } add_action( 'wp_enqueue_scripts', 'add_theme_scripts_styles' );
 
yes!!!! thank you so much for your patience
 
welcome, please cast your vote :-)
 
what do you mean cast my vote? is there somewhere I can hook you up with an upvote or something?
 
7:18 AM
yes, when you find the answer useful or not useful you can cast vote on the left side of the answer there are two arrows to vote up or vote down. so that other visitor can see if the answer is useful or not.