Archive for the ‘HOWTOs’ Category

All posts in HOWTOs category.

Working With WordPress Shortcodes in Template Files

Posted by: Jen | No Comments »

Categorized: HOWTOs

Ever need to include the functionality of a shortcode in a WordPress template file?

Awhile back I needed to create a template that auto changed some of the shortcode parameters depending on the URL it was accessed from. (Think single gallery page – that depending on the GET variables of the page – would show a specific and that gallery specific options. Instead of creating multiple gallery pages with the gallery shortcode hardcoded in – I decided to make one gallery page and then change the contents by simply modifying the URL using some GET variables which worked out great.

Example:
URL: http://www.example.com/gallery/?gallery-id=23

do_shortcode( '[jappler-gallery id=" '. intval( $_GET['gallery-id'] ).']' );

That code right there will then show the gallery with the ID 23 specified in the URL (?gallery-id=23).
This is just a quick way to utilize shortcodes inside the templates themselves while allowing you to make pages a bit more dynamic!

*Make sure to sanitize your GET variables.

Documentation on do_shortcode(): http://codex.wordpress.org/Function_Reference/do_shortcode

Building Big Things on a Small Budget

Posted by: Jen | No Comments »

Categorized: Featured, Help and Ideas, HOWTOs

Most people have great ideas, good plans, and little follow through. Over the years I have seen a lot of this and have even participated on occasion (my want to create heated windshield wipers for one).

With consulting – time and time again – I hear great ideas, get a time/cost estimate in place and then the client comes back with “well we want all these features in the $10,000 estimate but we want to only spend $2,500″. For most people they either give up completely or get a family member, friend, etc that does some web development – but cannot completely follow through and in turn – the idea dies. Another common issue is that the idea holder has so overcomplicated the implementation/planning, that the idea never gets off the ground.

So what can you do if you have a big idea and a small budget? Modularize the project! If you really believe in your idea – take small steps and build the essentials. Then as you get feedback, extra cash, or even funding – add in the extras which will really make your idea stand out. This might take some extra time – but it will ensure your idea is well flushed out and done right the first time.

Next time you have a big idea – sit down and think about realistic steps in accomplishing it. You can always add on to the idea later, but you have to start somewhere and that might as well be something that is done right and done well. A strong foundation will always make the difference in the end!

Tagged: ,

Jappler Recommends: Trim the Fat With Facebook Status Updates

Posted by: Jen | 1 Comment »

Categorized: Featured, HOWTOs, Jappler Recommends

I cannot tell you how bothered I am when my “news feed” is littered with all sorts of updates about zoo this, farmville that. I like to keep up to date on family friends but I really do not care about the games they are playing which I am not participating in. Fortunately – Facebook allows you to “hide” statuses from applications.

If you want to hide these as well (or anyone in your newsfeed which you might not really care about) – simply hover over the status update and a “hide” link will appear. You can either block that application or the person.

This made my day!

Tagged:

Quick iCal Tip: Set Your Default Calendar

Posted by: Jen | 25 Comments »

Categorized: Help and Ideas, Hints, HOWTOs

I have been going crazy trying to figure out why all my incoming meeting.ics files were going to my QuickBooks calendar (I have several calendars) and not another one. There had to be a setting somewhere, right? I could not find it, but I did discover how to inadvertently set it: drag the calendar you want to use as the default to the top (same goes with Mail.app with setting the default account).

Tagged: ,

WordPress Wednesdays: Custom Taxonomies

I recently worked on a project where we needed something sort of like tagging, and sort of like categorizing – but neither really worked as there would be way too many exclude this and only show that stuff involved. I needed a way to classify certain content, have easy access to it, and display it in a manner that be effective and quick.

After exhausting all ideas – someone pointed me towards using “Custom Taxonomies” and it was a perfect fit.

What is a taxonomy? Simple – a way to group things. Why not use categories and or tags?

An example to better your understanding:
Right now – on this blog I use tags for my post themes (WordPress Wednesdays, etc). This is not ideal, because I am trying to group together posts by a particular theme, not necessarily by tags. Even though WordPress Wednesday could be seen as a key word – it is more a description or a classification of the post. What I plan to do in the next few days is to go back, create custom taxonomies for all my post themes and then use that for classification of posts instead of using tags. With this, I can then query them using query_posts or even make a tag cloud.

 'wordpress-wednesdays', 'showposts' => 10 ) ); ?>
 'post_theme', 'number' => 15 ) ); ?>

Still confused? Check out the links below. Once you start thinking about organizing information, I think it will make sense.

References:

CSS Tuesday: Images as List Bullets

Posted by: Jen | No Comments »

