Showing posts with label WordPress. Show all posts
Showing posts with label WordPress. Show all posts

Monday, April 13, 2015

Not Maintaining This Site

Over the past several years I’ve posted content all over the web on various platforms like WordPress, Tumblr, Google+, Twitter and Facebook. In my current situation, I need to consolidate. Mostly, I don’t make money on my websites, never have, just wanted to share content and ideas.
Facebook gives me all I need at the moment; a forum, followers, media storage and discovery. So, that’s where I’ll be posting, probably for ever.
read more...

Thursday, November 27, 2014

Show Featured Image After Shareaholic - WordPress


Placing a featured image before the first content paragraph but after the Shareaholic social sharing links plugin. This is pretty simple, but just in case someone needed a quick solution, here is the code. In my case, my theme didn't support this, and I created a child theme so I could update without overwriting my custom changes. It's always smart to create a child theme.



My other Github code.

Link to image here.
read more...

Saturday, March 29, 2014

Adding A Fixed Utility Bar To WordPress Genesis Theme

I wanted to add a new utility bar at the top of my site that was fixed. Using Carrie Dils example with a small modification, I achieved what I wanted. Thanks Carrie.

Here are the additions I added:

style.css
.utility-bar {
background-color: #4cbb17;
border-bottom: 1px solid #ddd;
color: #ddd;
font-size: 12px;
font-size: 1.2rem;
padding: 10px 0;
padding: 1rem;
position: fixed;
width: 100%;
line-height: .5 !important;
z-index: 1;
}


And I had to make a small change to padding for the @media areas so the title had some distance between the green and the the text. Carrie's example included two sidebars, I only included one and stretched it to 100% in CSS.
read more...

Thursday, March 13, 2014

WordPress WP_Query Sorting On Meta Values

I recently needed to sort posts by values saved in a meta value field. The normal post object only has a reference to the meta values so I needed to figure out how to add a meta key, meta value, and direction to WP_Query. Here is what I did:

The meta key: event-details
The meta value: a:1:{i:0;a:7:{s:16:"event-start-date";s:10:"03-04-2014";s:14:"event-location";s:15:"Someplace, USA";s:10:"event-logo";s:4:"4301";s:10:"event-type";s:5:"Event";s:10:"event-link";s:36:"http://www.company.com/";s:10:"event-time";s:0:"";s:14:"event-end-date";s:10:"03-05-2014";}}

The value event-start-date is what I want to sort all the posts returned.

$query_args = array( 'post_type' => 'events',
'posts_per_page' => -1,
'order' => 'DESC',
'meta_key' => 'event-details',
'orderby' => 'meta_value event-start-date' );

$loop = new WP_Query( $query_args );


Now I have a post object that is sorted by the event-start-date. Took me a while to get the sorting right, but it works like a charm.
read more...

Tuesday, February 25, 2014

Adding A WordPress Category To Imported Posts

One feature I've either missed over the years or doesn't exist, is the ability to add more meta data to imported posts. Here is the scenario:

New WordPress site
Importing old WordPress content into new site
Want to add a new category to all posts (or tag)
User custom template page to display new posts (category-foo.php)

So how do we solve this issue? Here is what I did. This may not be the best or optimum way, and as a disclaimer, unless you fully understand databases, sql syntax, and how WordPress ties posts and meta data, this may be a little more than you want to tackle (but I can help you of course!).

Here is is how I started. Wrote a quick PHP script to read the WordPress XML file from site one and display the GUID tag value on the screen. Since I don't know what the new post ID is after the fact, and the GUID is a field in both the XML and the database, I used that. Also, because I'm lazy at times, I included writing out the actual SQL code I'll use to build a SELECT statement.



Now that I have this code, I run the query in phpMyAdmin, and I get a result set full of Insert statements. I use the Export feature to CSV for Excel, and then open in my favorite code editor Coda. The Insert statements are important because it's how I'm going to manually add the category. This little query returns the post ID and the wp_terms ID.

