星期三 , 22 1 月 2025

内置style的前台文章发布表单

<div style="max-width: 80vw; margin: 0 auto;">
    <h2 style="text-align: center;">Inline Styled Form</h2>
    <form style="width: 1200px;padding: 20px; background-color: #f4f4f4; border-radius: 8px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);">
        <label for="tg-title" style="display: block; margin-bottom: 5px;">Title:</label>
        <input type="text" id="tg-title" name="tg_title" style="width: 100%; padding: 8px; margin-bottom: 15px; border-radius: 5px; border: 1px solid #ccc;" required>

     <label for="tg-tag" style="display: block; margin-bottom: 5px;">tag:</label>
        <input type="text" id="tg-tag" name="tg_tag" style="width: 100%; padding: 8px; margin-bottom: 15px; border-radius: 5px; border: 1px solid #ccc;" required>

        <label for="tg-category" style="display: block; margin-bottom: 5px;">Category:</label>
        <select id="tg-category" name="tg_category" style="width: 100%; padding: 8px; margin-bottom: 15px; border-radius: 5px; border: 1px solid #ccc;" required>
            <option value="">Select Category</option>
            <option value="USA">USA</option>
            
            <!-- Add more countries as needed -->
        </select>


        <label for="tg-content" style="display: block; margin-bottom: 5px;">Content:</label>
        <?php wp_editor( '', 'tg-content', array() ); ?>
        

        <input type="submit" value="Submit" style="background-color: #4CAF50; color: white; padding: 10px 15px; border: none; border-radius: 5px; cursor: pointer; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin-top: 10px;">
    </form>
</div>