Forum Replies Created
-
AuthorPosts
-
SteveKeymasterYou can do this for the entire meta box. Use the
IDcomment block parameter:
https://piklist.github.io/docs/comment-block-parameters/#idid: 20, 32, 49
SteveKeymasterPiklist doesn’t have a function to do that.
However, when you save a page that has Piklist fields, even empty fields get saved (if you choose not to make a choice, Piklist considers that a choice). You can retrieve all custom fields using the WordPress function
get_post_custom: https://developer.wordpress.org/reference/functions/get_post_custom/
SteveKeymaster@pozzerfield– This is definitely strange, but I don’t think this is a Piklist issue. Try switching themes and see if it works as expected.
SteveKeymasterAh… Sorry, Piklist does not have a filter for that.
SteveKeymasterIt’s very difficult to do this capabilities. Maybe use a plugin like this: https://wordpress.org/plugins/admin-menu-editor/
Or manipulate the
$menuand$submenuglobals.
SteveKeymasterCan you post here what you are seeing?
SteveKeymaster@thor– since your saving the shortcode data to the database, Piklist needs a way to pull it. You can use that shortcode multiple times in one post so the only unique ID to use is
meta_id.Let us know how this works for you. It’s one of the coolest features of Piklist.
I updated the docs page as well: https://piklist.github.io/docs/tutorials/shortcodes/save-shortcode-data-to-database/
SteveKeymasterHonestly, I’m not sure if that is a Piklist issue or TinyMCE. You may have to work around it
Also, instead of using the full tinymce-advanced plugin, you can:
1) copy this file into your theme/plugin: https://plugins.trac.wordpress.org/browser/tinymce-advanced/tags/5.5.1/mce/anchor/plugin.js2) Include this code in your theme/plugin:
function my_custom_plugins( $plugins ) { $plugins['anchor'] = '[path to]/tinymce-advanced/mce/anchor/plugin.js'; return $plugins; } add_filter( 'mce_external_plugins', 'my_custom_plugins' );And the anchor button will work
SteveKeymasterYou can also try pulling out the anchor js from that plugin and including it in your plugin/theme so your not reliant on that plugin for this.
SteveKeymaster@thor– This one was fun to figure out.
It looks like
anchorwas removed from WordPress 6 years ago: https://core.trac.wordpress.org/ticket/28394#comment:2You would need to find the TinyMCE plugin and install it. Luckily, there is a plugin that already includes it. If you install and activate your
anchorbutton will appear: https://wordpress.org/plugins/tinymce-advanced/In my tests, that plugin also added a second toolbar. Passing this worked:
,'toolbar1' => 'bold,italic,underline,link,unlink,anchor' ,'toolbar2' => ''
SteveKeymasterNice job! Happy to help.
If you are happy with the plugin and the support, and you have the time, we’d appreciate if you could leave us a review on WordPress.org. It really helps the project: https://wordpress.org/support/plugin/piklist/reviews/
SteveKeymaster@guit4eva– To answer both your questions:
1) Pages are an “hierarchical” post type. You would set to true:
`
hierarchical => true2) I suggest you base your field off of this tutorial. It’s pulling menu items, but you can easily change to your post type: https://piklist.github.io/docs/tutorials/fields/display-menus-radio-checkbox-select-list/
Let me know if you still have questions.
SteveKeymaster@thor– are you getting that error on all pages or just some. If just some, please post the urls here.
SteveKeymasterThis has been fixed in v1.0.10… now available at wordpress.org.
-
AuthorPosts