Suppose you want to open the modal to the create gallery section:
var options = {
frame: 'post',
state: 'gallery',
title: wp.media.view.l10n.createGalleryTitle,
multiple: true
};
var frame = wp.media.editor.open(null,options)
If you want something else, I suggest you search through the core js source to change the Library ID as appropriate for the section you need.
Related Posts:
- Custom “Uploads” Dir: “Edit Image” in Media Library broken
- Restrict file types in the uploader of a wp.media frame
- Only displaying zip files with wp media
- Insert HTML markup to page content from the Media Frame modal
- Trigger refresh for new media manager in 3.5
- Javascript WP Object Documentation?
- What type of template are WP media-modal’s templates?
- Modify Custom Field in Media Library using JavaScript
- Filter medias from the Media Uploader (wp.media) modal with a post meta
- What is “open()” in MediaUpload?
- How to retrieve a value from an input field in a media view template
- Uppload image from another source wp.media
- Search media with javascript
- Media library not working with wp_editor() on the front end
- WordPress Media Library: Custom tab content displayed in “Media Library” tab
- Manually mark imported photo as selected in media library
- Modal working only on home page
- Is there a media_upload_tabs-similar filter to add tabs to the simple/featured image picker?
- Update media library attachments
- How to locate the js code and php code for certain function?
- How to validate image with specific height and width selection in media selector
- Custom Media Meta fields to alter the generated image HTML that is inserted into a post for my animated GIF image player?
- Is there any halfway decent documentation on the wp.media JS class?
- add_attachment hook not firing on certain devices
- How can I generate a rainbow circle using HTML5 canvas?
- What’s the difference between “{}” and “[]” while declaring a JavaScript array?
- What does “javascript:void(0)” mean?
- For-each over an array in JavaScript
- How to delete a cookie?
- What is TypeScript and why would I use it in place of JavaScript? [closed]
- How do you use the ? : (conditional) operator in JavaScript?
- Which equals operator (== vs ===) should be used in JavaScript comparisons?
- are there dictionaries in javascript like python?
- How to do associative array/hashing in JavaScript
- How to make a discord bot create an invite for every server it joins?
- ES6 Map in Typescript
- addEventListener vs onclick
- “Uncaught SyntaxError: Cannot use import statement outside a module” when importing ECMAScript 6
- How do I check if an array includes a value in JavaScript?
- JavaScript document.getElementById().value logs empty value
- How can I look at/edit what’s being sent to post.php when I hit the publish/update button?
- Why isn’t my SVG path rotating on scroll on iPhones?
- Access jQuery tabs from primary menu while adding/removing class on tab container elements (accessing diff. tabs/tab content via primary menu items)
- Working with a non-React external library in a custom block
- Using a form to pass GET parameters and create an array of posts accordingly
- Create Youtube embed block with createBlock
- How can I access custom data fetched from posts in a javascript script?
- Processing javascript on wordpress
- How to add a css class to postTitleWrapper in Gutenberg?
- Masonry gallery block is working in the block editor but not the template editor
- How to change the selected Template using javascript?
- How to import the imagesLoaded and Masonry libs that come with WP in a Gutenberg block?
- How do I expose the current logged in users name/etc to javascript?
- Is there an existing method to store a large set of states (900+ flags/numbers) for a single form page that it can persist for several days?
- Simplifying ‘Add Media’ Modal in front-end Content Editor
- Escaping inline JS correctly
- Why is my JS not working on initial load?
- Additional CSS classes not being added in Gutenberg editor
- allow multi carousel in same page
- How do I filter/modify the updated content on save using javascript?
- Need help understanding Minimize main-thread work
- TypeError when editing new page or post
- How to show custom fields in modal in category page
- config @wordpress/scripts with webpack and postCSS features
- Jest Unit tests for High order component containing Block Editor
- Add div on query loop page change
- Utilizing Node.js for Server-Side Rendering for API Services in WordPress blogposts
- Embedded data and the _fields parameter in getEntityRecords
- Script tags stripped when using presto video player in WP Courses single lesson page
- Does wp i18n CLI has a prototype of “update-json” file?
- Include Block Variation Within InnerBlocks
- I need to optimize a website and I want it to import the js libraries only when I need themL
- REST API not returning all tags – is there a way to return all tags even ones that are not part of published posts?
- Force-update the meta variable first set using `var [ meta, setMeta = useEntityProp( ‘postType’, postType, ‘meta’ );`
- What’s the best way using vanilla js to force confirmation on publish button?
- How to execute some javascript code in the editor when a block pattern is added?
- How to build BOTH non-block components and blocks present in the /src directory using @wordpress/scripts
- How to add an additional dependency to a block index.asset.php file
- Why is the Gutenberg editor not recognizing my updates?
- How to use Javascript to get data from a WordPress form
- How to transform a shortcode into a block
- Metabox conditionals depending on post format and template in Gutenberg
- How to re-render Gutenberg component when object instance is available
- useSelect() plus resolver result is serving cached data incorrectly
- enqueue_custom_scripts isn’t working
- How to access current discussion settings in gutenberg via JS?
- slider i want move 4 images every button click
- htaccess file prevents js scripts to run
- Gutenberg DatePicker component with time set to zero
- Javascript functions not running
- How to add new ACF repeater row after removing all rows using jQuery/Javascript
- Why Is wp.editor Not Adding the ”Add Media” Button When I Initialize It?
- How to render HTML content using the Interactivity API?
- Extend WordPress Gutenberg core/navigation-link
- How to auto rename JS files to prevent browser cache issues
- How to get selected category objects in the block editor?
- Why does website not scroll to top of container when phone is rotated?
- Pass global variable data to localize_script
- How to render initial posts on page load in a Gutenberg block using the Interactivity API?
- Is possible to open directly the core WP image editor on a modal?