But before we crate all this cool code, I had to do a little leg work. In order to make this work you need two things, the post ID and the term (category) ID. Armed with those two values, I can add records to wp_term_relationships. First I needed to create the new category called Blog. After creating that, I went into phpMyAdmin and looked in the wp_terms table, and found the ID of the category Blog. Noting the ID I added it to the concant() sql function used in creating the INSERT statements along with the post ID from wp_posts.

The output in the CSV file looks something like this: INSERT INTO wp_term_relationships VALUES (2082,838)

Once in Coda, I did a string replace of the closing paren ) with ,0); so the INSERT statement closed correctly. The statment now looks like this: INSERT INTO wp_term_relationships VALUES (2082,838,0);

I copied all the lines in the CSV file, pasted them into the SQL window in phpMyAdmin, and clicked GO!

The result was 341 record updates with the new relationship of Blog. Go into the Admin and click on the Category link under posts, and to the right of Blog, I saw the correct number of entries. Click on the entries number gives you all the posts who have the category Blog. Voila!

This process seems convoluted and cumbersome, but it's not meant to be accomplished by everyone. What I did here was basically violate the code of conduct for WordPress developers by manually adding values to the database instead of letting the WordPress framework do it. My next assignment is to look for some type of method that would allow me to do this. What I really want is the ability to add additional meta data at the time I import. But that's for another day. And maybe someone has already figured this out, and I would love to see how that works.
read more...

Tuesday, October 8, 2013

Let Me Show You How To Spell WordPress Correctly

It's spelt WordPress. See the difference from Word(p)ress?

Believe it or not, I typed in the title of this post into Google, and there wasn't a single post on the first page of results that was just about spelling WordPress correctly.

The WordPress team has spent an incredible amount of time coming up with logo styling and use (here), and I see so many variations of the WordPress logo I can't imaging trying to police the problem. But when I am reading around the net, reading posts, articles, blogs, whatever, and people spell WordPress as Word(p)ress, I just want to scream. Especially by people who know it's spelt WordPress. Not some variation.

Why is this important? Well, it's not really, but it's like spelling my name, which is Thom, not Tom. Even people who have known me for many years write my name as Tom. Thom is my name. Thom is my brand.

When you spell WordPress as Word(p)ress, it loses something, like it's a fake name, like you don't really know what WordPress is.

So here it is. The one post I hope makes it to the top of the search pages, so every knows how it's spelt. Now I need to write a bot to go out on the web and correct all the mistakes.

By the way, the WordPress system automatically corrects the spelling of WordPress. Read more here.

<off-soap-box />
read more...

Friday, May 3, 2013

I'm Using WordPress, Now What? Starter Edition



Here is the PDF of the presentation on GitHub.

The following is a list of plug-ins that we discussed during the presentation. All links are valid as of this post but not be in the future.

JetPack
Web hosting with BlueHost (*affiliate link)
Editorial Calendar
Security
SEO
Analytics - Clicky or Google
Cache - W3 Total Cache or WP Super Cache
Backup - BackWPup or VaultPress
Social Sharing
read more...

Wednesday, January 30, 2013

WordPress Plug-ins For 2013

Presenting tonight at the SLC WordPress user group tonight. Topic is "I'm Using WordPress, Now What? Plug-in Edition".

You can download the presentation here, and view it on Speaker Deck.

Please add your list of must have Plug-ins for 2013.
read more...

Monday, September 17, 2012

WordPress App For Android Sports Snazzy Stats


WordPress for Android (and iOS) has a pretty snazzy stats module. The UI is simpe but has great graphs. You must log into your Wordpress.com account, and it's possible you will also need JetPack. My stats suck so thanks for helping a brother out.
read more...

Friday, March 11, 2011

Exclude Images From WordPress Gallery Display

