Preview theme in WordPress

Preview theme in WordPress In the latest version of WordPress, it gives you the opportunity to view a preview of what your site would look like using a different theme. You basically just click on the theme, it takes over the screen and you have a chance to activate or close it (and return to the previous screen, which is grayed out in the background). I have seen a similar technique used on a number of websites recently for display images as well. I'm wondering what technology/code they use to do this? It's open source - use the source, Luke. Look in wp-admin/js/theme-preview.js preview_theme() Start preview theme output buffer. Description Will only perform task if the user has permissions and template and preview query variables exist. Source function preview_theme() { _deprecated_function( __FUNCTION__, '4.3.0' ); } The Customizer JavaScript API In WordPress 4.1, newly-expanded JavaScript APIs were introduced for all customizer objects. The entire Ja...

Seeking code highlighter recommendation for WordPress

Seeking code highlighter recommendation for WordPress Can anybody recommend a reliable and decently documented code highlighter for WordPress 2.6.1? I have tried Code Snippet by Roman Roan and Developer Formatter by Gilberto Saraiva. But they don't seem to work as described in the documentation and are mangling the code snippets instead of prettifying them. Re-opened...OP is asking about a 'code highlighter' widget...something programmers use on their blogs...seems programming related to me. 5 Answers I use WP-Syntax and it's worked very well for me. It's supported every language I've thrown at it so far, and the colors can be customized for a particular theme (though the defaults look just fine too) Initially, I also used this plugin. Its simplicity and the fact that it is based on a well-established library (GeSHi) are the main arguments. I noticed, however, that it does not make best use of WordPress and GeSHi, and that it was not actively developed an...

WordPress MediaWiki integration

WordPress MediaWiki integration On the other end of the spectrum, I would be happy if I could install a wiki and share the login credentials between WordPress and the wiki. I hacked MediaWiki a while ago to share logins with another site (in ASP Classic) via session cookies, and it was a pain to do and even worse to maintain. Ideally, I would like to find a plug-in or someone who knows a more elegant solution. 6 Answers The tutorial WordPress, bbPress & MediaWiki should get you on the right track to integrating MediaWiki into your WordPress install. It's certainly going to be a lot easier than hacking WordPress to have wiki features, especially with the sort of granular permissions you're describing. The link in this answer is broken. After a bit of googling I'm pretty sure that this is the page that the link was supposed to point Updated link Both MediaWiki and Wordpress support OpenID Though, I think for automatic logins (after you log in to one, you automa...

How do I list all Entries with a certain tag in Wordpress? | widget

How do I list all Entries with a certain tag in Wordpress? I may just be missing this functionality, but does anyone know if there is a widget available: I need to list the subject for all the entries that are associated with a given tag. For example: I have 5 articles tagged with "Tutorial", I'd like to see a list as follows: Tutorial 1: Installing the app Tutorial 2: Customizing Tutorial 3: Advanced edits Tutorial 4: User managment Does functionality like this exists in wordpress allready? 3 Answers If you are comfortable with hacking WP you can try adding to your sidebar with wp_list_pages. Or there are plug-ins like Simple-Tags that help you manage your tags. The nice thing about WordPress is there are lots of plug-ins available that can add functionality that the base app does not ahve, a quick search for plug-ins for tabs returned quite a list, sure it's a lot to dig through but that also helps you see what is available. So i found an article ...

How to select posts with specific tags, categories in WordPress | SQL

How to select posts with specific tags/categories in WordPress This is a very specific question regarding MySQL as implemented in WordPress . I'm trying to develop a plugin that will show (select) posts that have specific 'tags' and belong to specific 'categories' (both multiple) I was told it's impossible because of the way categories and tags are stored: wp_posts contains a list of posts, each post have an "ID" wp_terms contains a list of terms (both categories and tags). Each term has a TERM_ID wp_term_taxonomy has a list of terms with their TERM_IDs and has a Taxonomy definition for each one of those (either a Category or a Tag) wp_term_relationships has associations between terms and posts How can I join the tables to get all posts with tags "Nuclear" and "Deals" that also belong to the category "Category1"? 6 Answers I misunderstood you. I thought you wanted Nuclear or Deals. The below should giv...

How do I display database query statistics on Wordpress site? | MySQL

How do I display database query statistics on Wordpress site? I've noticed that a few Wordpress blogs have query statistics present in their footer that simply state the number of queries and the total time required to process them for the particular page, reading something like: 23 queries. 0.448 seconds. I was wondering how this is accomplished. Is it through the use of a particular Wordpress plug-in or perhaps from using some particular php function in the page's code? 3 Answers Try adding this to the bottom of the footer in your template: <?php echo $wpdb->num_queries; ?> <?php _e('queries'); ?>. <?php timer_stop(1); ?> <?php _e('seconds'); ?> * or wp-admin/admin-footer.php if you want it to show in the backend admin panel. To explain pix0r's code: $wpdb->num_queries is the number of database queries. _e is for localization timer_stop() returns the amount of time taken to render the page ...

WordPress 5.6 Beta 1 | Improvements in the Editor and Core

WordPress 5.6 Beta 1 WordPress 5.6 Beta 1 is now available for testing! This software is still in development, so we recommend that you run this version on a test site. You can test the WordPress 5.6 beta in two ways: Try the WordPress Beta Tester plugin (choose the “bleeding edge nightlies” option). Or download the beta (zip). The current target for final release is December 8, 2020. This is just seven weeks away, so your help is needed to ensure this release is tested properly. Improvements in the Editor WordPress 5.6 includes seven Gutenberg plugin releases. Here are a few highlighted enhancements: Improved support for video positioning in cover blocks. Enhancements to Block Patterns including translatable strings. Character counts in the information panel, improved keyboard navigation, and other adjustments to help users find their way better. Improved UI for drag and drop functionality, as well as block movers. To see all of the features for each rele...

Visual Studio Code September 2020 (version 1.50) (part 3)

Visual Studio Code September 2020 (version 1.50) (part 3) Editor Trigger IntelliSense For years, Ctrl+Space has been the predominant keybinding to trigger IntelliSense. However, on macOS and Windows, the same keybinding is used to toggle between keyboard layouts. To minimize confusion, we added another keybinding to trigger IntelliSense: on Windows and Linux it's Ctrl+I , and on macOS it's Cmd+I . Debugging Debug hover improvements Language hover now available while debugging While debugging, the debug hover takes precedence over the language hover, making it impossible to see the language hover. Starting with this release, you can switch from the debug hover back to the language hover by holding down the Alt modifier key. As long as Alt is pressed, the language hover is shown instead of the debug hover. This makes it much easier to read Javadoc while debugging. Auto sizing debug hover In order to minimize the need for scrolling, the debug hov...