I am pretty new in WordPress and I have the following doubt about how link a CSS file into a WP theme.

For example this is the header.php file of the TwentyTwelve preinstalled template:

 * The Header template for our theme
 * Displays all of the <head> section and everything up till <div id="main">
 * @package WordPress
 * @subpackage Twenty_Twelve
 * @since Twenty Twelve 1.0
?><!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<!--[if !(IE 7) | !(IE 8)  ]><!-->
<html <?php language_attributes(); ?>>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<?php wp_head(); ?>

<body <?php body_class(); ?>>
<div id="page" class="hfeed site">
    <header id="masthead" class="site-header" role="banner">
            <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
            <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>

        <nav id="site-navigation" class="main-navigation" role="navigation">
            <h3 class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></h3>
            <a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
            <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
        </nav><!-- #site-navigation -->

        <?php if ( get_header_image() ) : ?>
        <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
        <?php endif; ?>
    </header><!-- #masthead -->

    <div id="main" class="wrapper">

This file start with the beginning tag but I can't see the link to the used style.css file. Where is it?



dongwei3336 mmm但是调用了twentytwelve_scripts_styles()方法?!?!
6 年多之前 回复
dongxi9326 在theme.function中的functions.php文件内部Twetwelve_scripts_styles()
6 年多之前 回复


您应该检查主题文件夹中的 functions.php </ code>文件:</ p>

< pre> function twentytwelve_scripts_styles(){

/ *

  • /



</ code> </ pre>

http://codex.wordpress.org/Function_Reference/wp_enqueue_style </ p>

http://codex.wordpress.org/Function_Reference/wp_enqueue_script </ p>
</ div>



You should check functions.php file in your theme folder:

function twentytwelve_scripts_styles() {

  * Loads our main stylesheet.
 wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() );


add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' ); 

You can find more info about including styles and scripts in your wordpress site on this links: http://codex.wordpress.org/Function_Reference/wp_enqueue_style


dr5779 它由wp_enqueue_scripts动作调用(如@andreivictor的答案中的代码所示)。 调用wp_head()函数时将插入入队样式。
6 年多之前 回复
duangua5742 好的,但谁称之为Twetwelve_scripts_styles()方法? 在header.php文件中没有被调用。 我想也许在header.php文件中调用一些本身称为twentytwelve_scripts_styles(= ...或者什么?
6 年多之前 回复

这是默认路径:</ p>

wp-content \ themes </ p>
</ div>



if you want to edit .css file, you can find it at wordpress theme folder. this is default path:


Csdn user default icon

<div class="post-text" itemprop="text"> <p>really hoping someone can please help me! I just updated the Divi parent theme on my Wordpress site (www.ellymacdonalddesign.com), and the child CSS theme seems to have stopped working. </p> <p>I've tried the solutions from this question, but they do not seem to work for me: <a href="https://stackoverflow.com/questions/39975520/wordpress-child-theme-style-css-not-working">Wordpress child theme style.css not working</a></p> <p>My child functions.php file is currently:</p> <pre><code>&lt;?php function my_theme_enqueue_styles() { $parent_style = 'divi-style'; wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' ); wp_enqueue_style( $child-style, get_stylesheet_uri() ); } ?&gt; </code></pre> <p>Would really appreciate any guidance please, thank you in advance, Elly</p> </div>

wordpress function.php无法加载css样式表

<div class="post-text" itemprop="text"> <p>I've tried for hours to make wp_enqueue_style running when load in head part.</p> <p>this is my code</p> <pre><code>function test_script(){ //Add Bootstrap Style wp_enqueue_style('muarif-bootstrap',get_template_directory_uri().'/inc/css/bootstrap.css'); } add_action('wp_enqueue_scripts','test_script'); </code></pre> <p>But when i running my website, it's not load properly.</p> <p>Here is my generated head</p> <pre><code>&lt;head&gt; &lt;title&gt;Muarif Gustiar | Web Developer - User Experience - Digital Marketing&lt;/title&gt; &lt;meta charset="UTF-8"&gt; &lt;meta name="description" content=""&gt; &lt;meta name="viewport" content="width=device-width,initial-scale=1.0"&gt; &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"&gt; &lt;style type="text/css"&gt;&lt;/style&gt; &lt;/head&gt; </code></pre> <p>What wrong with my code? i follow the instruction to enqueue <a href="http://www.pixafy.com/blog/2013/06/how-to-enqueue-a-custom-stylesheet-via-functions-php-in-wordpress" rel="nofollow">here</a>. Any suggestion?</p> </div>


