WordPress主题中的.css引用在哪里?

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:

<?php
/**
 * 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(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) | !(IE 8)  ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<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>
<![endif]-->
<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
<div id="page" class="hfeed site">
    <header id="masthead" class="site-header" role="banner">
        <hgroup>
            <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>
        </hgroup>

        <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?

Tnx

Andrea

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

2个回答



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

< pre> function twentytwelve_scripts_styles(){
.....

/ *
*加载我们的主样式表。

  • /
    wp_enqueue_style('twentytwelve-style',get_stylesheet_uri());

    ......
    }

add_action('wp_enqueue_scripts','twentytwelve_scripts_styles');

</ code> </ pre>

您可以在此链接上找到有关在wordpress网站中包含样式和脚本的更多信息:
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

http://codex.wordpress.org/Function_Reference/wp_enqueue_script

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



如果要编辑.css文件,可以在wordpress主题文件夹中找到它。
这是默认路径:</ 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:

wp-content\themes

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Wordpress儿童主题style.css已停止工作

<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>

style.css无法在Wordpress子主题中使用

<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>

在wordpress元素页面中添加css和js文件的位置

<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>

无法在wordpress主题上加载自定义CSS

<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>

如何在Wordpress插件中加载多个css,js和CDN

<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>

使用functions.php链接wordpress中的样式表和脚本

<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>

WordPress子主题不格式化

<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>

如何在wordpress中的function.php中获取会话值

<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>

将自定义幻灯片添加到Wordpress主题

<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>

在Wordpress中的某些管理页面上自定义css和JS

<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>

如何让Wordpress加载我的html和css代码

<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>

如何在样式表Wordpress中链接背景图像?

<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>

无法在wordpress中排列更新的style.css更改

<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内功修炼)

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

获取Linux下Ftp目录树并逐步绑定到treeview

在linux下抓取目录树,双击后获取该节点子节点(逐步生成)。另外有两个类,一个是windows下的(一次性获取目录树),一个是linux下的(足部获取目录树)

NS网络模拟和协议仿真源代码

NS网络模拟和协议仿真源代码,包含代码说明及协议分析

简单的NS3网络模拟仿真(计算机网络作业)

简单的NS3网络模拟仿真,内附有PPT演示。论文评述。以及简单的安装教程。

手把手实现Java图书管理系统(附源码)

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

三个项目玩转深度学习(附1G源码)

从事大数据与人工智能开发与实践约十年,钱老师亲自见证了大数据行业的发展与人工智能的从冷到热。事实证明,计算机技术的发展,算力突破,海量数据,机器人技术等,开启了第四次工业革命的序章。深度学习图像分类一直是人工智能的经典任务,是智慧零售、安防、无人驾驶等机器视觉应用领域的核心技术之一,掌握图像分类技术是机器视觉学习的重中之重。针对现有线上学习的特点与实际需求,我们开发了人工智能案例实战系列课程。打造:以项目案例实践为驱动的课程学习方式,覆盖了智能零售,智慧交通等常见领域,通过基础学习、项目案例实践、社群答疑,三维立体的方式,打造最好的学习效果。

150讲轻松搞定Python网络爬虫

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

cuda开发cutilDLL

包括cutil32.dll、cutil32D.dll、cutil32.lib、cutil32D.lib,以及附带的glew32.lib/freeglut.lib

深度学习原理+项目实战+算法详解+主流框架(套餐)

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

Tensorflow与python3.7适配版本

tensorflow与python3.7匹配的最新库,更新了python3.7以后可以自行下载,或者去国外python的扩展包下载界面自行下载。

4小时玩转微信小程序——基础入门与微信支付实战

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

专为程序员设计的数学课

<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.在内存中开辟一个虚拟磁盘空间作为文件存储器,在其上实现一个简

机器学习初学者必会的案例精讲

通过六个实际的编码项目,带领同学入门人工智能。这些项目涉及机器学习(回归,分类,聚类),深度学习(神经网络),底层数学算法,Weka数据挖掘,利用Git开源项目实战等。

四分之一悬架模型simulink.7z

首先建立了四分之一车辆悬架系统的数学模型,应用MATLAB/Simulink软件建立该系统的仿真模型,并输入路面激励为随机激励,控制不同的悬架刚度和阻尼,选用最优的参数得到车辆悬架的振动加速度变化曲线

MFC一站式终极全套课程包

该套餐共包含从C小白到C++到MFC的全部课程,整套学下来绝对成为一名C++大牛!!!

C++语言基础视频教程

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

Java8零基础入门视频教程

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

HoloLens2开发入门教程

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

C/C++学习指南全套教程

C/C++学习的全套教程,从基本语法,基本原理,到界面开发、网络开发、Linux开发、安全算法,应用尽用。由毕业于清华大学的业内人士执课,为C/C++编程爱好者的教程。

pokemmo的资源

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

test_head.py

本文件主要是针对使用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业内人士一起共铸人工智能新篇章!

linux“开发工具三剑客”速成攻略

工欲善其事,必先利其器。Vim+Git+Makefile是Linux环境下嵌入式开发常用的工具。本专题主要面向初次接触Linux的新手,熟练掌握工作中常用的工具,在以后的学习和工作中提高效率。

DirectX修复工具V4.0增强版

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

20行代码教你用python给证件照换底色

20行代码教你用python给证件照换底色

2019 Python开发者日-培训

本次活动将秉承“只讲技术,拒绝空谈”的理念,邀请十余位身处一线的Python技术专家,重点围绕Web开发、自动化运维、数据分析、人工智能等技术模块,分享真实生产环境中使用Python应对IT挑战的真知灼见。此外,针对不同层次的开发者,大会还安排了深度培训实操环节,为开发者们带来更多深度实战的机会。

我以为我对Mysql事务很熟,直到我遇到了阿里面试官

太惨了,面试又被吊打

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