Notebook

$wall_type = sanitize_title($atts[‘type’]); // e.g., public, university, news, art

ob_start();

// Query notes for this wall type
$args = array(
    ‘post_type’ => ‘note_wall_note’,
    ‘posts_per_page’ => 10, // Paginate or load more via JS
    ‘tax_query’ => array(
        array(
            ‘taxonomy’ => ‘note_wall_type’,
            ‘field’ => ‘slug’,
            ‘terms’ => $wall_type,
        ),
    ),
);

$notes = new WP_Query($args);

// Radically different entry screen: Custom UI with calendar-like note entry
?>
<div class=”note-walls-container”>
    <h2><?php echo ucfirst($wall_type); ?> Note Wall</h2>
   
    <!– Note Entry Form (Notebook/Note It/Daily Note) –>
    <form id=”note-walls-form” method=”post” action=””>
        <input type=”hidden” name=”note_wall_type” value=”<?php echo esc_attr($wall_type); ?>”>
        <label for=”note_title”>Note Title (Notice/Note to History):</label>
        <input type=”text” id=”note_title” name=”note_title” required>
       
        <label for=”note_content”>Note Content:</label>
        <textarea id=”note_content” name=”note_content” required></textarea>
       
        <!– Calendar-like UI (Google Takvim Gibi, but radically different) –>
        <label for=”note_date”>Note Date (Daily Note Calendar):</label>
        <input type=”date” id=”note_date” name=”note_date”>
       
        <!– Location/KYC/Social Integrations (placeholders) –>
        <label for=”note_location”>Location:</label>
        <input type=”text” id=”note_location” name=”note_location”>
       
        <label for=”note_kyc”>KYC Verified:</label>
        <input type=”checkbox” id=”note_kyc” name=”note_kyc”>
       
        <button type=”submit”>Submit Note</button>
    </form>
   
    <!– Display Notes –>
    <div class=”note-walls-list”>
        <?php if ($notes->have_posts()) : while ($notes->have_posts()) : $notes->the_post(); ?>
            <div class=”note-item”>
                <h3><?php the_title(); ?></h3>
                <div><?php the_content(); ?></div>
                <p>Location: <?php echo get_post_meta(get_the_ID(), ‘_note_location’, true); ?></p>
                <p>Institution: <?php echo get_post_meta(get_the_ID(), ‘_note_institution_tag’, true); ?></p>
            </div>
        <?php endwhile; endif; ?>
    </div>
</div>
<?php

wp_reset_postdata();
return ob_get_clean();

Unknown's avatar

Author: pixelencia

MEHMETADANİR81@GMAİL.COM / 05524026685/DİYARBAKIR/YENİŞEHİR/TURKEY/TC/TR/TRY/TL