Quantcast
Channel: blogging tips
Viewing all articles
Browse latest Browse all 12

Plugins That Make Blogging With Success Easier:Using the Thesis OpenHook

$
0
0

Captain Hook by Wink

This is a second article highlighting plugin tips we think our readers will find useful. Plugins (the right ones) make your blogging life much easier. We recommend ones that have worked for us or that we find in a trusted site. I found the Thesis OpenHook plugin after I customized Thesis the old-fashioned way. I was very proud of creating my first custom_functions.php to add a note above the comments box. The note alerts readers that Ishan will not be responding to comments for awhile:

Without the plugin:

1. Develop the code you want.

The code must be in html and/or php. Create the text and any clickable links in a throw-away draft post. Then copy the html version. You'll need to refine your code, setting divide tags to separate and align your addition to the theme.

I pasted my code into the OnlineHtmlEditor and touched it up where I can see any mistyped tags. The softwar displays exactly how the code looks on your browser.

a)Add this before your code: (change the width, font and color as needed.)

<div style="background-color: #<span class=;">FFFFE0; width: 95%; font-size: 11px; font-style: italic; border: 2px dotted #CDCDCD; padding: 3px;"></div>

b)Add this after your code:

</div>

2.Open up the Thesis file (don't tremble!)

This is the part everyone hates! You'll need to backup your existing custom_functions.php file. A slip of the typing finger could mess up your theme when changing functions code. The only way to recover could be restoring the file you changed! Read this post on what to do when you accidentally mess up with Thesis Custom Functions file.

Naturally, you'll use the thesis hooks. Hooks work by allowing you to insert your own Html into spots in the theme's framework. See visual map reference at end of post.

Hook - a set of basic commands that you can use to add to, subtract from, and modify the functionality of your Thesis installation. - Thesis Hook Reference List

Add this to the end of the function definitions, before "hooks start": (change the name of the function).

function mynewfunction () {
?>
*** the code from step 1 above ***
<?php
}

Add this after the "hooks start" (again, use your function name)

add_action('thesis_hook_comment_form_top', 'mynewfunction'); 

Save the file and view the blog. Any problems (didn't you cross your fingers?), go back to step 1...

Plugin: Thesis OpenHook

Description:

Thesis OpenHook takes the process of modifying Thesis and simplifies it! Where once users would be required to open and modify their wp-content/themes/thesis/custom/custom_functions.php file, users can now easily customize Thesis via their blog administration panel.

How to Use:

As I said I was so proud of doing this hook that I slapped my forehead when I found the Thesis OpenHook plugin! If it's that easy, watch out Ishan, you won't be the only Thesis expert!

Here's how I used the plugin to add the same code to Thesis on a test blog. The time difference is about the same but the stress level is soooo much lower!  This is because it's much harder to break the theme. The plugin gives you the list of available hooks and you insert your code. No need to open the custom file and fumble around or mistype the function or hook name.

  • Do step 1 above, be creative and use the text to promote something.
  • Omit step 2 and all of it's related stress.
  • Install the plugin (once!).  Find the settings on the left side of the dashboard under "Appearances, Thesis OpenHook".  Press the drop-down menu to select on of the official hooks
    I found the plugin had a different name for the hook I wanted. The current name is 'thesis_hook_comment_form_top' but the menu names it 'thesis_hook_comment_field'.  But they are the same spot! Problem is the menu select does not take you to that section as it does for any other selection. So you have to page down to find this hook.Paste your code from step 1 into the box and press the blue "Little Save Button."  That's it.

There are also options to run php code using this plugin. You may want to add filtering logic.

References:

- Visual Map of Thesis Hooks - this one is for generic pages; click to enlarge the image (see the blog post for more examples!)


What is your favorite productivity plugin? Let us know in the comments!


Viewing all articles
Browse latest Browse all 12

Latest Images

Trending Articles





Latest Images