I wrote this post yesterday which had several images as part of the content. One image was used in a different section of the post, but I wanted to group specific images together to highlight a point I was making.

WordPress adds all images uploaded during post creation to a Gallery. Once all the images have been uploaded, you can select the Gallery tab, and insert the gallery right into the post. However, I wanted to exclude one of the images. But there wasn't anything in the image manager that allowed me to exclude an image. (WordPress guys, please add this feature.)

No worries though, the WordPress Gallery is really short code, and the short code allows for parameters. In this case, I was able to add the exclude parameter with the ID of the image I didn't want in the Gallery, and whala, I was able to display what I wanted. You can get the ID of the image in the Library and hover over the image, you should see a value for attachment_id, make note of it. The short code lookes like this:

[ gallery exclude="123" ]
read more...

Wednesday, March 9, 2011

First Use Of Amazon CloudFormation

Amazon recently release a new product called CloudFormation. It’s basically an automated build out of several Amazon AWS products, driven by a simple XML file.

One of the templates offered out of the box is for a complete WordPress install. After following the wizard like instructions, I had a basic WordPress installation up and running in a matter of minutes.

I played with several WordPress settings, saved changes, added posts and pages, and even modified the theme.

Overall it was a painless experience. I downloaded the template XML so I could modify for future needs, and tuned the server off after about 4 hours. Total charges were around $3. Of course that’s with little data transfer.

One feature I haven’t been able to get working yet is WordPress MultiSite. I kept getting an error pointing to a location on the server that was throwing a 404 error. This could be a problem with a plugin. Further investigation is needed.

What I really liked was I could turn on a dev box for a demo or to work on a new site without having to setup a new web hosting. Not sure yet how feasible it would be to run the site 24/7, but for dev and test it would be great.
read more...

Tuesday, December 21, 2010

WordPress iPhone App Fail

I've tried, I've really tried, but using the WordPress client application on the iPhone just sucks. The last three posts I've created have all had problems. I fully understand it's a free product, and there are no guarantees, but I expect more from the WordPress folks. Here is the latest snafu.

I have hesitated to upload photos to my blog from third party clients because I feared what happened tonight, would happen. I took several photos of my Family attending a play, created a new post in my iPhone WordPress application, inserted media from my phone, and posted. Of course, the posting had issues, mainly, the HTML used to show the photos was hosed. Here is what was sent to WordPress:



And here is what it should have looked like:



So, the post that was sent out to my RSS feed now has 6 photos with incorrect formatting and links. Frustrating to say the least.

Before trying to post to my WordPress blog, I sent the same photo set to my Tumblr site, via email, with zero problems.

The final thing I thought would take place is the creation of a Gallery. If I had included say 20 or 30 images, it would have been nice to see a slide show or at least thumbnails for each image. Instead, the images were inserted, full size, and with a large amount of images,  the post would have been several hundred feet off the screen. Just doesn't seem like the whole posting media from the iPhone app is working right.
read more...

Sunday, September 5, 2010

WordPress 3.1 Has A Feature List

Last week the development team for WordPress came up with a list of features/bug fixes they want to include in 3.1. As with all software, the end result may differ from this list. Check it out here.

Two things I'm excited about, and really hope are implemented, is a new multi site Admin, and a configurable Dashboard. This is kind of interesting, because at WordCamp Utah 2010, Matt Mullenweg asked Adam Dunford, "if you had a magic wand, what would you change in WordPress?" His response was a cleaner, configurable dashboard. Spot on Adam.

Looks like the WP team is shooting for a mid December release, with a feature freeze in mid October. That's not too far off.

If you haven't already upgraded to WordPress 3, you should do it soon. This is a fantastic release, seems to be very stable, and the further you fall behind the more problems you will encounter.
read more...

Friday, May 14, 2010

SMCSLC WordPress 3.0 Presentation Slides

Here are the slides I used in my WordPress 3.0 presentation last night for the Social Media Club of Salt Lake City (SMCSLC).