<div class="post-text" itemprop="text"> <p>I have created a child theme for my Wordpress theme (Alpine). I have created a style.css and functions.php file. </p> <p>My style.css contains the following code: </p> <p></p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-override"><code> /* Theme Name: Alpine Child Theme URI: http://yourwebsite.com/alpine-child/ Description: My first child theme, based on Alpine Author: Daniel Pataki Author URI: http://danielpataki.com Template: Alpine Version: 1.0.0 Tags: one-column, two-columns, right-sidebar, fluid-layout, custom-menu, editor-style, featured-images, post-formats, rtl-langu$ Text Domain: Alpine-child *</code></pre> </div> </div> <p>My functions.php contains the following code:</p> <p></p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php /** * Enqueue scripts and styles. */ function namescript_scripts() { 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', 'namescript_scripts_scripts' ); ?&gt;</code></pre> </div> </div> <p>When I make changes to the parent style.css file the changes are implemented but this does not happen when I make changes to the style.css in the child theme. </p> <p>Any ideas?</p> </div>


<div class="post-text" itemprop="text"> <p>I created with the elementor page with mine HTML that includes redirect to external css and js files.</p> <p><em>example</em> :</p> <p>my elementor page have <code>"script src='script.js'"</code> and <code>"link rel='stylesheet' href='style.css'"</code></p> <p>Where to put the <code>script.js</code> file and the <code>style.css</code> file ?</p> </div>

CSS没有在Woocommerce Wordpress模板文件中执行

<div class="post-text" itemprop="text"> <p>I have a fully functional Wordpress custom theme. I have just installed Woocommerce and followed <a href="http://docs.woothemes.com/document/third-party-custom-theme-compatibility/" rel="nofollow">this guide</a>. I have followed the very basic instructions to copy <code>page.php</code>, rename it and modify the loop. I have done this and am able to use Woocommerce, however in the page.php file, I have a</p> <pre><code>&lt;?php get_header(); ?&gt; </code></pre> <p>command, which successfully displays that part of the layout in my normal wordpress pages. However, in the direct clone which is now called woocommerce.php, it is not working fully, The links show up, but without any of the associated css which is linked into the header file. Any ideas why two versions of the same file would mean only one correctly imports / interprets the css?</p> <p>Here are the two web pages:</p> <p><a href="http://www.gas-sense.co.uk/blog" rel="nofollow">http://www.gas-sense.co.uk/blog</a><br> <a href="http://www.gas-sense.co.uk/blog/product/gas-sense-personal/" rel="nofollow">http://www.gas-sense.co.uk/blog/product/gas-sense-personal/</a> </p> </div>


<div class="post-text" itemprop="text"> <p>I've created an HTML/CSS design and now I'm trying to convert it to a WordPress template. I've created the stylesheet and function.php.</p> <p>I have the following code in my function.php</p> <pre><code>&lt;?php function test_theme(){ wp_enqueue_style("customstyle", get_stylesheet_uri() ) } add_action( 'wp_enqueue_scripts', 'test_theme' ); </code></pre> <p>I've added this to my header.php</p> <pre><code>&lt;?php wp_head(); ?&gt; </code></pre> <p>For some reason after adding that WordPress has added a few scripts and links to the header but not my custom stylesheet </p> <p>What am I doing wrong? I'm also new to wordpress development and following a youtube video.</p> </div>


