Keep pasted pre formatted code as it is -with tabs- in visual editor

I need a manual code to my functions php to extend the visual editor from removing tabs when pasting code blocks. I tried this code, found at this site, but it does not work as I want. If I got: add_filter(‘tiny_mce_before_init’, ‘tiny_mce_before_init’); function tiny_mce_before_init($init) { $init[‘setup’] = “function(ed) { ed.onBeforeSetContent.add(function(ed, o) { if ( o.content.indexOf(‘<pre’) … Read more

Create Post tabs in single-{content-type}.php with Custom Field values

My requirement is exactly similar to Tabbed Post. I have Advanced Custom Fields (ACF) plugin to store data. So pulling up the requirement from the wordpress support thread: Movie Summary | Synopsis | Screens | Trailer | Comments | Add your Review Movie summary is the_content(), Synopsis is the_excerpt(), Screens and Trailers are custom field … Read more

Generate a tabbed submenu — from taxonomy term or submenu item — with sample content

I’m looking to generate a tabbed submenu from taxonomy term or submenu item and include sample content (three items per term/submenuu item). The styling I can do, the problem is the html generation. I see this style called tabbed submenus, fat menus, or mega menus. A good sample is the tabbed submenus at Vice.com. The … Read more

custom tabs in media uploader

I’ve managed to add a custom tab to the media uploader, but for some reason it doesn’t come with the same layout – it doesn’t load the media-uploader-header that contain all the other tabs: add_filter(‘media_upload_tabs’, ‘my_media_upload_tabs_filter’); function my_media_upload_tabs_filter($tabs) { unset($tabs[“type_url”]); unset($tabs[‘library’]); $newtab = array(‘ell_insert_gmap_tab’ => __(‘Google Map’,’insertgmap’)); return array_merge($tabs,$newtab); } add_action(‘media_upload_ell_insert_gmap_tab’, ‘media_upload_ell_gmap_tab’); function media_upload_ell_gmap_tab() { … Read more