Friday, November 7, 2014

Best Practices for using Categories and Tags to Organize A Site

I recently signed up for the Elegant Themes newsletter and I've really enjoyed reading some of their blog posts.

I just finished this one about the way to properly use categories and tags to set up the structure of your wordpress website. When I first started working on wordpress, I had a site built mostly in pages that I started working on. I've learned later on all of the things that you can do with posts via the use of categories and tags to organize and display content.

Wordpress is a truly amazing content management system, and learning how to properly use Categories and Tags can really help you get the most out of it.

Saturday, October 25, 2014

Responsive Div to Display Content with a Responsive Background Image

So, I wanted to be able to display a responsive image that dynamically displays content depending on the winner of a contest. I have an image called 'Winner of the Week' where a post is displayed congratulating the Winner of a Weekly contest.

I'm using the shortcodes ultimate plugin to display the most recent post tagged "Winner of the Week" within a div that is styled to be centered with a cool background image. It presented a couple of coding challenges that I wanted to share solutions for.

First, I needed the background image to be responsive (as the div resized the background image was not resizing and so not all of the image was displaying). I found a solution to that on stack overflow here. The image below is the CSS code I needed:


Second, I needed the content inside the post to remain within the background image. For this I needed the div containing both the post and the background image to maintain a constant aspect ratio. I was able to find a solution for this on stack overflow as well. This one involves using two divs (one position: relative; and one position: absolute;) with a combination of width and padding-bottom (as a percentage) to create a fixed aspect ratio. The thread has more details here and there's also a link to a demo so you can watch it in action here.


If you'd like to see how I got this all to come together, you can visit the fiddle where I've shared the code here. To see my code in action, click on the photo below:


Wednesday, October 22, 2014

Custom Post Types UI and Advanced Custom Fields Plugins

https://wordpress.org/support/view/plugin-reviews/custom-post-type-ui
Plugin for creating custom post types with a simple User Interface

https://wordpress.org/plugins/advanced-custom-fields
Plugin for creating advanced custom fields

part 1 of the series on custom post types discusses how to use the custom post types plugin to create custom posts with custom fields. This video covers the options that you have for including in your custom post

Among many options, the Custom Post Type UI plugin can create post types that support the following:

  • Title
  • Editor
  • Excerpt
  • Trackbacks
  • Custom Fields
  • Comments
  • Revisions
  • Featured Image
  • Author
  • Page Attributes
  • Post Formats

Once you create the post type, it will appear in the wp admin menu bar on the left side of your screen! After you create the post type, you can use this plugin to create a custom taxonomy that is either hierarchical (for category-like behavior) or not hierarchical (for tag-like behavior).

Once you have created the Custom Post Type, you can use the Advanced Custom Fields Plugin to add custom fields to your custom post type. You do this by Adding a new field group. This plugin is extremely powerful and an excellent counterpart to the Custom Post Types UI plugin.

The field types you can create with this plugin are:

  • Text (type text, api returns text)
  • Text Area (type text, api returns text with
    tags)
  • Number (type number, api returns integer)
  • Email (type email, api returns text)
  • Password (type password, api returns text)
  • WYSIWYG (a wordpress wysiwyg editor, api returns html)
  • Image (upload an image, api returns the url)
  • File (upload a file, api returns the url)
  • Select (drop down list of choices, api returns chosen item)
  • Checkbox (tickbox list of choices, api returns array of choices)
  • Radio Buttons ( radio button list of choices, api returns chosen item)
  • True / False (tick box with message, api returns true or false)
  • Page Link (select 1 or more page, post or custom post types, api returns the selected url)
  • Post Object (select 1 or more page, post or custom post types, api returns the selected post objects)
  • Relationship (search, select and order post objects with a tidy interface, api returns the selected post objects)
  • Taxonomy (select taxonomy terms with options to load, display and save, api returns the selected term objects)
  • User (select 1 or more WP users, api returns the selected user objects)
  • Google Maps (interactive map, api returns lat,lng,address data)
  • Date Picker (jquery date picker, options for format, api returns string)
  • Color Picker (WP color swatch picker)
  • Tab (Group fields into tabs)
  • Message (Render custom messages into the fields)
  • Repeater (ability to create repeatable blocks of fields!)
  • Flexible Content (ability to create flexible blocks of fields!)
  • Gallery (Add, edit and order multiple images in 1 simple field)
  • Custom (Create your own field type!)

part 2 of the series on custom post types

part 3 of the series on custom post types

Tuesday, September 30, 2014

Shortcodes Ultimate Plugin

The Shortcodes Ultimate is one of the most powerful plugins for Wordpress that I've ever used. This plugin makes so many things that I need to do frequently so much easier to do that I had to write a post about it. It's staggering to even think about how many different things you can do with this plugin. With 40+ shortcodes to choose from, it offers easier access to a lot of elements that are well coded and responsive.

