之前我用的是FancyBox for WordPress,它曾是我最满意的JS 图片灯箱效果。它有丰富的后台设置,可以按你的需求更改画框,背景色,透明度等。jak换掉它因为应为美中不足的是点击图片放大后只能按屏幕显示大小同比例缩放图片,不能放大至图片实际大小,当你插入一张比屏幕长的图片时点击图片后显示的图片效果也许比你页面中的图片还小。
Auto Highslide完美支持图片实际大小,可随意拖动观赏大图细节哦o(≧v≦)o~~好棒,当鼠标移动到图片时显示放大镜图标,这样不要特意写“点击图片放大”浏览者就知道是放大图片。此外还支持键盘“左”、“右”方向键,查看“上一张”、“下一张”图片快捷键功能。
标题标签()是非常重要的一个 HTML 标签,它对于 SEO 也有很重要的作用。通常用它来划分文章的层次。写一篇文章,肯定要有一定的层次,也就是所谓的大论点、小论点等。通常的文章一般具有三个层次:文章标题、大标题、小标题,通常来说,对应的标签是 h1、h2、h3。对于有的主题来说,设计者会用 h2 作为文章标题,这点也需要注意。标题标签一共有六个(h1-6),分别代表不同的重要等级,实际应用当中,只会使用 h1-3。需要注意以下两点:
内文标题层次不要高于文章标题。如果文章标题使用了 h1,那么内文大标题只能使用 h2。
小标题包含在大标题中。分清楚小标题属于哪个大标题属于什么层次,不能把小标题和大标题的层次混合。
合理的使用标题划分文章层次,可以让文章变得更容易理解,对阅读者和 SEO 都有好处,更有一些插件可以根据文章的标题建立目录层次,例如 水煮鱼 开发的 TOC 文章目录插件。
With WordPress you can easily add your AdSense code to your blog. In order to do this, first login to the administrative end of your website. Then, go to the Appearance -> Widgets menu.
In this page select to drag-and-drop a "Text" widget onto your registered sidebar.
Then you should add a title (in our case - Advertisement) and right under it the actual code that you have obtained from Google. Finally, click on the on the "Save" button right under it.
Well done! You have just added your AdSense code to your WordPress blog.
Blog monetization is not a “must”, but it’s a very important source of motivation. Whether you’re blogging alone or along with some authors you gathered, earning even a few bucks a month can change your and/or your authors’ approach to your blog.
Since Google AdSense is one of the easiest and most popular ways for blog monetization, we’re going to see how to use it with a WordPress blog with multiple authors. (Although, this tutorial will also work for single bloggers.) We’ll be covering how to set up profile fields for authors’ AdSense ads and how to display those ads with a function, with a widget, with a shortcode and automatically inside posts.
_____
Warming Up: Setting Profile Fields for Authors’ Own Ads
Google accepts ads from multiple AdSense publishers in the same website as long as you don’t display ads from multiple publishers on the same page. Thus, we’re going to display our authors’ ads on their posts’ pages and display our own ads on other pages.
We could ask every author in our blog for their AdSense code blocks and insert them manually in our code, but asking them to provide the code themselves and inserting them dynamically would be a better idea. (Plus, there’s no fun in doing stuff manually.) The code below provides the functionality for our authors to update their profiles to insert their own AdSense ads:
// show the textarea fields for authors' to enter their AdSense ad codes
// we'll return the ad code within a div which has a class for the ad type, just in case
return '
' . $ad_code . '
';
} else {
return false;
}
}
?>
You see what it does?
First off, we define some “default ad codes” to show other than post pages.
Then we check if the page is a “single post page”.
If it is a single post page, we fetch the ad codes from the post author’s profile and define it in the$ad_code variable. Here, notice that we’re also using the $ad_type parameter of the function.
If it’s not a single post page, we’re defining the $ad_code variable with the default ad codes.
And if the $ad_code variable is not empty, we return the ad code with a div surrounding it. (Otherwise, we return false.)
Done! You can use this function wherever you want inside your theme now – both inside and outside The Loop.
I love it when it’s so simple! :)
Remember: Google strictly prohibits you from displaying ads from multiple publishers on the same page. That’s why the main function (thus, other functions) will not display the “default ad codes” if the author didn’t provide their own codes in their profile. If we did that, we would most definitely get banned from Google AdSense.
_____
Creating the Shortcode
If you want to give your authors the liberty of adding their own ads anywhere inside their posts, you can use a shortcode like below:
Our main function’s only parameter has a default value ('468x60', in our example), so the shortcode will display that kind of ad only.
_____
Inserting the Ads Automatically After “n”th Paragraph
You may not want to give the liberty to your authors to display ads in some cases. If you decide to insert their ads automatically, say, after the first paragraph of every post; the function below is exactly what you’re looking for:
// the function to insert the ads automatically after the "n"th paragraph in a post
// the following code is borrowed from Internoetics, then edited:
If you’re going to download the plugin that we’re building now (with the Download button at the beginning of the post), don’t forget that the line with the add_filter() function will be commented out. Uncomment it to enable this functionality.
_____
Building the AdSense Widget
Building widgets can seem tricky, but it’s actually really easy to make them. In our case, we’re just going to echo our main function and allow the admin(s) of your blog to set the default parameter for it:
// the widget to display the ads on the sidebar
class Wptuts_AdSense_Widget extends WP_Widget {
public function __construct() {
parent::__construct(
'wptuts_adsense_widget', // base ID of the widget
'Wptuts+ AdSense Widget', // the name of the widget
array( 'description' => 'Wptuts+ AdSense Widget Settings' ) // the description for the widget
);
}
public function form( $instance ) {
if ( isset( $instance[ 'ad_type' ] ) ) {
$ad_type = $instance[ 'ad_type' ];
} else {
$ad_type = '300x250';
}
?>
}
public function update( $new_instance, $old_instance ) {
The widget also has a very simple function: If it’s a single post page, display the author’s ad and if it’s not, display the default ad.
_____
Conclusion
If you’re running a blog with more than one author without a capital to pay for their work, these tricks could motivate them to write more often. They would even share and promote their own posts more eagerly – after all, they will have their own ads displayed on the pages. It’s both clever and good!
Do you have any ideas about monetization of multi author blogs? Share your comments below!
The easiest way to build a platform in today’s world is to start a blog. While you can do this with free hosted options like WordPress.com, TypePad.com, and Blogger.com, you will get the most control by using self-hosted WordPress. This is what most serious bloggers use. It is what I use here at MichaelHyatt.com.
However, this is where many people get stuck. They assume that the process of setting up a hosting service and installing WordPress is complicated and time-consuming. It’s not.
(By the way, if you are not sure about the difference between hosted and self-hosted WordPress, check out this helpful infographic.)
In the video above, I show you how to setup your blog in twenty minutes or less. As a bonus, I explain to you how to write and publish your first blog post. If you don’t need this information yourself, perhaps you know someone who does. Please pass along the link to this post.
The good news is that you won’t need any technical expertise to setup your blog. I will keep the tutorial simple and walk you through the process, once step at a time.
If you prefer to read about the process rather than watch a video, you can do that too. I have written down all the steps here. This will also save you the trouble of taking notes as you watch the video.
Please understand: you can get everything you need just by watching the video above. The written material below is optional.
You can launch your blog by following these seven steps:
Gather your resources. To set up a self-hosted WordPress blog, you will need:
A domain name
A credit card
20 minutes (give or take)
It’s easier if you haven’t already registered your domain. It’s also cheaper. I will show you how to get one for free, using the service I recommend in Step #2.
However, if you have already registered your domain, no sweat. You will simply need to add an additional step. I will explain the process at the end of this post.
Set up a hosting account. This is where your blog will “live.” This is a server in the cloud (i.e., a remote computer), where you will rent space to install the WordPress software and manage your blog. It’s far easier than it sounds. Stay with me.
There are a hundreds of hosting services available—perhaps thousands. However, based on my experience and research, I recommend BlueHost. I believe it is the best option for most people for the following seven reasons:
Reason #1: Support. BlueHost has great 24–7 support via phone, e-mail, or chat. I have personally used it a few times and found the support staff to be courteous, professional, and helpful.
Reason #2: Reliability. BlueHost is super reliable. It boasts an uptime average of 99.9%. That’s about as good as it gets.
Reason #3: Ease of Use.BlueHost is super easy-to-use (as you can witness in the above video). In fact, shockingly so. They have worked hard to make it simple for non-geeks.
Reason #4: WordPress. Interestingly, WordPress itself only officially recommends three hosting services. BlueHost is number one. It hosts over 850,000 WordPress blogs.
Reason #5: No Limits. BlueHost offers unlimited disk space, unlimited bandwidth, unlimited domains (i.e., you can host multiple blogs or sites on one account), and unlimited e-mail accounts.
Reason #6: Affordability.BlueHost is inexpensive—about $4.95 to $6.95 a month, depending on which plan you select. The longer you are willing to commit, the cheaper it is.
Note: BlueHost is now offering a special for my readers for $3.95 a month. This is honestly a steal. Get it while you can. But be sure to use one of the links in this post to get this special offer.
Reason #7: Values. In its Terms of Service (see Section 10.03, BlueHost prohibits pornography, nudity, and other adult content. It strictly enforces this standard and deletes sites that violate it. Personally, I don’t want my blog sitting on the same server as some pornographer. If you feel the same way, you may be surprised to know that almost all of the most popular hosting services allow pornography on their servers.
Note: I am a BlueHost affiliate, which means the company pays me a commission every time someone signs up via one of my links. But this didn’t influence my recommendation, because all hosting services have similar programs. I recommend BlueHost because I honestly believe they offer the best hosting available.
You should also know that I do not use BlueHost for MichaelHyatt.com. My site is too big and complicated. It requires a dedicated server with a mirrored backup. However, I have my other sites on BlueHost, as do several of my family members and friends. BlueHost specializes in shared servers and it is the right choice for 95% of bloggers.
By the way, BlueHost offers a thirty-day, money back guarantee, which is written into their Terms of Service. I have personally tested this and got my money back within a few hours. So there’s really no risk on your part.
Okay, so if you are still with me, go to the BlueHost home page. Click on the Sign Up Now button.
Now you need to decide whether you need a domain name or you already have a domain name. I’m going to assume that you haven’t previously registered a domain, using some other domain registration service (e.g., GoDaddy.com). If you have, I will explain what to do at the end of this post.
Now enter your domain name in the left-most box, choose the appropriate extension (com, net, biz, whatever) and click on the Nextbutton.
Fill in your account information and then scroll down to select your package. As you can see, the prices range from $4.95 to $6.95 per month. It all depends on the length of your commitment.
Note: BlueHost is now offering a special for my readers for $3.95 a month. This is honestly a steal. Get it while you can. But be sure to use one of the links in this post to get this special offer.
Keep in mind, you will be required to pay the annual rate in advance. That’s how BlueHost is able to offer these super low prices. Here’s the math:
12 months at $6.95 per month is $83.40 per year and $83.40 up front.
24 months at $5.95 per month is $71.40 per year and $142.80 up front.
36 months at $4.95 per month is $59.40 per year and $178.20 up front.
I would not sign up for any of the other services listed on this screen, but that’s up to you. The only one I might consider is “Domain WhoIs Privacy,” especially if your home address and your billing address are the same.
Now enter your billing information. Confirm that you have read and agree with BlueHost’s Terms of Service, and then click on the Nextbutton. The system will now verify your credit card information.
BlueHost will next ask you to “Select the Upgrades that Best Suit Your Needs.” I would skip all of these. Click the Complete button at the bottom of the page.
Now you need to choose a password for your account. Click on theCreate your password link:
Enter a password and an optional PIN number. (Make sure you write these down somewhere.) Click the Submit button. Then you will be asked to login to your domain. Use the password you just selected and click on Login.
Now BlueHost will take you through “Getting Started.” It will ask you a few questions. This is really just a customer survey. Answer the questions and then click on Submit.
Step 3: Install WordPress. Don’t be intimidated by this step—it’s amazingly simple. The process used to be complicated, and you had to be a semi-geek to pull it off. But BlueHost now makes it super-simple. Trust me, anyone can do this.
You should be looking at your C-Panel (i.e., “Control Panel.”) If you aren’t, click on the button that takes you there. Then close the welcome message by clicking on the link that says, No thanks, I’m fine.
Scroll down the page to ”Site Builders.” Click on the WordPress logo and wait for the new page to load. At the bottom of that page, click on theInstall button. (If you get lost, watch the video.)
The WordPress installation screen has four steps:
Step 1: Installation Preferences. By default, BlueHost will select the most current, stable version. That’s what you want, so leave it as is. In the field where it says, “Where would you like WordPress installed?” just leave it blank. This is really for more advanced users who want a custom installation.
Step 2: Advanced Options. Give your site a new name. Then give yourself a username and password. I would make it something other than “Admin.” Make sure you have selected “Automatically create a new database.”
Step 3: Select Plugins and Themes. I would uncheck all of these. You can reselect them later if you need to.
Step 4: Read the Legal Information. Check the box that says you have read the terms and conditions of BlueHost’s licensing agreement.
Now click on the Complete button. BlueHost will tell you it is installing WordPress. (You should see a progress meter.) When it is done, you will get a screen with your Blog URL, Login URL, username, and password. BlueHost will also e-mail this information to you, but I like to have a backup. I would write it down or take a screenshot.
You’re making great progress! Now things will speed up considerably.
Step 4: Load your new blog. Simply click on the blog URL address. Your new blog should load in a new browser tab.
As you can see, there’s nothing very fancy here. WordPress uses a verygeneric theme by default. But that’s the beauty of WordPress. There arethousands of themes available. I use StandardTheme. Regardless, you can customize your blog to your heart’s content.
Step 5: Log into WordPress. While you’re still on your blog’s home page, scroll down to the Login link in the lower right-hand side of the sidebar. Click on the link.
You should now be looking at your WordPress login page.
Now enter your username and password. (Remember, you wrote these down in Step 3.) You will soon see a welcome screen. For now, clickDismiss.
You are now looking at the WordPress “Dashboard.” Sometimes, bloggers refer to this as the WordPress back-end. The front-end is what your readers see—your normal blog site. The back-end is what you see—how you control what appears on the front-end.
Step 6: Write your first post. Click on the Posts | Add New option in the left-hand side menu. You should now see the New Post screen.
Enter the title of your post, perhaps something like, “Welcome to My Blog.” (I know, clever, right?)
Now write your first post in the field directly below the title. Perhaps you could explain why you are starting your blog, the topics you plan to write about, and how often you intend to post.
Now click the Publish button. This literally publishes your post for the world to see. You can click on the Preview Changes button to see it.
Congratulations! You have just published your first post on your very own self-hosted WordPress blog.
Step 7: Bookmark your blog. You’ll want to come back to your blog on a regular basis, so it’s a good idea to bookmark the two main pages: the front-end and the WordPress back-end.
In case, you have already closed the page to the back-end, you can re-open it by going to: http://[the name of your blog]/wp-admin.
If you have followed my instructions, you now have your very own self-hosted WordPress blog. Pretty exciting, huh?
If you know someone else who could benefit from this information, please pass along the link to this post. If you would like to embed the screencast in your own blog, please feel free to do so. You can find the video on both Vimeo andYouTube.
Optional: What if you have already registered your domain name on another service?No big deal. The first thing you will need to do is to point your domain name to the BlueHostservers. This will vary depending on where you registered it. BlueHost describes the process here.
For example, at GoDaddy, where I have some domains registered, you log in, then go toDomains | Domain Management screen:
Now click on the domain name you want to point to BlueHost. You should now be looking at the “Domain Details” page. Scroll down to the bottom, left-hand side of the page. You should see a section called “Nameservers”:
Click on Set Nameservers. A new screen should pop-up.
Enter ns1.bluehost.com in the field for Nameserver 1.
Enter ns2.bluehost.com in the field for Nameserver 2.
Click OK. That’s it. Now log out. It typically takes 24–48 hours for these changes to take effect. You might get lucky, and it will start working in an hour or two.
Please note: BlueHost or your Registrar (the company from whom you bought your domain) may change their procedures from time to time. If you have any problems, please check with them. I do not provide technical support for this process.
Once you have done this, you can begin the process of setting up your WordPress blog. In Step #2, after you click Sign Up Now, you will need to enter your domain name in the right-most box that says, “I Have a Domain Name.”
Now click the next button. Everything else should be the same. If you get stuck, you may need to wait for the change in your Nameservers to take effect before proceeding. Be patient.