Tag: wordpress

How to add unique meta description tags in WordPress without plugins

When I checked my website for errors in the Google Search Console earlier this morning, I noticed a warning about duplicate meta descriptions on my WordPress website. I had 205 pages with duplicate tags and at first I didn’t think much of it, but I decided to find out the significance in terms of better SEO just in case. I was shocked to realise that having duplicate meta description tags throughout your WordPress blog is a bad idea and Google doesn’t like it one bit!

Google: Don’t duplicate meta description tags

Google’s Matt Cutts has officially stated in his video that it’s better to have no meta description tag than to have numerous duplicate meta description tags on all of your pages and categories. This is especially frustrating because by default most WordPress templates have only the one description tag displayed throughout the entire website. Check out this video with Matt explaining everything:

Unique meta description without plugins

It’s clear that Google doesn’t endorse the use of duplicate description tags and there are numerous plugins available that try to work around it (YOAST for example) and while I don’t personally have anything against these plugins, one might still consider avoiding them in order to gain better website loading speeds because it’s common knowledge that having too many plugins active on your WordPress site can actually slow down the loading speeds and make the end user experience that much more annoying.

Just a few lines of code

In your header.php file remove the default <meta name=“description” content=“Your description”/> and instead use the following code:

<?php if ( is_home() ) { ?>
<meta name="description" content="Your main and most important description shown on homepage"/>
<?php } ?>
<?php if ( is_single() OR is_page() ) { ?>
<meta name="description" content="<?php { setup_postdata($post); echo esc_attr(htmlentities(get_the_excerpt())); } ?>"/>
<?php } ?>

The above code uses conditional statements to check whether the currently displayed page is either a homepage, a single post or a single page and then uses “Your main and most important description shown on homepage” on your homepage and the default post excerpt in the description of posts and pages respectively.

In my experience you don’t really need to display the description tag anywhere else so I removed it from elsewhere. And in case you’re worried, Google is fairly good at coming up with descriptions for the rest of your page so your search results should still look very nice.

Double check just in case

This code works on my template, but you should still double check so after editing the header.php and replacing it with the original try refreshing your page (ctrl + F5) and then view the page source, especially the meta description tag, and see if it’s working. First try it on the homepage (main index) and then click on any posts or pages you may have and view the source on those pages also. If you see the post excerpt inside the description tag it means everything is working as it’s supposed to.

Share!

WordPress Portfolio Theme

By breaking up the skeleton of underscores I was able to craft this portfolio theme for WordPress

Screenshot of ynefs portfolio

Main features

Navigation menu is generated from categories and displays a category view

Cool sliding effect on the menu using a combination of transition and padding

As you scroll down the site title and description disappear along with the navigation menu

They reappear when you start scrolling up

Custom header gets added to Artwork and Music categories by manipulating directly CSS style with jQuery

Footer has three distinct columns

Picture links in gallery and footer icons have a tint overlay effect on hover

 

Share!

Goodbye GreyRound, welcome Messages From Outer Space

GreyRound was the first WordPress theme that I built from scratch. It took me a while, but I was finally able to publish it on the official WordPress theme directory which meant a lot to me considering it was my first theme. At the time of writing this post, the theme has already been downloaded more than 3,000 times. I’m not sure if it’s good or not, because I haven’t compared it to other themes, but for me the number feels pretty big. A quick Google search also shows that people are indeed using GreyRound for their websites and it just feels great!

I’m the type who can’t sit still for very long so only about a month later I already felt the urge of building another theme for my site. I wanted it to have Facebook like loading of content (infinite scroll with JetPack) and I knew it had to have something to do with outer space… and when you combine infinite scroll with a space theme, the title just kind of makes sense ;)

Messages From Outer Space took a little over one week to build because I used the underscores skeleton theme as a base (it’s an epic base and I really recommend it!). This way I only had to change a few things in the theme structure and had more time to apply different styles to it. The layout and the main menu are built to make way for a bigger website with more content. As ynef.net is slowly growing bigger and getting more categories, the menu had to be designed differently from GreyRound’s circles.

I also made room for sponsor advertisements between posts (plsdon’t hate) and applied responsive styling so it will look fine on almost every mobile device. If you are on a mobile device and have JavaScript enabled you can use the websites logo to toggle the main menu.

As of right now Messages From Outer Space theme is not available to the public because I felt like my personal website has to be slightly different from the rest that’s out there, but I might change my mind about that in the future.

Share!

GreyRound theme is now available to download for free from WordPress

It’s finally accepted

I initially submitted the GreyRound theme for WordPress to review more than 4 months ago, but because this was my first ever attempt at creating a new WordPress theme completely from scratch, there were quite a few things I missed and I was asked to change those.

 

After hours of reading the WordPress Codex I was ready and submitted the 2’nd version for WordPress to review. Weeks passed… three weeks to be exact. I was very disappointed to see that there had been no activity around my theme any more. It later turned out that the guy who was supposed to review it for me had abandoned the thread- I guess he had other things to do…

 

So my theme got assigned to a new moderator called Poena after about two months. This is where things finally started moving somewhere. Many thanks to Poena for being a very supportive reviewer! She helped me through all the things I forgot to implement and when I didn’t know how to do something she first made sure I learned about it on my own and then proceeded to add her own ideas. I think it’s great that the reviewers at WordPress actually care about you getting better in your skills and help you learn like that. So after a total of nine revisions the GreyRound theme was accepted.

 

Download GreyRound 0.0.9

To download my first WordPress theme, GreyRound, simply visit the link below and don’t forget to rate!

https://wordpress.org/themes/greyround/

Share!