Why am I not able to pull the style.css and bootstrap.css properly?

Asked

Viewed 145 times

1

I created a function to pull the css and bootstrap files in Wordpress but they are appearing at the end the number of a version that disturbs

<link rel='stylesheet' id='wp-block-library-css'  href='https://meusite.com.br/wp-includes/css/dist/block-library/style.min.css?ver=5.0.4' type='text/css' media='all' />
<link rel='stylesheet' id='style-css'  href='https://meusite.com.br/wp-content/themes/cjovem/css/bootstrap.css?ver=5.0.4' type='text/css' media='all' />
<link rel='stylesheet' id='bootstrap-css'  href='https://meusite.com.br/wp-content/themes/cjovem/css/style.css?ver=5.0.4' type='text/css' media='all' />
<link rel='https://api.w.org/' href='https://teste.piripiriacontece.com.br/wp-json/' />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://meusite.com.br/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://meusite.com.br/wp-includes/wlwmanifest.xml" /> 
<meta name="generator" content="WordPress 5.0.4" />
  

Function in PHP

    // Register Script
function custom_scripts() {

    wp_enqueue_style('style', get_template_directory_uri() . '/css/bootstrap.css');
    wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/style.css');



    wp_register_script( 'icones', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css', false, false, false );


    wp_register_script( 'magnific-popup', 'css/magnific-popup.css', false, false, false );

    wp_register_script( 'Animacao', 'css/animate.css', false, false, false );

}
add_action( 'wp_enqueue_scripts', 'custom_scripts' );
  • You can update the question with the function code wp_enqueue_style?

  • The problem must be on the way to the file. Only with that you posted can not help.

  • Good morning buddy, I believe it is some part of the function getting in the way, but I can not identify, I am putting the link googlr drive with the full code Humm link

  • Watch the 8:10 minute of this video: https://www.youtube.com/watch?v=sTy77jhsMH8 They’re showing you how to put CDN links, but the files follow the same pattern.

  • While this link may answer the question, it is best to include the essential parts of the answer here and provide the link for reference. Replies per link only can be invalidated if the page with the link is changed. - Of Revision

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.