<div class="post-text" itemprop="text"> <p>I am trying to understand how to include multiple css, javascript and CDN in my wordpress plugin to create a dashboard. I have a file called <code>index.html</code> that creates the dashboard of my plugin. If I run the file in the browser all the css, CDN and javascript are loaded. Now I would like to use this <code>index.html</code> as the UI for a plugin in wordpress.</p> <p>I have managed to include the <code>html</code> file in the main <code>PHP</code> file of my plugin(<code>myplugin.php</code>). Now I would like to load all the css, CDN and javascript that would normally be located in the <code>&lt;head&gt;</code> of my <code>index.html</code> as in the following example. How can I do it?</p> <pre><code>&lt;head&gt; &lt;meta charset="utf-8" /&gt; &lt;link rel="apple-touch-icon" sizes="76x76" href="../assets/img/apple-icon.png"&gt; &lt;link rel="icon" type="image/png" href="../assets/img/favicon.ico"&gt; &lt;meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /&gt; &lt;title&gt; Dashboard&lt;/title&gt; &lt;meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' name='viewport' /&gt; &lt;!-- Fonts and icons --&gt; &lt;link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet" /&gt; &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" /&gt; &lt;!-- CSS Files --&gt; &lt;link href="../assets/css/bootstrap.min.css" rel="stylesheet" /&gt; &lt;link href="../assets/css/light-bootstrap-dashboard.css?v=2.0.1" rel="stylesheet" /&gt; &lt;!-- Chart.js CDN --&gt; &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js"&gt;&lt;/script&gt; &lt;!-- Core JS Files --&gt; &lt;script src="../assets/js/core/jquery.3.2.1.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="../assets/js/core/popper.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="../assets/js/core/bootstrap.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;!-- Plugin for Switches, full documentation here: http://www.jque.re/plugins/version3/bootstrap.switch/ --&gt; &lt;script src="../assets/js/plugins/bootstrap-switch.js"&gt;&lt;/script&gt; &lt;!-- Google Maps Plugin --&gt; &lt;script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_HERE"&gt;&lt;/script&gt; &lt;!-- Chartist Plugin --&gt; &lt;script src="../assets/js/plugins/chartist.min.js"&gt;&lt;/script&gt; &lt;!-- Notifications Plugin --&gt; &lt;script src="../assets/js/plugins/bootstrap-notify.js"&gt;&lt;/script&gt; &lt;!-- Control Center for Light Bootstrap Dashboard: scripts for the example pages etc --&gt; &lt;script src="../assets/js/light-bootstrap-dashboard.js?v=2.0.1" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="../assets/js/demo.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { // Javascript method's body can be found in assets/js/demos.js demo.initDashboardPageCharts(); demo.showNotification(); }); &lt;/script&gt; &lt;/head&gt; </code></pre> </div>


<div class="post-text" itemprop="text"> <p>I am following along with <a href="https://www.taniarascia.com/wordpress-from-scratch-part-two/" rel="nofollow">this</a> tutorial.</p> <p>I am trying to link the javascript and css files that are usually linked in the header using <code>wp_enqueue_scripts</code> in <code>functions.php</code>. With what I have now, only a blank white page is loading.</p> <p><strong>functions.php</strong></p> <pre><code>&lt;?php // Add scripts and stylesheets function blogtheme_scripts() { wp_enqueue_style( 'style', get_template_directory_uri() . '/style.css', array() ); wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.3.6' ); wp_enqueue_style( 'blog', get_template_directory_uri() . '/css/blog.css' ); wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '3.3.6', true ); wp_register_style('OpenSans', 'http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800'); wp_enqueue_style( 'OpenSans'); } add_action( 'wp_enqueue_scripts', 'blogtheme_scripts' ); // WordPress Titles add_theme_support( 'title-tag' ); ?&gt; </code></pre> <p><strong>header.php</strong></p> <p>I commented out the html links because I figured they weren't supposed to be in there once I linked to them in <code>functions.php</code>:</p> <pre><code>&lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; &lt;!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --&gt; &lt;meta name="description" content=""&gt; &lt;meta name="author" content=""&gt; &lt;!-- Bootstrap core CSS --&gt; &lt;!--&lt;link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"&gt;--&gt; &lt;!-- Custom styles for this template --&gt; &lt;!--&lt;link href="&lt;?php bloginfo(//'template_directory');?&gt;/blog.css" rel="stylesheet"&gt;--&gt; &lt;!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --&gt; &lt;!--[if lt IE 9]&gt; &lt;script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"&gt;&lt;/script&gt; &lt;script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"&gt;&lt;/script&gt; &lt;![endif]--&gt; &lt;?php wp_head();?&gt; &lt;/head&gt; </code></pre> <p>The page just loads as a white page, I'm assuming it's because something is wrong with the linking, and I don't see any errors in the console.</p> <p>Could it be an issue with the versions of the scripts - <code>3.3.6</code>?</p> </div>