One of the things I absolutely love about this plugin is that, in addition to all of the customization it offers, the plugin author, Vladimir Anokhin, has included ample opportunities to add your own CSS classes to elements created by the shortcodes ultimate plugin. This allows you to be sure that if there's something you want to do that he didn't already think of, you can still do it yourself!

This plugin has helped me so much in organizing my content on sites! I love how many options there are to customize the appearance of a page or post. You can insert sliders, image galleries, buttons, styled headers, styled lists, custom menus, tabs, lightboxes, and it even allows you to add a custom loop of posts to any page that you like. This posts option is actually very powerful and if you're willing to delve into a little custom PHP, he allows you to create your own template for displaying posts using the shortcode!

I like the free version of this plugin so much that I decided I was gonna spring for one of the paid add ons. The Shortcodes Maker allows you to build your own shortcodes! As someone who wants to work with clients who are less code savvy than I, I was really excited about the idea of having a plugin that would allow me to design custom elements for clients in a way that they would be able to utilize, replicate, and update themselves in the future :-)

The shortcodes maker plugin is truly awesome! I haven't really even scratched the surface of what I want to do with it eventually, but it's just so cool! The user interface is really nice and it makes adding custom styles to elements and some CSS modifications that can be tedious so much more fun to do!

I highly recommend the Shortcodes Ultimate plugin. The Shortcodes Maker add on is a wonderful extension that will allow you to do the things you already do in a way that's more fun and way easier and more efficient to do! Enjoy!!!

https://wordpress.org/plugins/shortcodes-ultimate/

Removing An Old Web Address from Google Search

Problem: I just rebuilt a site on wordpress that had been previously hosted elsewhere and built in static html. The old site was showing up in search results above the new site I had just created on wordpress.

Short Term Solution: Once the domain had been transferred to our hosting account, I set up a mirror in my dreamhost account so that the old site would show the new site. This allowed me to hold on to some of the old traffic from the previous search engine rankings. Still, I had the about page of the old site ranking high in results and it was redirecting to a 404 not found page.

After contacting dreamhost, I learned that the short term solution to that problem was to create a file called about.html and place it in the root directory of the new site. That way, when someone clicked on that link in google to mydomain.com/about.html, it loaded the new about.html file instead of the 404 not found error.

What I wanted to do then was to have the link to the old about page lead to the about page on the new site. To do that, dreamhost directed me to a page describing how to create a meta-redirect and instructed me to place it in the head of the about.html file that I put in the root directory of my site (via FTP).

While this was a good short term solution, I still didn't have control over the meta description of the About Page, which is not what I wanted to be appearing as the number 2 result for my keyword in Google! So, I went looking for a longer term solution. I went to google webmaster tools' removals page and I entered the URL of the old page that was coming up.

I've submitted the URL and my removal request is still pending. I will keep you all informed as to how long it takes for this process to complete

Tuesday, September 9, 2014

Duplicator Error Message

Originally Published on 9/9/2014

I've been having an issue with the wordpress Duplicator plug-in building a copy of my site so that I can edit on a test site.

Here is the error message I'm getting:

I've contacted my host to try to resolve this on their end, but they were not able to resolve the issue. We tried switching the PHP version to CGI instead of fast CGI but no luck there. (I got the 2nd error message after we tried that)
We deleted the minified CSS files that were too long (Invalid File Names warning). I also edited the wp-config.php file to increase the server download limit, which actually didn't seem to be an issue to begin with.
Now, after switching the PHP to CGI instead of CGI fast and clearing the cache, deleting W3 Total Cache, I'm getting another error. Any ideas what the problem could be?

Update Published on 9/30/2014

So this was the strangest thing. When I came back the next day to try and work out this problem, I went into the Duplicator plugin on my install and found a package there! It seemed to be the correct size, so I checked it out and indeed the plugin is working again--I had a copy of my site that was working!

Sometimes even when you get a build interrupt notice, the package continues to build in the background. I think the main thing that allowed this to work for me is that I was advised to go into the Duplicator > Settings and check the Archive Flush box under the Package Heading. This is only recommended with large Archives, but I think for me (having a large archive) it was what allowed the package to continue building even after being interrupted (dreamhost has a 64 MB Timeout on downloads).

Saturday, September 6, 2014

Welcome to the Website of a Wordpress Junkie

Hi, my name is Dakota Lee Martinez and right now I'm obsessed with Wordpress. I just got into the blogging platform last year and right now I'm managing 6 sites and looking to expand my horizons with a couple of new projects very soon.

I think that the internet is such a wonderful thing for modern humanity! It has made learning new skills and solutions to pesky problems so much easier. I've found that there are very few things that I can't learn how to do by searching the internet for solutions and methods.

I've started this blogger page in order to share with you the things that I'm learning about Wordpress as I move along. I'm especially going to share with you things that were frustrating to me that I found solutions for.