Archive for category Wordpress

To use the WordPress mobile App when Maintenance Mode plugin is active…

…you have to enable XML-RPC in the Maintenance Mode plugin settings!

 

How to overlay a widget area on the header image in Atahualpa

Juggledad describes how… Note that for bloginfo name and description, you can use the WP variables instead, i.e. “echo bloginfo(‘name’) and ‘description’. I couldn’t get the bfa variables to work.

Also, you can use the class=’titleoverlay’ in the div to get the same effect as the title / description.

You can create a widget area in the header, but there is no builtin feature to ‘overlay’ a widget on the header image. To do something like this would involve modifications to the code.

4 posts · Aug 2009
I figured out a way to do it without editing code and thought I’d share my solution.
Style and Edit Header Area -> Configure Header Area
HTML Code:
%pages
%bar1

<!-- Replace %image header item with the following html/php code -->
<div id="header-image-container" class="header-image-container">
  <div class="opacityleft">&nbsp;</div>
  <div class="opacityright">&nbsp;</div>
  <div class="titleoverlay">
    <h2 class="blogtitle">
      <a href="http://www.example.com/"><?php echo $bfa_ata['bloginfo_name'] ?></a>
    </h2>
    <p class="tagline"><?php echo $bfa_ata['bloginfo_description'] ?></p>
  </div>
  <!-- Style wrapper for widget area -->
  <div id="header-widget-area-container">
    <!-- Add new widget area -->
    <?php bfa_widget_area('name=Header Widget Area'); ?>
  </div>
</div>

%bar2

Add HTML/CSS Inserts -> CSS Inserts
Code:

/*
Since we removed the %image header item, the CSS
for the header-image-container class won't be generated
so we have to add it ourselves.
I'm using the tag id instead to prevent conflicts just in case.
*/
#header-image-container{
position:relative;
margin:0;
padding:0;
height:150px;
background: url('HEADER-IMAGE-URL-GOES-HERE') center center no-repeat;
}

/* Styles to be applied to our new widget area container */
#header-widget-area-container{
width:200px;
float:right;
}

Add widgets to the new widget area

The opacity and blog title overlay elements can still be configured in the ‘Header Image’ settings. However, I don’t think the rotating images will work. They never worked for me anyway, so I can’t test it. It shouldn’t be too hard to add the necessary javascript though.

Tags:

Removing the ‘Powered By’ in footer of WordPress sites

To remove the Powered by WordPress and theme line form the footer of your theme, find the functions.php file in the root of the theme folder and comment out or remove the lines:

function footer_output($footer_content) {
//global $bfa_ata;
//$footer_content .= 'Powered by <a href="http://wordpress.org/">WordPress</a> &amp; <a href="http://forum.bytesforall.com/">Atahualpa</a>';
return $footer_content;
}

NOTE: leave in the global $bfa_ata; line if you want to keep the Copyright notice.
**** STOP PRESS:

A VERY rude correspondent submitted a comment to the effect that this code is bogus and might crash your website. It didn’t for me.  Perhaps a politer individual may take time to explain my schoolboy error. Of course you use the code amendment at your own risk.

Getting a Thesis-like look in Atahualpa

In the bfa forum, “everyman” from wordpressacademy.biz describes how to get Atahualpa to look like Thesis out of the box. He supplies a download of an Atahualpa settings file which does the job and describes how to create the additional widget areas so that you end up with one RHS widget area spanning two sub-columns, just like Thesis.  The top spanning widget area can be used for an image rotator or a video etc.

This is based on an the idea of using the Advanced Text Widget to insert code that replaces the Right Sidebar with 3 new areas.

I’ve tried out the settings file and it confused me somewhat. After importing the settings I found I now had 3 additional widget areas in my Widgets panel. Turns out the settings file had code to create these in it.

BUT!!!

The widget areas would not show up in the front end when I put content in them. They seemed to be there, but had not been applied in any of the Atahualpa configurable areas as per the instructions under Add New Widget Areashttp://royhair.com/wp-admin/post.php?post=2342&action=edit. But they did show up as existing in the Add New Widget Areas panel.I got really confused for a while because I followed the instructions to create the widget areas using the Advanced Text Widget plugin and eventually (after changing widget area names) ended up with 6 new widget areas, only 3 of which would work!