<div class="post-text" itemprop="text"> <p>I'm aware that people have had similar issues, but reading through questions here on stackoverflow, and on WP Codex, has not helped me to solve this issue. This is the second child theme I've made. The first one worked perfectly. For some reason, even though I did everything the same, this one does not reflect the formatting of the parent theme. My suspicion is that I either need to enqueue multiple .css for this particular theme, or I have an incorrect tag. Hoping that a new set of eyes could find the problem.</p> <p>Here is the style.css for the child theme:</p> <pre><code>/* Theme Name: Kale-child Theme URI: https://panaceats.com/ Author: **** Author URI: https://panaceats.com/ Description: child theme of Kale Template: kale Version: 1.0.0 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.en.html Text Domain: kale Domain Path: /languages/ Tags: one-column, two-columns, three-columns, right-sidebar, grid-layout, flexible-header, custom-background, custom-colors, custom-header, custom-menu, featured-images,footer-widgets, full-width-template, theme-options, threaded-comments, translation-ready, food-and-drink */ </code></pre> <p>And here is the functions.php for the child theme:</p> <pre><code>&lt;?php function my_theme_enqueue_styles() { $parent_style = 'kale-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 ), wp_get_theme()-&gt;get('Version') ); } add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' ); ?&gt; </code></pre> <p>As you can see, I have followed the directions from the <a href="https://codex.wordpress.org/Child_Themes" rel="nofollow noreferrer">WP Codex - CT</a>.</p> <p><a href="http://www.lyrathemes.com/preview/?theme=kale" rel="nofollow noreferrer">This</a> is what the formatting is supposed to look like.</p> <p>UPDATE: I have now got my child theme looking like the parent theme by copy/pasting all the content from the parent style.css to the child. However, doesn't this defeat the purpose of enqueue? If I have the parent and child enqueued correctly, shouldn't the formatting from the parent reflect in the child theme?</p> </div>

Min.CSS文件。 他们的任务通常出现在Wordpress主题中的哪个位置?

<div class="post-text" itemprop="text"> <p>Someone min'ed a wordpress theme's css file, and I don't see it being referenced in the header.php file. I checked the origin file in functions, too, just to see if it was min'ed there, and added in (seemed unlikely). It is a massive pain in the rear to hunt through the regs stylesheet, and then search out the min to test. (I'm modifying a template). Want to use the uncompressed stylesheet. This won't be a high traffic site, I don't think the min will make too much of a difference.</p> <p>Does anyone know where this min.css file would be hiding? Is there a best practices for this? I looked around... not finding it. hah.</p> <p>Is there a trick piece of php somewhere doing this?</p> </div>

wordpress index.php没有显示出来

<div class="post-text" itemprop="text"> <p>I want to re-do a website using Wordpress. Since I don't feel confident in developing it somewhere else then moving it to the server once completed, I've moved the actual website on a subdir, put a <strong><code>index.html</code></strong> file containing just a redirect on the root, then installed wordpress.</p> <p>Plan is: visitors just calling the url will get <strong><code>index.html</code></strong>, so will be redirected to the old website in the subdir, while I should be able to call <strong><code>url+index.php</code></strong> to check the wp website in development (since html has priority over php). </p> <p>Once website will be completed, I'll remove the <strong><code>index.html</code></strong> file performing the redirect and visitors should start viewing the new website.</p> <p>Problem is: even when calling <strong><code>url/index.php</code></strong> I'm redirected as if I had not added the specific request to <strong><code>index.php</code></strong> file.</p> <p>Any help?</p> </div>

访问Wordpress functions.php

<div class="post-text" itemprop="text"> <p>So the title is pretty self-explanatory. I need to access <code>functions.php</code> in wordpress because Wordpress is adding random <code>p</code> and <code>br</code> tags and it's messing up my code. Searched for over an hour and nothing worked:</p> <p>What I have tried: <br> 1) Connecting via FTP (which isn't viable, long story)<br> 2) Going to Appearance &gt; Editor, which isn't showing. I have searched this issue up as well, and the only solution seems to be deactivating plugins, which I have tried.<br> 3) deleting all my code, then pasting it all in<br> 4) Ctrl + f5<br> 5) deleting some of my code, then pasting it again</p> <p>Websites I've looked at:<br> <a href="https://www.converticacommerce.com/support-maintenance/how-to-edit-functions-php-in-wordpress/" rel="nofollow noreferrer">https://www.converticacommerce.com/support-maintenance/how-to-edit-functions-php-in-wordpress/</a> <br> <a href="https://www.webnots.com/how-to-edit-functions-php-file-and-add-new-functions-in-wordpress/" rel="nofollow noreferrer">https://www.webnots.com/how-to-edit-functions-php-file-and-add-new-functions-in-wordpress/</a><br> <a href="https://www.nosegraze.com/edit-functions-php/" rel="nofollow noreferrer">https://www.nosegraze.com/edit-functions-php/</a></p> <p>All these websites suggest the first two things in the What I have tried list.</p> <p>If there is another way to stop the p tags, please tell me</p> </div>


