Support » Algemene WordPress vragen » private-test-forum

  • stylesheet.css

    @media screen and (min-width: 720px) {
    .balk {
    display: none;
    }
    }

    ———————–
    functions.php

    <?php
    // This line runes our function when
    // WordPress hits the wp_enqueue_script
    // milestone of loading
    add_action(
    ‘wp_enqueue_scripts’,
    ‘wpshout_enqueue_styles’
    );
    // This function runs because of the add_action
    function wpshout_enqueue_styles() {
    // Location of our stylesheet
    // For me, this shared a plugin
    // with this code
    $file_url = plugins_url(
    ‘stylesheet.css’, // File name
    __FILE__ // Magic PHP constant that means
    // the “current file”
    );
    // Actually load up the stylesheet
    wp_enqueue_style(
    ‘mow_stylesheet’, // A “name” for our file
    $file_url // Location variable
    );
    }

    add_action(‘wp_head’, ‘oefen_plugin’);

    function oefen_plugin(){
    $tekst01 = ‘<input class=”balk type=”text” name=”setting_bericht_display” id=”setting_bericht_display”
    value=”‘. get_option(‘setting_bericht_display’) . ‘”>’;
    $tekst02 = ‘<input class=”balk” type=”text” name=”setting_bericht_display” id=”setting_bericht_display”
    value=”‘. get_option(‘setting_bericht_display’) . ‘”>’;

    if(is_front_page()){
    echo “<header><label style=’position: fixed; z-index: 999′>$tekst01</label></header>”;
    }else{
    echo “<header><label style=’position: fixed; z-index: 999′>$tekst02</label></header>”;
    }

    };

    ———————————————-
    settings.php

    <?php
    /**
    * @package Mohammed
    */
    /*
    Plugin Name: Mowmedia’s Text Display
    Plugin URI: https://mowmedia.wpengine.com/
    Description: Adds text to header
    Version: 1.0
    Author: Mohammed el Hamdi
    Author URI: https://sowmedia.nl
    License: G
    Text Domain: Sowmedia
    */
    include ‘functions.php’;

    add_action(‘admin_init’, function(){

    add_settings_field(
    ‘setting_bericht’, //id
    ‘vul hier je tekst in’, //title
    ‘setting_bericht_display’,
    ‘general’
    );

    //opslaan
    register_setting(
    ‘general’,
    ‘setting_bericht_display’
    );

    function setting_bericht_display(){
    echo ‘<input class=”balk” type=”text” name=”setting_bericht_display” id=”setting_bericht_display”
    value=”‘. get_option(‘setting_bericht_display’) . ‘”>’;
    }

    });

2 reacties aan het bekijken - 1 tot 2 (van in totaal 2)
  • stylesheet.css
    ——————————

    @media screen and (min-width: 720px) {
    #setting_bericht_display {
    display: none;
    }
    }

    .tekst01{
    position: fixed;
    z-index: 999;
    }

    .tekst02{
    position: fixed;
    z-index: 999;
    }

    Moderator Jeroen Rotty

    (@jeroenrotty)

    Support Moderator

    Hallo,

    Wat is de bedoeling precies van dit topic? Ik zie namelijk geen vraag.

    Groet,
    Jeroen

2 reacties aan het bekijken - 1 tot 2 (van in totaal 2)
  • Het onderwerp ‘private-test-forum’ is gesloten voor nieuwe reacties.