So I reset Atahualpa settings to default, disbaled the plugin, imported the settings file, DELETED the 3 new widget areas from the Add New Widget Areas panel, and went back to the original instructions that advocated using the Advanced Text Widget. After enabling this plugin, I went to the Widgets panel and put the following code into the Right Sidebar:

 

 

 

<?php bfa_widget_area('name=My new widget area'); ?>

<?php bfa_widget_area('name=sidebar_widget_area&cells=2&align=9&cellpadding=5&before_widget=<div id="%1$s" class="sidebar-widget %2$s">&after_widget=</div>'); ?>

This essentially seems to do the same job that the Atahualpa settings file did, but for some reason it works whereas the settings file didn’t. I suspect the settings file had been exported AFTER the Advanced Text Widget (ATW) plugin had put the widget areas in place and without the original inclusion of the ATW plugin it didn’t “take”.

You end up with My New Widget Area, Sidbebar Widget area 1 and Sidebar Widget area 2. You can rename these within the ATW widget that you added to the original Right Sidebar widget area.

So it’s working now. If this helps anyone, here is the Atahualpa settings file I used to style the site without the additional widget area stuff. Import this BEFORE enabling the ATW plugin and creating the widget areas with the code.

ata-thesis-like-20110323

The original post on wordpressacademy.biz implied that this Atahualpa method would work with the Thesis Open Hook plugin, but I haven’t tried that yet. It seems unlikely, but you never know.

Tags: ,

Solved: “Cannot modify header information – headers already sent” message in WP with Atahualpa