Categorized: CSS, HOWTOs, Web Development

There are plenty of ways to spruce up the boring bullets used in HTML lists.

The best way and most browser compatible way I have found to do this is using the following code:

ul li {background: url('images/dot.gif') no-repeat 0 3px; list-style:none;margin:0 0 2px 0;padding:0 0 0 10px;}

You can see that here:

  • Example of fancy bullet
  • Another bullet point

Vs. The plain list:

  • Example of fancy bullet
  • Another bullet point

Something like this may seem simple, but it is often overlooked and can really dress up a site.

WordPress Wednesdays: Jappler Category/Tag Feeds

Posted by: Jen | No Comments »

Categorized: HOWTOs, jappler.com, Wordpress

Perhaps you come to this site because you personally know me or like some of the WordPress hints I like, or like my CSS posts, or just like my personal rants (which seem to happen less…hmm I need to get on that!).

If you are only interested in some of my posts but not others, you can easily subscribe to just certain “subjects” very easily.

For example, lately I have been posting on a certain subject each day. (WordPress Wednesdays, etc). If you are only interested in reading those posts, subscribe to this RSS feed: http://www.jappler.com/blog/archive/tag/wordpress-wednesdays/feed. Perhaps you only want to read about things I post in the “Serenity Now” category. You can subscribe to http://www.jappler.com/blog/archive/category/this-and-that/serenity-now/feed. Do you see what I am doing? This logic will work on any tag or category. Find the tag URL (click on a tag) or find the category URL (click on a category in the sidebar) and then add “/feed” to the end of the URL – and there you go. A custom filtered Jappler.com feed.

Just another way WordPress makes it easy to interact with content!

WordPress Wednesdays: Setting up Default Settings for FTP in WordPress

Posted by: Jen | No Comments »

Categorized: HOWTOs

Now that you are using WordPress 2.7 or WordPress 2.8 and are updating your plugins when new updates are available using the WordPress admin – you might be tired of entering the same information over and over (FTP host, FTP user, and FTP password). If you want to just have the WordPress admin automatically connect and not prompt you for these items – you can enter the following in your wp-config.php file and you will set from then on to update plugins without having to remember all the info.

define(“FTP_HOST”, “jappler.com”);
define(“FTP_USER”, “user”);
define(“FTP_PASS”, “password”);

* Please note that this is not personally recommended that you have your FTP credentials in any script for security reasons – but this is something you can at your own risk and something that does save some hassle (but can come with a price).

WordPress Wednesdays: It is All About the Query

Posted by: Jen | No Comments »

Categorized: Featured, HOWTOs, Wordpress

My last ten or so projects I have been working on all have a common theme: maximize WordPress’s ability to be a powerful CMS. Clients more and more are coming to me with the need to create a custom fields which they can store/query data throughout their site.

WordPress is completely customizable and because of this – it is easy to add custom fields to any post or page and then use the data put in them throughout the page.

Example: You have all your clients listed on your web site – and have created profile pages for them. Not only do you want to show their profile – you would really like to have a page template that shows all your client logos – and does so dynamically so that anytime you add a new client – their logo gets added to the mix automatically. The examples are endless and the solution is easy.

Step 1: Create a custom fields plugin (or use the generic custom fields) – personally I like to create a plugin so that I can completely customize and make adding content as easy as possible. If there is interest – I can cover how to create a plugin.

Step 2: Now that your data is stored – you can use it anywhere you want (in the loop, outside the loop). You can use something like:

ID, $key, true);?>

to display the data. (see Using Custom Fields for more information).

Step 3: Again – now that the data is stored – you can also query it so if you wanted to show all logos (as mentioned above) – you can do so by using WordPress’ query_posts to query and then display the data. (see Query Posts for more information).

Stuck? Interested? Let me know.

WordPress Wednesdays: Take Control of Missed Spam

Posted by: Jen | No Comments »

Categorized: HOWTOs, Wordpress

Even with Akismet, and http:BL installed to stop spam – I still get the occasional spam comment. Until a few days ago, I simply got frustrated, went into the WordPress admin and then marked them as spam.

Spam Keywords

Spam Keywords

Then after thinking about this more, I remembered you could actually enter in your own text pattern that WordPress would use to mark comments as spam or block the comment completely. All the spam that was coming through – all had the same text in it (a series of question marks) so I added that into the “Comment BModeration” box to make sure that they were being caught appropriately – and after a week or so, I will then move that pattern down to “Comment Blacklist”. So – if you are like me and see some spam still slipping by your spam protection, take advantage of the two options to add in words, email addresses to block/send to moderation, under “Settings > Discussion”.