It was a great event, the audience was great, the other presenters (Dan Garfield @todaywasawesome) and panelists (Jake Spurlock @whyisjake) were awesome. It was a good WordPress night.

Thanks to Darin 'Doc' Berntson (@igobydoc) for putting the event together to coincide with the Eye Care for Kids charity concert after the club meeting. Doc really spends a lot of time promoting and supporting the charity. Take a few minutes to check it out.

View more presentations from Thom Allen.

read more...

Thursday, April 29, 2010

BuddyPress And The Missing Admin Bar: Solved!

BuddyPress - WordPress I’ve been working on a few BuddyPress projects lately, using custom themes. Actually, I’ve used a great new plug-in, BuddyPress Template Pack by Andy Peatling to help with custom themes. While this great plug-in got me down the road (it basically turns your existing theme into a BuddyPress compatible theme), there were a few things missing. I wanted to share one I solved, and how.


Once I installed the theme and started working on it, I noticed that there was white space at the top of all my pages, enough room for the BuddyPress admin bar. So I knew it had something to be missing code that wasn’t displaying the admin bar. A quick search on the BuddyPress forum site and I found the solution: Make sure the wp_footer() reference is in your template file.


My theme needed a reference to wp_footer(). There was a reference to get_footer(), but that doesn’t help the admin bar. Once I added the reference, the bar shows up as desired. I call this code snippet in the custom theme where the footer should appear.


<?php
function custom_footer() { ?>
<div id="custom_footer" class="accentBorders">Copyright &#169; 2010 All Rights Reserved.</div>
<?php
wp_footer();
}
?>

Find more BuddyPress goodness at http://buddypress.org/support/topics/.


By the way, BuddyPress is a set of plug-ins that give your WordPress site the ability to create a community.

read more...

Thursday, December 3, 2009

Looks Like Fancy Commenting Systems Don’t Rule

Over the past week I have been running a poll asking what WordPress commenting systems people like. The options were Disqus, IntenseDebate, Native – built in, or None. Here is how it broke down:

  • 59% of respondents preferred native commenting to a third party system.
  • 25% of respondents preferred Disqus.
  • 16% of respondents preferred IntenseDebate.

These are completely un-scientific results. I’ll continue to run the poll to see if I can get more results, and I’ll update this post, or if the overall results change, I’ll write up something new.

What I find interesting is those who answered picked the native commenting system. Some of the things I would like to know is why? With the third party commenting systems providing log-ins for Facebook, Twitter, OpenID and others, the appeal to use these Social Network links doesn’t seem to be a draw.

I don’t particularly care one way or the other what commenting systems people use. I have Disqus installed on this blog, if for no other reason than I like being able to track and manage my comments on this and other sites who use Disqus.

Here’s a thought though. It would be cool to use a Gravatar type system, where your comments are tied to your email address, pinged back to a service, and then you can manage and track your comments on a wider range of sites.

My friend Scott Lemon (@humancell) also suggested another commenting system called Echo, you get more information on it here http://js-kit.com/.

If you would like to participate in my poll, please check it out here http://ow.ly/Hxj1.

read more...

Tuesday, December 1, 2009

WordPress Releases New iPhone App

This post is really a test using the new WordPress iPhone App, http://iphone.wordpress.org, version 2.1. I really want to test the picture upload feature.

You do have the ability to manage comments, but if you use a comment plugin system like Disqus, you can't moderate those comments.

I do like that you can create pages with this tool. I also like that I can manage multiple blogs.

I don't like that I can't insert a place holder god a photo, so I have no idea how the format will look. And how do create a linked word? Doesn't seem exist.

This is a great tool for creating quick, non-complicated posts.












read more...

Friday, November 27, 2009

Two Impressive Ecommerce Plug-ins For WordPress

I’m asked frequently what ecommerce plug-ins I have used and recommend for WordPress. There are several options, but two stand out.

