Create a Page template selector page

You could develop your own metabox for the page (with custom styling, probably) that allows selection of the template. I don’t know that generating screenshots is feasible, but you could definitely have it pull from some sort of associated file (eg: template name is template-name.php, screenshot is template-name.png). With the replacement selection method generated, you … Read more

toggle Multiple Loop with tittle

Based on the comments, you should be able to do something like the following: Create a custom taxonomy to hold your Temporadora items in (e.g. Temporadora 1) Create a custom post type to hold your episodes Create a relationship between the two From there, it should be a matter of doing something like the following: … Read more

Dynamic Control in customiser

Figured it out, you have to create a new class extending WP_Customize_Control: // Add Layout setting $wp_customize->add_setting( // ID ‘sidebar_left_selection’, // Arguments array array( ‘default’ => ‘none’, ‘sanitize_callback’ => ‘webcodexcustomizer_sanitize_sidebar_selection’ ) ); class customize_sidebar_selection extends WP_Customize_Control { public function render_content() { global $wp_registered_sidebars; // The actual fields for data entry $output = “<span>” . esc_html( … Read more

Show custom field value as a link

<?php // Display Custom Field Value echo “<ul>”; echo “<li>License Type: “.get_post_meta( $post->ID, ‘License Type’, true ).”</li>”; echo ‘<li><a href=”‘ . get_post_meta( $post->ID, ‘Download Comp’, true ) . ‘”>Download Comp</a></li>’; echo “</ul>”; ?>

Let author add field to metabox by pressing a button

I packed everything together. Consider using wp_enqueue_script() to use the script. With this code, you will save all URLs as an array. See how I use get_post_meta() to retrieve the saved URLs. function save_custom_metabox($post_id){ if(!isset($_POST[‘source_post_metabox_nonce’])) : return; endif; if(!wp_verify_nonce( $_POST[‘source_post_metabox_nonce’], ‘source_post_metabox’)) : return; endif; if(defined(‘DOING_AUTOSAVE’) && DOING_AUTOSAVE) : return; endif; if(!current_user_can(‘edit_post’, $post_id)) return; if ( … Read more