Maintaining a library of code snippets can save you time when coding similar tasks in the future. Although there are countless sites online where you can host code snippets, it’s more convenient to have them at your fingertips when writing a blog that includes code.
Plugin developer Justin Sternberg recently released Code Snippets CPT, a plugin that allows you to manage and display code snippets in WordPress. This unique use of custom post types stores code snippets as their own individual posts, which can be pulled into content via a handy shortcode.
The plugin uses Google Code Prettify to add syntax highlighting to your snippets. When creating a new snippet, you simply select the language from the dropdown at the top of the post editor. Write a description, add your snippet, and click publish.
Code Snippets CPT also includes custom taxonomies for classifying your snippets. You can add both snippet categories and snippet tags, which will then allow for some unique ways of organizing and displaying your library of snippets.
When you want to display a snippet within a post or page, click on the “Add Snippet” button in the visual or text editor to launch the shortcode finder. You can select whether or not you want to display line numbers for the snippet that you are embedding.
Sternberg’s site is running the plugin, if you want to view a few liveexamples of snippets in posts.
Code Snippets CPT allows you to create a searchable archive of code snippets on your own site, without having to host snippets with a third party service. The advantage of hosting your own snippets is that you can keep your code library centralized and back it up as part of your WordPress site.
Having code snippets stored as custom post types is a step up from simply using a syntax highlighter plugin, because it gives you the flexibility to sort and display snippets using their own snippet-specific taxonomies. If you want to get your code library organized in 2015, check out the Code Snippets CPT plugin on WordPress.org.
from :http://code.tutsplus.com/tutorials/creating-child-themes-for-your-wordpress-theme-framework–cms-21933
This Demo Content Brought to you by Momizat Team
this is tags and keywords : wordpress themes momizat Tutorial wordpress templates
WordPress 4.1 was released just yesterday, but core contributors are already planning and working towards 4.2. The Menu Customizer feature plugin is back in development and contributors are hoping to have it ready for inclusion in 4.2. Nick Halsey, who originally started the Menu Customizer work as part of his Google Summer of Code project, will be leading the effort to get the feature prepared for the upcoming release.
During the last release cycle, Halsey was focused on improving the Customizer API in core to add dynamic and contextual controls, sections, and panels. The Menu Customizer plugin has now been updated to be compatible with WordPress 4.1 and is ready to pick up development where it left off. As it’s no longer a GSoC project, Halsey is now actively looking for contributors.
Currently, the menu customizer is usable and offers the ability to assign menus to locations, edit existing menus/menu items, and add new menus.
Halsey outlined a roadmap for preparing the Menu Customizer for merge, which includes a number of PHP and Javascript development tasks, including, but not limited to, the following:
- Build-out the core API for adding Customizer sections and controls entirely with JavaScript, #30741 and its related tickets (PHP, JS)
- Drag and Drop menu item reordering needs to do sub-menus (code imported from nav-menus.php is commented out in menu-customizer.js currently) (JS)
- Fix problems with previewing updates to menu items, and with previewing newly-added menus once items are added (JS)
- Redo the add-menu-items “panel” to lazy-load its contents & utilize Backbone sub-views (PHP, JS)
He also hopes to improve the experience of using the customizer on mobile, followed by getting the menu customizer plugin to work on mobile. Halsey is also looking for contributors to assist on the design, code review, a backwards-compatibility audit, and inline documentation.
If you’re curious about how the Menu Customizer works, anyone is welcome to try the plugin and offer feedback. For the time being, it is compatible with WordPress 4.1 but may require 4.2-alpha down the road as it progresses.
Contributor interest is critical for the Menu Customizer to have a shot at inclusion in WordPress 4.2. If you can help in any way, jump in on theMake/WordPress Core post to volunteer.
from :http://code.tutsplus.com/tutorials/creating-child-themes-for-your-wordpress-theme-framework–cms-21933
This Demo Content Brought to you by Momizat Team
this is tags and keywords : wordpress themes momizat Tutorial wordpress templates
WordPress 4.1 Release Candidate is now available for download which includes the new default theme Twenty Fifteen, you can read about what else is new with it here. Or download it here. I love this new default theme, a huge step back in the right direction ( I thought Twenty Fourteen was awful ). A nice clean design, optimised nicely for mobile devices and good typography – this is how it should be done.
There was an interesting discussion on the WPTavern comments of this post, where Jeff asks what it would take for WordPress to lose it’s dominance. I found point 5 rather funny “A huge scandal takes place involving Automattic, the WordPress Foundation and those close to the project.” I just cant see WordPress being taken over for many years to come – it’s too far ahead at this point, sort of like the Facebook of CMS’s. Too many large companies rely on it to see it fail and I just don’t see anything at the momement that could even come close. I did a post recently about this, WordPress competitors, but none came close to what we have with WordPress. I think we’re all safe for a bit!
from :http://code.tutsplus.com/tutorials/creating-child-themes-for-your-wordpress-theme-framework–cms-21933
This Demo Content Brought to you by Momizat Team
this is tags and keywords : wordpress themes momizat Tutorial wordpress templates
Recent Comments