WP e-Commerce Plug-in For WordPress

wpecommerceWP e-Commerce is a free plug-in and can be installed right from the plug-in section of your hosted WordPress admin tool. There are several modules for this product including drop shipping, digital downloads, members only, and an affiliate option. These modules are reasonably priced, but can add up if your trying to be cost conscious.

Support for this plug-in comes from a forum on their site. Understand that a majority of questions about product issues are answered by community members. The website also encourages you to buy a documentation file for $35. I’ve never seen this before, but I suppose it’s their way of reducing the need to answer support questions. I should also mention the documentation isn’t written by the plug-in developer, but rather a user of the product.

If e-commerce isn’t your WordPress sites sole function, I would use WP e-Commerce. It’s simplicity and feature rich free version should be enough for the casual seller. A list of features can be found here.

Shopp Ecommerce Plug-in For WordPress

shopp The next application I want to share is Shopp plug-in for ecommerce. This plug-in is not free, and you will pay for enhanced features. But the thing I really like about this product is it’s breadth of features. From the WordPress Dashboard integration to the drag and drop functionality of putting products in the shopping cart.

You’ll find advanced features like inventory management, multiple shipping types, data export for Excel and Quickbooks, and various language translations. One of the major features I think sets this product apart is the cross selling option. Like Amazon, you can give your buyers the ability to buy other products that may be related, or up sell them to something of more value. Other products in this space are rushing to implement this feature, it’s that important.

Support comes from a forum on the companies website, which seems to be pretty active. Take a look at the features here. While having to pay for modules may seem costly, these modules make the product a commercial grade ecommerce system that integrates into WordPress.

I’m finding Ecommerce is becoming a natural extension of the WordPress platform. I’ve installed both products, and find them to be the best available at this time. I would like to see these companies extend their products to work with mobile themes. As an example, if you are running the WPtouch plug-in, which gives iPhone users an elegant theme, you can’t use the shopping cart to buy products. Kind of defeats the purpose of having a mobile compliant site.

What ecommerce products have you used the integrate with WordPress? What has been your experience?

read more...

Friday, September 18, 2009

The Basics Of WordPress

Last night I lead a discussion on the Basics of WordPress at the Social Media Club of Salt Lake City. I really want to thank Pete Codella and Joseph Scott for asking me to participate. It was a lot of fun. Due to some technical difficulties, we had more of a discussion, which is always better than a boring lecture. Please find the slide deck here for you viewing pleasure.

Thank you to all who attended, you had some great questions, and several of you shared your experience. If you were in my class last night connect with me on Twitter or Facebook, or any number of other social network sites. Or a good old email/phone call works too.
read more...

Tuesday, June 16, 2009

Today I Learned About WordPress Category Templates

Today I learned about category templates in WordPress. There is a simple, yet rarely used feature, that allows you to display content based on a specific category. For example, if you have 10 categories, with ID’s 1-10, and you want to show your visitors something different for each of these 10 categories, you can create files with this naming convention:

category-1.php, category-2.php, and so on.

When the URL http://mydomain.com/category/coolcat is entered into the browsers address bar, and WordPress sees a category request made, it looks for a category-x.php file in the main template folder. If one exists, that will be used over the default template file. If a template file isn’t found for the requested category, the next file that WordPress looks for is category.php. This is another template default file that can be applied to all categories that don’t have their own template. If a category.php isn’t found, then the default template file is used.

One thing I discovered while trying to get category templates to work, I was entering http://mydomain.com/coolcat and expecting the category template to display. But as you may know, WordPress was trying to find a Page named “coolcat”. I struggled with this for a week, and after ripping out the small hair follicles on my head, it dawned on me I was entering the wrong URL. Remember, /category/ must precede the category name, or it just doesn’t work.

Here is a link to the WordPress Codex explaining category template.

read more...
 
Copyright © 2003 - 2014 Thom Allen Weblog • All Rights Reserved.