WordPress Hacks and Tricks How to Remove WordPress Admin Bar I never use the WP Admin Bar and have this code as part of my WordPress themes. If your theme doesn’t already have the option to disable the WordPress Admin Bar add this code to your functions.php file. <?php add_filter('show_admin_bar', '__return_false'); ?> How to Add Custom Content to WordPress Login Page Want to display a customized message as you login to WordPress, add the following code to your functions.php file. <?php function str_custom_login( $message ) { if ( empty($message) ){ return '<p class="message">Totally Rad Message Here…</p>'; } else { return $message; } } add_filter( 'login_message', 'str_custom_login' ); ?> Cleaning up the wp_head() Output In my Stallion SEO WordPress and Stallion […]
Continue Reading WordPress Tricks
How to Build a WordPress Squeeze Page Template
Hi David,
I’ve had your template for a couple of months now, but only just took the time to read this very useful series of comments.
My idea for using your template was to assist in getting some good ranking for my sites as I build them. Planning on perhaps swapping to a more visually appealing template once traffic is established (a magazine theme like the Revolution ones, etc).
At the same time as building content and links to the site, I promote affilaite offers. One of the best ways of doing this, I decided, is to create a static page with a landing page/squeeze page.
WordPress isn’t ideal for this sort of thing so what I’ve done is create a custom page, and strip as much of the WordPress code as possible without breaking it – so I can still use the WordPress html editor to create the page I want.
This is what I’ve done, I wonder if you might comment on it:
?php
commenting
Template Name: TalianSalespage
commenting
?
div id=”content_talia”
div id=”post-entry”
?php if(have_posts()) : ?
?php while(have_posts()) : the_post(); ?
div class=”post-meta” id=”post- ?php the_ID(); ? ”
div class=”post-content”
?php the_content() ;?
/div
/div
div class=”post-fixed”
/div
?php endwhile; ?
?php else: ?
?php endif; ?
/div
/div
When I use this as a custom page, I am able to add html code to the page editor and get what looks like a standalone landing page/squeeze page with some low key links back to the home page just to keep the SEs happy.
I believe that ‘standalone pages’ are less SEO friendly so I thought this might be a good way ahead. I’d be interested in your expert opinion on this – and have I stripped the page code properly (it seems to work!).
Finally, I’m assuming you don’t load each of those recipes individually – and somewhere you mention ‘fed’ content – what do you recommend for this? I am currently trying a plugin called caffeinated Content which pulls from article directories – do you have any experience with this or similar ‘Content trawlers’?
Many thanks for a great wordpress theme.
Phil
How to Build a WordPress Squeeze Page Template
WordPress Squeeze Page Theme Template
Hi Phil,
I can see what you are aiming for and I’ve considered trying something like this myself. Basically what you are doing is creating a custom template that can be accessed as a static Page. It’s similar in concept to the Sitemap.php template file supplied with Talian.
Anyway, a standard sort of squeeze page would lack a lot of the elements associated with a WordPress page and I can see from your code you’ve removed a lot of that code. Looks good to me, obviously as you removed the header, footer and sidebar code you loose all the SEO parts there. So you’ll have to add your own SEO’d title element etc…
I’ve not tried this (just had the thought), but you could in theory use an almost blank template file (no code to be used from a template, just the content function) and paste an entire HTML page as WordPress page.
This would use no template elements from Talian (any theme) so would be a completely stand alone page, but it would still be linked like any other page from the menu etc… so gain internal links automatically.
If I tried this I’d write a unique excerpt since otherwise your pages top HTML elements will probably be used as an excerpt on the related posts plugin etc…
Would be useful for adding squeeze pages etc… provided by affiliates, though you’d have to SEO the entire page from scratch as this way you’d get no optimization from the theme at all.
David Law
WordPress Squeeze Page Theme Template
Caffeinated Content for WordPress?
Hi David,
thanks for your reply – and so soon after I posted too!
It may appear that I know more than I do, though. So while your answer is interesting, I would need more detail to achieve what you seem to be suggesting.
I know my way around html and css – but when it comes to php, javascript and WordPress structure I resort to guessing what something does then performing trial and error until I get somewhere. Hence, the code pasted above became the solution simply because whenever I tried to take more away the whole thing collapsed.
As for SEO on the ‘blank page’, it would, of course, be nice to be able to do some – if you come up with a solution I’d be glad to hear it. Currently, I intend direct linking so organic listing for the sales page will have to suffer until I figure out how to do what you suggest.
By the way, for anyone interested – I wanted to change the ‘someimage.gif’ not only to another image but, due to its prime position, to a banner ad for an affiliate offer.
I’d love to say I came up with the solution but, as usual, I simply came up with the right google search – and this is what I did:
– it works perfectly.
By the way – any thoughts on Caffeinated Content or that kind of plugin?
Thanks again,
Phil
Caffeinated Content for WordPress?
Caffeinated Content WordPress Autoblog Plugin
I’ve played around with autoblog plugins like caffeinated Content (not tried that one), but so far they always get penalized in Google long term (lots and lots of autoblog SEO tests).
I have some sites running that add content automatically from Google news (rss feed), but the traffic is pathetic. So currently not looking at adding more (waste of resources on my servers).
My recipe site I bought a WordPress script (WordPress Datafeed Import Script) that allows you to import datafeeds (csv format only) into WordPress. I had my eldest son (goes to University this year to study a Computer Programming degree) to write a PHP script to convert 100,000+ recipes in a weird format into csv format and then used the WordPress Datafeed Import Script to import them into WordPress.
I’ve not used the WordPress Datafeed Import Script since about WordPress 2.6 and it looks like the author is no longer supporting this product, so no idea if it will work in WP 2.8 and looks like it will break eventually. I personally wouldn’t buy the script today because of the lack of current support. Doesn’t help that the author used security PHP coding so you can’t edit the scripts code yourself (so if it breaks, you’ll never be able to fix it).
David Law
Caffeinated Content WordPress Autoblog Plugin
How to Make a WordPress Squeeze Page Template
To create a template page that will only show the content of a page and nothing else (no theme parts) try this code:
This is the minimum code needed to show the content of a page.
Name it something like blank-seo.php and upload it to your themes folder (this will work for any WordPress theme).
Create a new page (only works with WordPress Pages, not Blog Posts) and select the Blank SEO template for that page.
Name the Page something relevant and add your squeeze page as the content.
Save it and it should create a page that uses all the HTML elements of your squeeze page and have no WordPress theme elements at all (no header, sidebar, footer etc….). The page will also be linked fro menus etc… like any other page.
I tested this on this site earlier, made a page called SEO Test which after testing I set it to Draft, which interestingly means it’s removed from menus etc… (so no links to it), but still exists.
It shows a single line of text (all I added to the content) plus some text related to a Popularity Plugin I use on this site. Some plugins are added to the end of the content function and this plugin does that.
Had I added a full HTML based page to that page (and disabled the Popularity plugin) it should look like any other static HTML page.
Not the most useful thing to do with WordPress, but shows it works :)
David Law
How to Make a WordPress Squeeze Page Template
WordPress Alphabetical Sitemap Page Template
Howdy Mr. Law.
My last issues are all worked out. Love the template.
Next question should be easier.
On the sitemap.php file what do I need to change to make it list the posts in alphabetical order. I have a lot of trails listed in each title of my posts and I would like visitors to be able to scroll down and spot a trail quickly.
Actually I would like my search function to list the results alphabetically instead of by date as well.
Cheerio then, have an awesome day!
oh one more thing, can you set this comment system so the commentor will be emailed when a new comment on this page is made. (I set my comments up on my site that way)
WordPress Alphabetical Sitemap Page Template
How to Create a WordPress Alphabetical Sitemap Page Template
Not too many questions then :-)
Sitemap:
You’ll need to replace some of the code within sitemaps.php.
Find the code:
Replace with:
David
How to Create a WordPress Alphabetical Sitemap Page Template
How to Create a WordPress Alphabetical Search Template?
I don’t think it’s possible to order a search page alphabetically because it uses the same code that creates the home and other archive type pages. They are designed to order the results by date.
So if it is possible you’d have to use different code than the standard WordPress code I’ve used.
I tried a subscribe to comments type plugin not long ago (tested on another site), but when comments got past page one on a threaded comment page it broke! So it was OK as long as the page didn’t have more than one page of comments :-)
I would like to use a subscribe to comments plugin as well, so if you use one that works let me know and I’ll set it up.
David
How to Create a WordPress Alphabetical Search Template?
How to Delete a WordPress Post?
Hello,
I just found out that a blog post I deleted a week ago is still available online! Not good, alcohol was talking! It doesn’t show if you just visit my homepage but google had already caught it. Not going to post the link here, please email me & I’ll reply with the link. I deleted it over a week ago so did not expect the google link to still be valid. I don’t know if this is a wordpress problem or your otherwise great theme.
I didn’t know posts deleted are moved to trash and still viewable! I thought posts deleted were deleted. Don’t think its your themes problem. WordPress users beware! I deleted my trash & now the post is history.
Thanks.
How to Delete a WordPress Post?
How to Permanently Delete a WordPress Post
WordPress doesn’t delete a post straight away now, as you’ve found it goes to trash. Will eventually. So you are right it’s not the theme, it’s WordPress.
I would suggest changing the posts status to either Password protected or Private. I’d go with Password protected.
You could also recover the post and delete the entire contents of the post, save it and trash it again, when Google spiders it again it will be blank. Or setup a 301 redirect or block it via your robots.txt file and make it nocache.
Post a comment for what works as I’ve not tried the Password protected option exactly.
What I have done is turn a load of posts (about 750) that I no longer wanted indexed (jokes added to a site via an RSS feed, so copied content), but didn’t want a load of 404 errors or wasted traffic so changed the status of the posts to draft.
WordPress takes these posts out of the navigation (so no wasted links to them), but they can still be loaded if you know the URL. Long term as Google etc… respiders the site over 6 plus months it won’t find links to these draft posts and will slowly deindex them wasting no link benefit and I didn’t have to setup up hundreds of 301 redirects :-)
Moral of the story, don’t write on the Internet under the influence. That being said would be a pretty boring place if everyone followed that little rule :-)
David
How to Permanently Delete a WordPress Post
WordPress Multisite Community Blogs?
Dave I am already running WordPress 3 MU. SU and MU are installed on one even in the beta. It really could take WP to the next level if you it is that type of site that is kind of a community. But I am testing it before I put it on a larger site.
All you have to do is add one small line of code in the wp-config->>
(‘WP_ALLOW_MULTISITE’, true);
Then you are all set go to your dashboard ->> tools ->> networks and you will be all set.
MU/buddypress has its own theme. A couple of extra files.
Oh Again I had a site giving you income as I was so busy last month I overlooked changing the code when I was playing around with my site :)
I looked for a solution to FTP one WP set of files to many sites all at once – but did not find it – yet- but I use core FTP and can take one set of files and upload them to multi sites, one at a time.
I know you must be busy as I heard there was an election or something in the UK? I am not sure. :) But anyway I always swing back to this site now and then as you always have some innovative ideas on SEO making money online. Your always testing and trying to improve.
WordPress Multisite Community Blogs?
WordPress Multisite /blog/ Slug
Thanks Mark, got WordPress 3 beta working with the option for others to register their own blogs (basically WordPress MU).
I was thinking about using WordPress 3 when the full release is out on my politics site after the UK general election (May 6th), but on a test site running WordPress 3 beta resulted in the main installation adding /blog/ to the URLs!
If I converted a current WordPress 2.9.2 installation to WordPress 3 AND converted it to run like WordPress MU it would mess up the vast majority of the main installation!!!
Looks like on old sites I will of course be able to upgrade to WordPress 3, but not to WordPress 3 with the MU feature without causing major headaches, which is a real shame.
I wonder why WordPress development added the /blog/ bit? Admittedly I’ve not looked for a work around.
David
WordPress Multisite /blog/ Slug
WordPress Multisite How to Remove /blog/ Slug
I was thinking the exact same things about MU. Why /blog/? I was thinking of writing WP development as its still in beta1 but have not time.
If you do not want to go MU you can BuddyPress without MU, just the SU install. Therefore, users can have messaging features etc without the ability to create their own blogs, rather just profiles.
There is also a plug-in called Mingle. It is simpler but It also makes a site a community site.
Community sites are the ultimate dream, but they will only work with some ideas. :) To get people to sign up and fill out a registration often a disincentive.
Your UK Election site is a stellar. It even out ranks the BBC! I will be looking forward when you have ‘election results’ pages maybe even with some maps of the UK, or projected results pages.
WordPress Multisite How to Remove /blog/ Slug
WordPress Center Images
Hi Dave,
I’m having problems for centering my images
I’ve tried to center it while I’m writing my posts but it always shows up on the left.
Any idea on what could be happening?
Is there any specific procedure for adding images?
Thanks
Héctor
WordPress Align Images CSS Code
WordPress align images fix code.
Got a quick fix for the current Talian theme.
Edit the style.css file in a text editor or via the built in WordPress theme editor and add the following code to the bottom of the file.
I got the code from the new default WordPress 3 theme called Twenty Ten, so this is the latest features of WordPress 3. I took the gallery code as well since that’s a newish feature (not tried adding a gallery to WordPress though, so untested). I’ll take a look if there’s anything else moved from inline CSS to the main CSS file in WordPress 3 and update accordingly and also any new features I’ve missed. I plan to go through Talian when WordPress 3.0 is released to add any new features etc… there’s quite a few nice updates coming, so expect some major changes.
I’ve tested Talian with the latest WordPress 3 release candidate 1 and it works fine: , so updating to WordPress 3.0 when released shouldn’t need an immediate update of Talian, but obviously any new WP3 features won’t be in the code yet.
David
WordPress Align Images CSS Code
Rename a Misspelled WordPress Category
David,
I’m still playing with the javascript code you provided (for the sidebar) and haven’t been able so far to get it right… will continue to try.
I’ve run into another problem with Massive Passive Profits and that is I added a campaign and misspelled a category. I’ve deleted it several times but it still shows up in the “Categories” box. How can I get rid of the misspelling?
Thanks,
Randy
Rename a Misspelled WordPress Category
How to Rename a Misspelled WordPress Category
If you create a Category with the wrong name or spelling incorrect you have two choices. Edit it to what it should have been or delete it and retry, if there’s already posts within it edit it.
Dashboard >> Posts >> Categories
That gets you on the Categories editor page.
Find the relevant Category and edit or delete. If you edit change the slug spelling as well.
The above code is HTML code BTW :-) If you paste in exactly what I put above in a text widget you’ll have a widget pointing to my image and my site.
All you have to do is change the URL from to the URL you want the image to point to and change the image URL/filename to your image which you have to upload to your site via FTP. Also change the alt txt from alt=”WordPress SEO” to keywords relevant to the site you are linking to.
David
How to Rename a Misspelled WordPress Category
WordPress Graphics Ad Widget
David,
Well that was simple enough and it worked perfectly for deleting the category misspelling.
I was originally having problems with “sizing” the graphics ad when first making it and in the mean time I got that corrected and your code works perfectly for my new clickable graphics ad.
Thanks once more!
Randy