I was getting the old “Cannot modify header information – headers already sent by (output started at…  pluggable.php ” message from Atahulapa theme when I’d added some code into the main index.php file.  The code was to redirect on view of a single post for users that are not logged in (don’t ask, but there were good reasons)!

I checked pluggable.php in the includes folder and it had the ?> at the end and did not have any trailing spaces, so that wasn’t a solution.

From this thread I found the solution.  I had to add

ob_start();

in index.php file at line no 1, as directed by letsnurture. It seems to have worked.

Hope this helps someone.

WordPress › Support » “Press This” results in 404 or 403

You might have trouble with the Press This feature of WordPress. Here is a very helpful tip from aaronrogers on the WP support forums that explains how to amend the javascript to make the bookmarklet work. There certainly seems to be a problem with hostgator hosted blogs and this fix …er…fixes it!

I was having trouble with 403 forbidden and 404 not found errors.

I am posting this using Press This Reloaded plugin which lets you have access to the Categories, tags etc.

u=’+e(l.href.replace(/\//g,’\\/’))+’

via WordPress › Support » “Press This” results in 404.

Tags: , , ,

Docicons – a wordpress plugin – V2 Released!! Get it now.

Version 2 of my Docicons plugin is released today with a comprehensive Admin panel and lots of features including automatically embedding Media attachments via integration with Hana FLV Player. That’s right folks, it can embed audio and video files automatically right in your posts and pages WITHOUT the special codes. And the Admin options allow you to set how the embedded media is displayed.

See the Docicons Plugin page for more details and to DOWNLOAD the plugin.

I decided to integrate with Hana rather than other flv players because of the GPL distributable licences. In a future release of Docicons I will be able to directly distribute Flowplayer with my plugin. At present you must download and activate Hana as well if you want to use the embeddable media features. If you don’t, and all you want is nice document icons in your posts, then it will work without it.

Have fun. And let me know if it is any use to you.

Tags:

Docicons – a wordpress plugin

I wrote a WP plugin that adds inline image icons to wordpress posts and pages. See the Docicons Plugin page for details.

Tags:

CD Avatar Bubble on Buddypress

If you’re using Buddypress, it’s useful to have the CD Avatar Bubble plugin which gives a configurable info bubble when hovering over an avatar. But it might not work correctly. The solution is to edit :

cd-bp-avatar-bubble/_inc/bubble.js and edit line 50 with the full path on localhost (http://localhost/your_site/….)

AWPCP web link bug fix

Another WP Classifieds Plugin v 1.06 contains a bug such that the web links do not get displayed. The fix is descibed in the Comments to this post, the one dated May 16, 2010:

http://www.awpcp.com/announcements/another-wordpress-classifieds-plugin-version-1-0-6-released/

holywebmaker says:

After updating to 1.0.6.7 it appears the “visit website” link has disappeared.

Looks like $awpcpvisitwebsite is missing in a couple spots.

I seemed to fix it, but I am sure it is not perfect….

in awpcp.php I added the following after line 11121
$awpcpshowtheadlayout=str_replace(“\$awpcpvisitwebsite”,”$awpcpvisitwebsite”,$awpcpshowtheadlayout);

and after 11157 (probably a better spot than this)

$awpcpvisitwebsite

Note how the comments in line 11122 are PHP comments / / and on line 11158 are html comments < !–

Then I added the same $awpcpvisitwebsite to my Listing Settings Page to control layout of single ad view page

i.e. You add the variable $awpcpvisitwebsite into the Classified Settings / General Settings / Ad Listing Settings page as per this image. The variable gets converted into the link.

This shows how to add it into the single ad view, but you could also add it into the Listing view which is just above this text box.

Thanks,
Brad

NOTE: To make the links open in a new window, change the target within the <a > tag on line 11040 as per:

Tags: , ,

AWPCP web link bug fix – for the EAC Projects site

Another WP Classifieds Plugin v 1.06 contains a bug such that the web links do not get displayed. The fix is descibed in the Comments to this post, the one dated May 16, 2010:

http://www.awpcp.com/announcements/another-wordpress-classifieds-plugin-version-1-0-6-released/

holywebmaker says:

After updating to 1.0.6.7 it appears the “visit website” link has disappeared.

Looks like $awpcpvisitwebsite is missing in a couple spots.

I seemed to fix it, but I am sure it is not perfect….

in awpcp.php I added the following after line 11121
$awpcpshowtheadlayout=str_replace(“\$awpcpvisitwebsite”,”$awpcpvisitwebsite”,$awpcpshowtheadlayout);

and after 11157 (probably a better spot than this)

$awpcpvisitwebsite

Note how the comments in line 11122 are PHP comments / / and on line 11158 are html comments < !–

Then I added the same $awpcpvisitwebsite to my Listing Settings Page to control layout of single ad view page

i.e. You add the variable $awpcpvisitwebsite into the Classified Settings / General Settings / Ad Listing Settings page as per this image. The variable gets converted into the link.

This shows how to add it into the single ad view, but you could also add it into the Listing view which is just above this text box.

Thanks,
Brad

NOTE: To make the links open in a new window, change the target within the <a > tag on line 11040 as per:

Tags: , ,

Using WordPress behind the firewall

WP won’t allow updating of plugins or themes because it cannot get thru the proxy. You have to add the following lines to wp-config.php:

/* Roy added proxy config */
define(‘WP_PROXY_HOST’, ’214.100.100.10′);
define(‘WP_PROXY_PORT’, ’8881′);
define(‘WP_PROXY_USERNAME’, ‘EAC\USERNAME’);
define(‘WP_PROXY_PASSWORD’, ‘PASSWORD’);
define(‘WP_PROXY_BYPASS_HOSTS’, ‘localhost, eacwamp01, eacintra01′);

Note the username and password fields also need the quotes round them.

Tags: , ,

Installing buddypress

If installed on WAMP the links might not work. Here is the solution.

From:  http://buddypress.org/community/groups/creating-extending/forum/topic/buddypress-installed-using-wamp-server-but-links-dont-work/

Somewhere in your Wamp files there will be a file called http.conf. That’s the apache configuration file. There you can control what modules are being loaded by your test server. Look for that file, open it and then look for this line

`#LoadModule rewrite_module modules/mod_rewrite.so`

and remove the #

Then restart Apache.

wordpress sites in the public sector

Carl has a blog at : He is keeping a Google spreadsheet listing WordPress sites in the Public Sector at: http://spreadsheets.google.com/pub?key=tJ6xb2P1ONMsCs5lWqJlYFw&output=ht ml

useful

Roy

Tags: , ,