<div class="post-text" itemprop="text"> <p>Here I attached my function.php code</p> <blockquote> <pre><code>add_action('paypal_ipn_for_wordpress_payment_status_completed','process_payment', 10, 1); function process_payment( $posted ) { $email12= $_SESSION['email12']; $id1=$_SESSION['id']; $date=$_SESSION['date']; // Parse data from IPN $posted[] array $first_name = isset($posted['first_name']) ? $posted['first_name'] : ''; $last_name = isset($posted['last_name']) ? $posted['last_name'] : ''; $payment_amount = isset($posted['mc_gross']) ? $posted['mc_gross'] : ''; $recurring_payment_id = isset($posted['recurring_payment_id']) ? $posted['recurring_payment_id'] : ''; $payer_email = isset($posted['payer_email']) ? $posted['payer_email'] : ''; $txn_id = isset($posted['txn_id']) ? $posted['txn_id'] : ''; $receiver_email= isset($posted['receiver_email']) ? $posted['receiver_email'] : ''; $mail_From = $payer_email; $mail_To = $receiver_email; $mail_Subject = "VERIFIED IPN"; $mail_Body = "Hello Secretary, New registration for the event: Name: $first_name $last_name"; mail($mail_To, $mail_Subject, $mail_Body, $mail_From); $mail_From = $receiver_email; $mail_To = $payer_email; $mail_Subject = "VERIFIED IPN"; $mail_Body = "Thank you for registration. Your registration has been successfully done."; mail($mail_To, $mail_Subject, $mail_Body, $mail_From); require_once('wp-config.php'); global $wpdb; $id12 = $wpdb-&gt;get_results("SELECT * FROM wp_nonmembersdetail where Email= '$email12' "); foreach($id12 as $row1) { $wpdb-&gt;insert( wp_checkoutnonmembersdetails, array( 'Event_Name' =&gt; $row1-&gt;Event_Name, 'First_Name' =&gt; $row1-&gt;First_Name, 'Last_Name' =&gt; $row1-&gt;Last_Name, 'Address' =&gt; $row1-&gt;Address, 'Email' =&gt; $row1-&gt;Email, 'cellphone' =&gt; $row1-&gt;cellphone, 'quantity' =&gt; $row1-&gt;quantity, 'payment_amount' =&gt; $payment_amount ) ); } $id22 = $wpdb-&gt;get_results("SELECT * FROM wp_tmpmembersdetail where id = '$id1' "); foreach($id22 as $row2) { $wpdb-&gt;insert( wp_checkouttmpmembersdetail, array( 'Event_Name' =&gt; $row2-&gt;Event_Name, 'First_Name' =&gt; $row2-&gt;First_Name, 'Last_Name' =&gt; $row2-&gt;Last_Name, 'Address' =&gt; $row2-&gt;Address, 'Email' =&gt; $row2-&gt;Email, 'cellphone' =&gt; $row2-&gt;cellphone, 'quantity' =&gt; $row2-&gt;quantity, 'payment_amount' =&gt; $payment_amount ) ); }} </code></pre> </blockquote> <p>I found that there is no proble in function.php I think there is a problem in IPN hook. bcz I already get session value in my another hook code which is also in function.php and also working perfectly. Above I attached IPN hook code. In that I want to get session value of email12. please anyone help me. </p> </div>

Wordpress CSS无法正常工作

<div class="post-text" itemprop="text"> <p>My WordPress themes are not working. My WordPress is 4.9.3, everything was working fine until the server admin moved the directory. So I basically, edited the DB home and site URL values, and the website is functioning, except the themes. All of them I even tried the Twenty FifteenVersion and it's not working too. What is not working exactly is the CSS, although when I check through to inspect if the files are loaded, and when I download them they are correct. So the themes are sort of HTML only and messed up. I checked/corrected the file permissions, and still, it's not working. </p> </div>


<div class="post-text" itemprop="text"> <p>So i made a slideshow using HTML, CSS and JS. </p> <p>It's for a personal blog i'm creating, so i would like to add the slideshow into a Wordpress theme that i purchased.</p> <p>I created a child theme and tried to edit the function.php file and the style.css, and although i know some PHP it's really hard to understand how the code works and where to add mine.</p> <p>Basically i want to display my slideshow initially, and then the rest of the Wordpress theme with all the posts and such.</p> <p>Is it possible or should i only work with the customization options of the theme, although they're limited?</p> </div>


<div class="post-text" itemprop="text"> <p>I created a plugin to export some specific content in Wordpress ( called <strong>cav</strong> and located in <strong>/wp-content/plugins/cav</strong> ) and I added its admin menu link in the Tools main menu as follows:</p> <pre><code>define( 'CAV_DIR', plugin_dir_path( __FILE__ ) ); define( 'CAV_URL', plugins_url()."/cav" ); function cavlfo_admin_enqueue($hook) { global $post; if ( $hook == 'post-new.php' || $hook=='tools.php?page=CAV' ) { wp_enqueue_style( 'cavlfo_style', CAV_URL. '/css/cav.css' ); wp_enqueue_style( 'cavlfo_targetted', CAV_URL.'/css/targettedcss.css' ); wp_enqueue_script( 'cavlfo_targetted', CAV_URL.'/js/targetted.js', array("jquery") ); } } add_action( 'admin_enqueue_scripts', 'cavlfo_admin_enqueue' ); </code></pre> <p>All this works fine when I used </p> <p><code>if( $hook == 'post-new.php' || $hook=='tools.php' ){ . . .}</code> </p> <p>but I want it to work ONLY when it's actually </p> <p><code>if( $hook == 'post-new.php' || $hook=='tools.php?page=CAV' ){ . . .}</code> (Only on the page is CAV )</p> <p>Any suggestion? </p> </div>


<div class="post-text" itemprop="text"> <p>So I've been trying to create a homepage for my WP website that would have its own design not based on the theme. I want it to be a simple html and css page and then Wordpress stuff kicks in when a user clicks a link. I don't need header, footer sidebar tags or anything like that, you could say I just want an html/css homepage separate from the Wordpress.</p> <p>I've read about custom templates and tried editing theme functions by adding this:</p> <pre><code>function wpse_enqueue_page_template_styles() { if ( is_page_template( 'customhome.php' ) ) { wp_enqueue_style( 'page-template', get_stylesheet_directory_uri() . '/custom-home.css' ); } } add_action( 'wp_enqueue_scripts', 'wpse_enqueue_page_template_styles' ); </code></pre> <p>but when I create a page with the template it shows me plain html and doesn't load css.</p> <p>I'm quite new to Wordpress theme editing and don't know php that much but adding your own html/css is said to be quite easy in WP.</p> <p>How do I integrate my code into WP so it loads only my html with the correct css?</p> </div>


<div class="post-text" itemprop="text"> <pre><code>.jumbotron { margin-bottom: 0px; background-image: url(../img/desktop-urania.jpg); min-height: 600px; background-attachment: fixed; background-position: center; background-repeat: no-repeat; background-size: cover; } </code></pre> <p>This is the working CSS in HTML, but i am trying to convert HTML to WordPress, while converting I link my stylesheet in function.php <strong>(function urania_script_enqueue() { wp_enqueue_style('customstyle', get_template_directory_uri() . '/css/urania.css', array( '$handle', '$src', '$deps', '$ver', '$media'), '1.0.0', 'all');)</strong></p> <p>but image is not loading ... </p> <p>Theme Name URANIA:: -&gt; Css-&gt; urania.css (Stylesheet) Theme Name URANIA:: -&gt; img -&gt; desktop-urania.jpg (image)</p> <p>Please Help</p> </div>


<div class="post-text" itemprop="text"> <p>I can't load newer style.css changes I've made into my wordpress theme, its pulling an older version of that file / ignoring any new changes I've made/saved.</p> <p>In functions.php under the root of my theme folder "humescores" I have this to enqueue my stylesheets</p> <pre><code>function humescores_scripts() { //Enqueue Google fonts: Source Sans Pro and PT Serif wp_enqueue_style('humescores-fonts','https://fonts.googleapis.com/css?family=PT+Serif:400,400i,700,700i|Source+Sans+Pro:400,400i,600,900'); //Connects style.css wp_enqueue_style( 'humescores-style', get_stylesheet_uri() ); wp_enqueue_script( 'humescores-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true ); wp_enqueue_script( 'humescores-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true ); if ( is_singular() &amp;&amp; comments_open() &amp;&amp; get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'humescores_scripts' ); </code></pre> <p>Directory Structure</p> <p><a href="https://i.stack.imgur.com/fgIpv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fgIpv.png" alt="enter image description here"></a></p> </div>


董付国系列教材《Python程序设计基础》、《Python程序设计(第2版)》、《Python可以这样学》配套视频,讲解Python 3.5.x和3.6.x语法、内置对象用法、选择与循环以及函数设计与使用、lambda表达式用法、字符串与正则表达式应用、面向对象编程、文本文件与二进制文件操作、目录操作与系统运维、异常处理结构。








【超实用课程内容】 本课程演示的是一套基于Java的SSM框架实现的图书管理系统,主要针对计算机相关专业的正在做毕设的学生与需要项目实战练习的java人群。详细介绍了图书管理系统的实现,包括:环境搭建、系统业务、技术实现、项目运行、功能演示、系统扩展等,以通俗易懂的方式,手把手的带你从零开始运行本套图书管理系统,该项目附带全部源码可作为毕设使用。 【课程如何观看?】 PC端:https://edu.csdn.net/course/detail/27513 移动端:CSDN 学院APP(注意不是CSDN APP哦) 本课程为录播课,课程2年有效观看时长,大家可以抓紧时间学习后一起讨论哦~ 【学员专享增值服务】 源码开放 课件、课程案例代码完全开放给你,你可以根据所学知识,自行修改、优化




【为什么学爬虫?】 &nbsp; &nbsp; &nbsp; &nbsp;1、爬虫入手容易,但是深入较难,如何写出高效率的爬虫,如何写出灵活性高可扩展的爬虫都是一项技术活。另外在爬虫过程中,经常容易遇到被反爬虫,比如字体反爬、IP识别、验证码等,如何层层攻克难点拿到想要的数据,这门课程,你都能学到! &nbsp; &nbsp; &nbsp; &nbsp;2、如果是作为一个其他行业的开发者,比如app开发,web开发,学习爬虫能让你加强对技术的认知,能够开发出更加安全的软件和网站 【课程设计】 一个完整的爬虫程序,无论大小,总体来说可以分成三个步骤,分别是: 网络请求:模拟浏览器的行为从网上抓取数据。 数据解析:将请求下来的数据进行过滤,提取我们想要的数据。 数据存储:将提取到的数据存储到硬盘或者内存中。比如用mysql数据库或者redis等。 那么本课程也是按照这几个步骤循序渐进的进行讲解,带领学生完整的掌握每个步骤的技术。另外,因为爬虫的多样性,在爬取的过程中可能会发生被反爬、效率低下等。因此我们又增加了两个章节用来提高爬虫程序的灵活性,分别是: 爬虫进阶:包括IP代理,多线程爬虫,图形验证码识别、JS加密解密、动态网页爬虫、字体反爬识别等。 Scrapy和分布式爬虫:Scrapy框架、Scrapy-redis组件、分布式爬虫等。 通过爬虫进阶的知识点我们能应付大量的反爬网站,而Scrapy框架作为一个专业的爬虫框架,使用他可以快速提高我们编写爬虫程序的效率和速度。另外如果一台机器不能满足你的需求,我们可以用分布式爬虫让多台机器帮助你快速爬取数据。 &nbsp; 从基础爬虫到商业化应用爬虫,本套课程满足您的所有需求! 【课程服务】 专属付费社群+每周三讨论会+1v1答疑




深度学习系列课程从深度学习基础知识点开始讲解一步步进入神经网络的世界再到卷积和递归神经网络,详解各大经典网络架构。实战部分选择当下最火爆深度学习框架PyTorch与Tensorflow/Keras,全程实战演示框架核心使用与建模方法。项目实战部分选择计算机视觉与自然语言处理领域经典项目,从零开始详解算法原理,debug模式逐行代码解读。适合准备就业和转行的同学们加入学习! 建议按照下列课程顺序来进行学习 (1)掌握深度学习必备经典网络架构 (2)深度框架实战方法 (3)计算机视觉与自然语言处理项目实战。(按照课程排列顺序即可)




这是一个门针对零基础学员学习微信小程序开发的视频教学课程。课程采用腾讯官方文档作为教程的唯一技术资料来源。杜绝网络上质量良莠不齐的资料给学员学习带来的障碍。 视频课程按照开发工具的下载、安装、使用、程序结构、视图层、逻辑层、微信小程序等几个部分组织课程,详细讲解整个小程序的开发过程


<p> 限时福利限时福利,<span>15000+程序员的选择!</span> </p> <p> 购课后添加学习助手(微信号:csdn590),按提示消息领取编程大礼包!并获取讲师答疑服务! </p> <p> <br> </p> <p> 套餐中一共包含5门程序员必学的数学课程(共47讲) </p> <p> 课程1:《零基础入门微积分》 </p> <p> 课程2:《数理统计与概率论》 </p> <p> 课程3:《代码学习线性代数》 </p> <p> 课程4:《数据处理的最优化》 </p> <p> 课程5:《马尔可夫随机过程》 </p> <p> <br> </p> <p> 哪些人适合学习这门课程? </p> <p> 1)大学生,平时只学习了数学理论,并未接触如何应用数学解决编程问题; </p> <p> 2)对算法、数据结构掌握程度薄弱的人,数学可以让你更好的理解算法、数据结构原理及应用; </p> <p> 3)看不懂大牛代码设计思想的人,因为所有的程序设计底层逻辑都是数学; </p> <p> 4)想学习新技术,如:人工智能、机器学习、深度学习等,这门课程是你的必修课程; </p> <p> 5)想修炼更好的编程内功,在遇到问题时可以灵活的应用数学思维解决问题。 </p> <p> <br> </p> <p> 在这门「专为程序员设计的数学课」系列课中,我们保证你能收获到这些:<br> <br> <span> </span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">①价值300元编程课程大礼包</span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">②应用数学优化代码的实操方法</span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">③数学理论在编程实战中的应用</span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">④程序员必学的5大数学知识</span> </p> <p class="ql-long-24357476"> <span class="ql-author-24357476">⑤人工智能领域必修数学课</span> </p> <p> <br> 备注:此课程只讲程序员所需要的数学,即使你数学基础薄弱,也能听懂,只需要初中的数学知识就足矣。<br> <br> 如何听课? </p> <p> 1、登录CSDN学院 APP 在我的课程中进行学习; </p> <p> 2、登录CSDN学院官网。 </p> <p> <br> </p> <p> 购课后如何领取免费赠送的编程大礼包和加入答疑群? </p> <p> 购课后,添加助教微信:<span> csdn590</span>,按提示领取编程大礼包,或观看付费视频的第一节内容扫码进群答疑交流! </p> <p> <img src="https://img-bss.csdn.net/201912251155398753.jpg" alt=""> </p>


