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
The new WordPress default theme, Twenty Fifteen, looks great and provides a lot of flexibility, but one thing it lacks is the option to customize fonts. A free plugin called Typecase, by UpThemes, solves this problem by giving users easy access to over 650 different fonts.
Typecase uses the Google webfonts library, which has slowly increased in the past few years, making it a popular resource among theme developers.
Getting Started
Start by downloading and activating Typecase from the WordPress plugin directory. After it’s activated, look for the Typecase admin menu. While on the settings screen, scroll to the bottom and browse through the list of available fonts. You won’t be able to apply fonts through the Theme customizer unless you select a few font families.
After you select a few fonts, click the save button. Browse to the customizer via Appearance > Customize and select the Theme Fonts panel.
From here you’ll be able to assign fonts you selected in Typecase to various elements of the site such as, the sidebar, content, site title, site description, etc. Once you find a font that you like, click the Save and Publish button to see the changes on the live site.
Beyond The Customizer
If you’d like to assign a font to a specific CSS Selector, you can add one from the Typecase settings page. This enables you to customize fonts for any theme without writing code or modifying your theme in any way.
Add Typecase Support to Any Theme
Typecase has built-in support for every default theme since Twenty Ten. However, if you’d like to add support to a custom theme, you’ll need tofollow these directions as it involves adding a few lines of code.
If you’re using any of the default themes available for WordPress, Typecase is an easy way to expand the customization options available to you. With over 650 fonts to choose from, the hardest part of using it is deciding which ones to use.
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
Recent Comments