gpt4 book ai didi

php - 如何将我的外部 css 文件包含到我的插件中

转载 作者:行者123 更新时间:2023-11-27 23:56:32 25 4
gpt4 key购买 nike

如何将外部 CSS 文件包含到我的插件中?我在谷歌上搜索了很多时间,但没有任何效果:((

Wordpress 插件,用 PHP 编写

函数字段(){ echo '

    <div class="DodajWpis"> <h1> Dodaj wpis </h1> </div> 
<form method="post" id="#form" action="" enctype="multipart/form-data">

<label class="katalogLabelName" for="name">Nazwa</label>
<input class="Input" id="name" type="text" style="width:50%;" name="nazwa" required>

<label class="katalogLabelName" for="tytul">Tytul</label>
<input class="Input" type="text" style="width:50%;" name="tytul">

<label class="katalogLabelName" for="maincategory">Kategoria</label>
<input class="Input" type="text" style="width:50%;" list="maincategory" name="maincategory">
<datalist id="maincategory" required>';
$args = array('show_option_none' => 'No Category','hide_empty' => 0);
$kategorie = get_categories( $args );
foreach ( $kategorie as $category ) :
echo '<option value="' .$category->name . '">' . $category->name . '</option>';
endforeach;
echo '</datalist>

<label class="katalogLabelName" for="location">Lokalizacja</label>
<input class="Input" type="text" style="width:50%;" list="location" name="location">
<datalist id="location" required>';
//$args = array('show_option_none' => 'No Category','hide_empty' => 0);
$lokalizacja = get_categories(array('taxonomy=>location'));
foreach ( $lokalizacja as $term ) :
echo '<option value="' .$term->name . '">' . $term->name . '</option>';
endforeach;
echo '</datalist>


<label class="katalogLabelName" for="slowa_kluczowe">Slowa kluczowe (Limit to '.returnme('slowa_klucz_limit').')</label>
<input class="Input" type="text" style="width:50%;" name="slowa_kluczowe" id="slowa_kluczowe" required>

<label class="katalogLabelName" for="email">Adres e-mail</label>
<input class="Input" type="email" style="width:50%;" name="email" id="email">

<label class="katalogLabelName" for="website">Adres strony internetowej</label>
<input class="Input" type="url" style="width:50%;" id="website" name="website" required>

<label class="katalogLabelName" for="miasto">Miasto</label>
<input class="Input" type="text" style="width:50%;" name="miasto" id="miato">


<input class="Wyslij" type="file" id="async-upload" name="html-upload" accept="image/png, image/jpeg" required >
<br>

<label class="katalogLabelName" for="textarea">Opis</label>
<textarea id="textarea" style="width:50%;" name="opis" required></textarea>
<input type="submit" value="wyslij" class="button">

</form>
';

}
add_shortcode('form', 'fields');

如何添加外部CSS文件?

最佳答案

你可以试试把这个放在echo之后` <link rel="stylesheet" href="https://example.com/css/style.css">

<link rel="stylesheet" href="https://example.com/css/style.css">

<div class="DodajWpis"> <h1> Dodaj wpis </h1> </div>
<form method="post" id="#form" action="" enctype="multipart/form-data">

<label class="katalogLabelName" for="name">Nazwa</label>
<input class="Input" id="name" type="text" style="width:50%;" name="nazwa" required>

<label class="katalogLabelName" for="tytul">Tytul</label>
<input class="Input" type="text" style="width:50%;" name="tytul">

<label class="katalogLabelName" for="maincategory">Kategoria</label>
<input class="Input" type="text" style="width:50%;" list="maincategory" name="maincategory">
<datalist id="maincategory" required>';
$args = array('show_option_none' => 'No Category','hide_empty' => 0);
$kategorie = get_categories( $args );
foreach ( $kategorie as $category ) :
echo '<option value="' .$category->name . '">' . $category->name . '</option>';
endforeach;
echo '</datalist>

<label class="katalogLabelName" for="location">Lokalizacja</label>
<input class="Input" type="text" style="width:50%;" list="location" name="location">
<datalist id="location" required>';
//$args = array('show_option_none' => 'No Category','hide_empty' => 0);
$lokalizacja = get_categories(array('taxonomy=>location'));
foreach ( $lokalizacja as $term ) :
echo '<option value="' .$term->name . '">' . $term->name . '</option>';
endforeach;
echo '</datalist>


<label class="katalogLabelName" for="slowa_kluczowe">Slowa kluczowe (Limit to '.returnme('slowa_klucz_limit').')</label>
<input class="Input" type="text" style="width:50%;" name="slowa_kluczowe" id="slowa_kluczowe" required>

<label class="katalogLabelName" for="email">Adres e-mail</label>
<input class="Input" type="email" style="width:50%;" name="email" id="email">

<label class="katalogLabelName" for="website">Adres strony internetowej</label>
<input class="Input" type="url" style="width:50%;" id="website" name="website" required>

<label class="katalogLabelName" for="miasto">Miasto</label>
<input class="Input" type="text" style="width:50%;" name="miasto" id="miato">


<input class="Wyslij" type="file" id="async-upload" name="html-upload" accept="image/png, image/jpeg" required >
<br>

<label class="katalogLabelName" for="textarea">Opis</label>
<textarea id="textarea" style="width:50%;" name="opis" required></textarea>
<input type="submit" value="wyslij" class="button">

</form>

关于php - 如何将我的外部 css 文件包含到我的插件中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56233281/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com