实验内容: 通过对具体的文件存储空间的管理、文件的物理结构、目录结构和文件操作的实现,加深对文件系统内部功能和实现过程的理解。 要求: 1.在内存中开辟一个虚拟磁盘空间作为文件存储器,在其上实现一个简








C++语言基础视频培训课程:本课与主讲者在大学开出的程序设计课程直接对接,准确把握知识点,注重教学视频与实践体系的结合,帮助初学者有效学习。本教程详细介绍C++语言中的封装、数据隐藏、继承、多态的实现等入门知识;主要包括类的声明、对象定义、构造函数和析构函数、运算符重载、继承和派生、多态性实现等。 课程需要有C语言程序设计的基础(可以利用本人开出的《C语言与程序设计》系列课学习)。学习者能够通过实践的方式,学会利用C++语言解决问题,具备进一步学习利用C++开发应用程序的基础。


这门课程基于主流的java8平台,由浅入深的详细讲解了java SE的开发技术,可以使java方向的入门学员,快速扎实的掌握java开发技术!


本课程为HoloLens2开发入门教程,讲解部署开发环境,安装VS2019,Unity版本,Windows SDK,创建Unity项目,讲解如何使用MRTK,编辑器模拟手势交互,打包VS工程并编译部署应用到HoloLens上等。




