50 Time Saving Code Snippets For Wordpress - Ahref Magazine. With each passing day, WordPress attracts to its realm new developers due to its mere simplicity and ease of customizing.
Snippets is a few lines of code through which one can design the way in which WordPress manifests itself, and since this can lead to a variety of outcomes, I’ve decided to take the time to present an article depicting the most useful codes. Some will be directly incorporated in template files, while others will be implemented in functions.php . Please remember to always do a complete back-up of your existing files in order to prevent unpleasant events. Add Breadcrumb Links to your Blog's SERP Snippet - A Quick Guide - Wow Internet Blog. Rich snippets within the search results can help to increase click-through rates and also make users aware of other content from your website.
We have heard loads over the past year or so about Google+ authorship within your search engine snippet, but one extra feature that I rarely hear mentioned is the use of breadcrumb navigation links. In the image above you can see an article that I recently wrote appear in the SERPs. I have highlighted the breadcrumb link that goes to the Technical SEO category section of the Wow Internet blog. This can be really handy toward getting more of your content in front of users and also makes for a better user experience in general. WP-Mix.
Create One Page On Your Website With All Your Social Media Streams. In the years I’ve been working with WordPress and Social Media, I’ve seen applications come and go for managing all your Social Media streams from a single dashboard.
Some of these have been pretty decent applications, but I’ve not seen too many of them survive. But, so far, I’ve not seen a system that curates all your Social Media streams into a single application for the world to see. Also, I’ve not seen anything that will bring this into your WordPress website in a presentable manner. Until RebelMouse What Is RebelMouse In the words of the developers themselves: RebelMouse is your social front page; connect all of your social networks to create a beautiful, dynamic site in seconds. Basically, the RebelMouse website allows you to pull your Facebook, Twitter, FlickR, Instagram, Google+, Tumblr, Pinterest, and any other RSS feed that you’d like to add. Featured Plugin - WordPress Facebook Plugin Find out more. Display Blog Posts on any Page (with navigation) By default, your latest WordPress posts are displayed on the home page, with older posts available via post navigation on /page/2/, /page/3/, and so on.
In this DigWP post, we’ll explain how to display your blog posts on any static page using a custom WP_Query loop that works beautifully with post navigation. For example, if you’re displaying a static page for your front page (as specified in the Reading Settings), you may want to display your blog posts separately, perhaps on a custom “blog” page. That’s what I ended up doing for the xy.css blog while using a static (post-less) home page. It’s nice because post-navigation works intuitively, like so: WordPress Custom Fields 101: Tips, Tricks, and Hacks. Using WP_Query in WordPress. If you’ve been around WordPress for a while, you’ll know how difficult it used to be to create lists of posts based on complex criteria while also conforming to WordPress’ standards.
Over the course of a few years, the platform has come a long way. By using the power of the WP_Query class, we can lists posts in any way we want. What Is WP_Query? Link The WP_Query class is one of the most important parts of the WordPress codebase. The other role of WP_Query is to enable us to perform complex database queries in a safe, simple and modular manner. Safety Link Throughout our interactions with this object, we are supplying parameters and using functions to reach our goal. Simplicity Link The object abstracts much of the query complexity away so that we don’t have to muck about with the specifics of our database. Modularity Link My favorite of all is modularity. Getting Started Link The “Regular” WordPress Loop Link Let’s look at a regular loop first, and then create the same loop using WP_Query. <? Take Control of Your Social Snippets. Social signals are becoming increasingly important in the world of SEO.
Facebook shares, Tweets and Google +1s have reached such volume that they have potential to be a great measure of content quality. This is why search engines have started to consider these signals when they rank web pages. Social signals are still not as important as other ranking factors such as a site’s link profile and content, but they will undoubtedly be an essential ranking factor in the future. How to Remove Menus From the WordPress Dashboard. The WordPress codex is full of fun little things that you can experiment with.
Have you ever wanted to remove a menu page from the WordPress dashboard? Perhaps you’re building a site for a client who gets confused by the settings menu. Blow the dust off of your handy codex and check out the function references for removing menu pages. Stop Loading Stylesheets And Javascript In Wordpress. In a previous post I wrote about how you can add stylesheets and Javascript files to WordPress correctly by using the wp_enqueue_style() function.
By using this function you can make sure that you are not adding the same stylesheet twice, this also allows you to prioritise the order of adding the style sheets. In this article we are going to look at the opposite of this function the wp_dequeue_style() function. As you can guess this function will remove the stylesheets from the enqueue. There is also an opposite function for adding Javascript files to the page with wp_deregister_script() function. Remove Stylesheets That Has Been Enqueued Wordpress will create a queue of stylesheets to load and will import these when it runs the wp_head function. You can open the plugin and change the code to remove the line where it adds the stylesheet.
Add A CSS Class to WordPress Insert/Edit Link Dropdown. Showing menu items to logged in users only. 25+ Extremely Useful Tricks for the WordPress Functions File.