Skip Navigation

[Resolved] Clean edit post window custom template

This support ticket is created 5 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 5 years, 10 months ago.

Assisted by: Christian Cox.

Author
Posts
#1194713

I have tried the Edit post link method with content template for adding edit post links Views that list items. Works fine. But what if I wanted to open the edit form in a clean window without the regular theme layout? I have been experimenting with

<a href="/edit-post/?post=[wpv-post-id]" onclick="window.open('/edit-post/?post=[wpv-post-id]', 'edit', 'menubar=no, location=no, toolbar=no, scrollbars=yes, height=300'); return false;">Edit in window</a>

The edit-post page is with

[cred_form form="89223" post="[wpv-search-term param='post']"]

That works apart from there is no styling for editing custom taxonomies (the existing selected taxonomy terms are not displayed either) and no calendar icon for date/time fields.

Since I am using a totally stripped down template for the edit-post page like this below of course some toolset needed code is missing wright? Any easy way to add what Toolset related is needed for the taxonomy and date/time editing to work correctly like with the content template version.

(Just wish to see only what is needed when editing and not loading the whole layout so any other solution to do this is of course also of interest)

<?php

/*
Template Name: Empty Template
Template Post Type: my-custom-post-type
*/

?>

    <?php

    // Start the loop.

    // The post content will get inserted, as written, between the body tags.

    while ( have_posts() ) : the_post();

    ?>

        <?php the_content(); ?>


    <?php

    // End the loop.

    endwhile;

    ?>

#1195114

Hi there's no API for enqueueing individual component scripts for Toolset, so it's best to call get_header() to pull in all the required assets. If you don't want to show other header elements like the main navigation, you may have to create your own header template file with no other content: https://codex.wordpress.org/Function_Reference/get_header

Then in the PHP template file specific for this page, replace the standard get_header() with a call to the blank header.