pokemmo必须的4个rom 分别为绿宝石 火红 心金 黑白 还有汉化补丁 资源不错哦 记得下载


本文件主要是针对使用dlib的imglab标注工具标记的目标检测框和关键点检测而生成的xml文件, 转换为coco数据集格式.

Java面试史上最全的JAVA专业术语面试100问 (前1-50)

前言: 说在前面, 面试题是根据一些朋友去面试提供的,再就是从网上整理了一些。 先更新50道,下一波吧后面的也更出来。 求赞求关注!! 废话也不多说,现在就来看看有哪些面试题 1、面向对象的特点有哪些? 抽象、继承、封装、多态。 2、接口和抽象类有什么联系和区别? 3、重载和重写有什么区别? 4、java有哪些基本数据类型? 5、数组有没有length()方法?String有没有length()方法? 数组没有length()方法,它有length属性。 String有length()方法。 集合求长度用

2019 AI开发者大会

2019 AI开发者大会(AI ProCon 2019)是由中国IT社区CSDN主办的AI技术与产业年度盛会。多年经验淬炼,如今蓄势待发:2019年9月6-7日,大会将有近百位中美顶尖AI专家、知名企业代表以及千余名AI开发者齐聚北京,进行技术解读和产业论证。我们不空谈口号,只谈技术,诚挚邀请AI业内人士一起共铸人工智能新篇章!




DirectX修复工具(DirectX Repair)是一款系统级工具软件,简便易用。本程序为绿色版,无需安装,可直接运行。 本程序的主要功能是检测当前系统的DirectX状态,如果发现异常则进行修复



2019 Python开发者日-培训




相关热词 c#分级显示数据 c# 不区分大小写替换 c#中调用就java c#正则表达式 验证小数 c# vscode 配置 c#三维数组能存多少数据 c# 新建excel c#多个文本框 c#怎么创建tcp通讯 c# mvc 电子病例