View Full Version : Blog Sidebar Tips?
Buncha
06-03-2010, 12:18 PM
I notice that many people with a large Wordpress blog network have an almost identical sidebar for each blog (same ads and links). Do you have any tips for doing this? How do you keep your links up to date? Is there any easy way to manage the sidebar across your entire network?
I notice that many people with a large Wordpress blog network have an almost identical sidebar for each blog (same ads and links). Do you have any tips for doing this? How do you keep your links up to date? If there any easy way to manage the sidebar across your entire network?
Yep we do that! Not sure how lol, I know it's a php include so we just update one file and it's network wide, we also do Google analytics this way.
I will see if Dario or Mailman can explain how to do it.
Mailman
06-03-2010, 12:45 PM
Yeha we are just using some php includes for most of it along side some other options.
The thing is just think about what you want and plan it out you can really shoot yourself in the foot if you get too far with things and want to make changes etc...
mikesinner
06-03-2010, 03:00 PM
Someone please make a tutorial on how to do this. I really need to have this for my blogs. Is php the only option?
pimpmobile
06-03-2010, 03:14 PM
mikesinner,
It's pretty easy.
For wordpress you need a plugin that lets you put php code in the sidebar unless you're editing the template. Here are a couple I've used: http://wordpress.org/extend/plugins/php-code-widget/
http://wordpress.org/extend/plugins/samsarin-php-widget/
Install and activate the plugin as usual.
Create your php file with notepad or whatever editor you want. Put in all your links, banners, etc. the way you want.
Save it as whatever.php and upload it somewhere
So now go to the widgets section of your theme and drag the widget for your php include plugin to the sidebar.
Edit the widget with <?php include("path/to/file/whatever.php"); ?>
Do this on all your blogs, so when you need do change something out you won't have to go back into each blog and edit the widget. You just edit whatever.php
pimpmobile
06-03-2010, 03:15 PM
Oh and if you edit the template just put <?php include("path/to/file/whatever.php"); ?> somewhere in your sidebar code or wherever you want.
nickutis
06-03-2010, 03:30 PM
I suggest using readfile() instead of include(). This command is faster and doesn't load php engine that much, especially if you have few includes in the same site.
VeronicaV
06-03-2010, 04:12 PM
I have to second the php usage, makes life so much easier. Alternatively there are quite a few wp plugins that make it easier as well =). I think max banner ads is one.
dgchi
06-03-2010, 06:24 PM
how does this mesh with linksorganizer as a solution?
Lipshtick Lady
06-03-2010, 06:44 PM
this is helpful... can you give an example of the whatever.php file - I can edit PHP stuff, but I am lost when it comes to starting out :( (the blank page scares me)
pimpmobile
06-03-2010, 06:48 PM
this is helpful... can you give an example of the whatever.php file - I can edit PHP stuff, but I am lost when it comes to starting out :( (the blank page scares me)
You can put HTML code in the whatever.php file. It doesn't have to be php code.
ed_banger
06-03-2010, 10:57 PM
whateverfile.php contains:
<ul>
<li><a href="http://site1.com">Site1</a></li>
<li><a href="http://site2.com">Site2</a></li>
<li><a href="http://site3.com">Site3</a></li>
<li><a href="http://site4.com">Site4</a></li>
<li><a href="http://site5.com">Site5</a></li>
<li><a href="http://site6.com">Site6</a></li>
</ul>
Now in the php_include widget, I use the following:
<?php
@ini_set('expose_php', 'Off');
@include "/path/to/whateverfile.php";
?>
I include whateverfile.php as a widget on every blog, and then I simply edit the whateverfile.php and my 6 links to my 6 sites appear nicely in my sidebar. I simply edit it and add a 7th site, and now all 100+ of my blogs have 7 links.
I use this include method to load banners, footers, my linksorganizer templates and a bunch of other things.
Buncha
06-03-2010, 11:00 PM
I've been struggling with this for an hour and can't get it to work.
I made a simple test PHP file. Tried using the PHP Widgets and editing the sidebar template. But I can't get it to show up.
<?php include("http://www.bunchafreeporn.com/testing.php"); ?>
Anyone know what I'm doing wrong? Is there something wrong with the PHP file? Do I need to change some server settings or add some extra code to the WP template?
ed_banger
06-04-2010, 12:02 AM
I've been struggling with this for an hour and can't get it to work.
I made a simple test PHP file. Tried using the PHP Widgets and editing the sidebar template. But I can't get it to show up.
<?php include("http://www.bunchafreeporn.com/testing.php"); ?>
Anyone know what I'm doing wrong? Is there something wrong with the PHP file? Do I need to change some server settings or add some extra code to the WP template?
Normally, you can't include remote files like that.
Try:
<?php
@ini_set('expose_php', 'Off');
@include "http://www.bunchafreeporn.com/testing.php";
?>
If that doesn't work try:
<?php
@ini_set('expose_php', 'Off');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://www.bunchafreeporn.com/testing.php");
curl_setopt($ch, CURLOPT_HEADER,0);
curl_exec($ch);
curl_close($ch);
?>
Buncha
06-04-2010, 12:33 AM
Normally, you can't include remote files like that.
Thanks for your help. I finally got it to work using your first code. I think the problem was using the URL instead of the file path. When I switched to the file path, it started working fine.
PornHustler
06-04-2010, 12:56 AM
I have a quick follow up on this. Trying to get it to work for me now but for banners.
I created a file directory and included the .php file in it. In it its a link for a banner with java script. I created a sub folder that I put the actual banner in. I edited the link in the .php so the image source went to the banner I want. I went to the wp widget put in the home path to the .php file.
Now all I see is the link for the banner but the actual banner is not showing. Anyone know why? Does the banner have to be in the same directory as the .php file?
Any help? Thanks
Powered by vBulletin® Version 4.1.12 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.