Can you open a media frame to sellect an attachment to associate with another attachment you are editing on an existing media frame?

I figured this out. You CAN open another frame Here is my code: jQuery(document).ready(function ($) { var frame; frame = wp.media(); $(document).on(‘click’, ‘.compat-field-add_attachment input’, function (e) { get_attachment(frame); }); }); function get_attachment(frame) { // Create the media frame. frame = wp.media.frames.meta_image_frame = wp.media({ // Tell the modal to show only images. library: { type: ‘image’ … Read more

Hide or Show Read More Button by Content Area

This checks the number of characters and hide the button server-side in content.php: <?php $excerpt = get_the_excerpt(); $excerpt_length = strlen($excerpt); $excerpt_limit = 100; // Match the limit set in functions.php // only for debugging: var_dump($excerpt); var_dump($excerpt_length); ?> <div class=”news-main”> <?php the_excerpt(); ?> </div> <?php if ($excerpt_length >= $excerpt_limit) : ?> <div class=”news-read”> <a href=”<?php echo … Read more

WordPress custom post_status after 6.6 version

Can you post your js or try this? import { addFilter } from ‘@wordpress/hooks’; addFilter( ‘editor.PostStatus.statuses’, ‘sq/add-custom-post-status’, // custom filter name (statuses) => { return [ …statuses, // save old statuses { // add new status slug: ‘prepare’, label: ‘Prepare’, labelShort: ‘Prepare’, public: false, }, ]; } );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)