Keep in mind that background picture coul make your post unreadable!
Just before text, add this:
<div style="background:url('http://path-to-your-picture.jpg')no-repeat">(open tag)
Here comes the text
</div> (close tag)
Fatal error: Allowed memory size of 33554432 bytes
Posted by Planeta Srbija | 15.7.10 | Wordpress | 2 comments »When upgrading Wordpress, a error messages occured “Fatal error: Allowed memory size of 33554432 bytes exhausted…"
If you spend some time googling for the solution, you'll find out that this error happened when execution of a php file exceed allowed php memory on the server. In this case, the allowed php memory is 33554432 bytes (32 Mb).
The solution is increasing allowed php memory, and you'll do that by editing wp-config.php file, adding right after “<?php”:
ini_set("memory_limit","128M");
This increased allowed php memory to 128 Mb. Read More......
BM Custom login WordPress Plugin and picture positioning
Posted by Planeta Srbija | 24.6.10 | Wordpress | 4 comments »BM Custom login is a very cute WordPress Plugin for designing your WordPress login page.
Login-picture contains actually of two pics: one main for login data and a footer pic. They should "merge" but in reality they "overlap", so if you made your pics transparent, result will be ugly!
Official plugin page is not up-to-date and comments ain't getting any response! Dave, for example, wrote:
I have made the area around the border transparent but now it shows the background image below the footer image. How can I make it so the background image from the top part stops and lines up with the footer instead of bleeding through the bottom where it's transparent?
Because on the plugin page comments are held for moderation for eternity, here is my solution:


And my final result looks like this:
How to import (embed) Wordpress in HTML page
Posted by Planeta Srbija | 9.7.09 | Wordpress | 8 comments »You want to import WordPress Posts, Pages or Widgets into the rest of your static (HTML) coded website? It's possible!
Supposed, your web presentation is on www.example.com, and the wordpress part is on: www.example.com/blog.
The access to Wordpressu "from outside" is possible thru wp-blog-header.php. This file loads Wordpress application and makes it API, which allows you the access.
Once inserted in "static page", you can call all of its's funktions like making a WordPress Themplate (Theme).
Let's say you want to import from WP the Latest Post into your www.example.com/index page. The only possible way for this is that your index page has the .php extension. If you have the .html or .htm extension just change it!
Keep in mind your linking to the rest of the site (!) The easiest way for that is to make a new index.html page with redirection to your index.php page! Use this redirection trick (copy the code in Notepad/Dreamweaver/MSFrontPage and save it as index.html):<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0; URL=http://www.www.example.com/index.php">
<title>Redirecting Page</title>
</head>
<body>
</body>
</html>
Now, at the very top of your index.php (Home) page insert following code:<?php
// Include Wordpress
define('WP_USE_THEMES', false);
require('./blog/wp-blog-header.php');
? >
The first line is just a comment on what we are trying to do. The second one tells WordPress not to use template. Third calls our importatnt function, we are talking here about.
Now, we scroll the page down and find the place where we want "Latest Post" to show up, and insert this code:<?php query_posts('showposts=1'); ?"
<?php while (have_posts()): the_post(); ?"
<?php endwhile; ?"
In first line: we look for the latest post, in second: we call the loop, and in third we close the loop.
If you don't want the latest post but something else, please take a look on query_posts() documentation which shows variations on this issue.
To style a bit our code above (show Title and ...Read more), you'll need some knowledge in HTML... But here is an example on how to do that: <td bgcolor="#ffffff" style="padding: 10px; border:1px solid #dbdbdb" align="left" >
<font face="Arial" style="font-size: 10pt" color="#000000"><p align="left">
<?php query_posts('showposts=1'); ?>
<?php while (have_posts()): the_post(); ?>
<?php the_title(); ?>
<?php the_excerpt(); ?>
<p><a href="<?php the_permalink(); ?>">Read more...</a></p>
<?php endwhile; ?></font></td>
I have found out that you can use this trick to import WordPress functions from completely different websites, but they must be hosted on the same server. Use this code to do that:<?php
// Include Wordpress
define('WP_USE_THEMES', false);
require('/var/www/example.com/blog/wp-blog-header.php');
query_posts('showposts=1');
? "
Note: in some cases it might not work, it has to do with some PHP restrictions on your web server! It can be solved with use of "curl.php" (but it's another topic).
At the end: if you don't want to import the "Latest Post", baut something else (i.e. Categories, Comments, Tags... whatever), please take a look of WordPress list of all tags used to make Templates: LINK
An example for Categories would be:<td bgcolor="#f6f6f6" style="padding-left: 20px; border:1px solid #dbdbdb" align="left" >
<font face="Arial" style="font-size: 10pt" color="#000000"><p align="left">
<?php wp_list_categories('title_li=0&orderby=name&show_count=1'); ?>
</font></td>![]()
WordPress Admin Comment In Different Color
Posted by Planeta Srbija | 4.7.09 | Wordpress | 1 comments »If you have a WordPress powered blog with lot of comments, it might be good idea to somehow highlight comments posted by Administrator. It looks better and it's much easier to follow comments.
1. To do so, open the style.css of theme you use and place anywhere this code:
li.bypostauthor {
/* CSS styles for author comments */
background-color: #FFFFCC !important;
}
Of course, instead of "FFFFCC" you can use any code for any color - there are some of them: link
That's it!
Note: This specific CSS class "li.bypostauthor" is automatically added by WP to author comments. For registered users WP adds "li.byuser" CSS class. Read More......
Ifyou don't want to have border around pictures in your post, even if your theme use it, just add folloving string to your specific picture (use HTML view):
<img src="http://www.blogger.com/picture.jpg" style="border: medium none ; padding: 0pt;" alt="Picture" />
There is also another way, use class within picture's HTML:
<img src="picture.jpg" class="no-border" alt="Picture" />
But also add following to your CSS file:
.no-border { border: none; padding: 0; }
To achieve an effect of double borders around your pictures, add this to your CSS:
Read More......
img, a img {
padding: 3px;
border: 1px solid #01203c;
background: #eee;
}
Take a look on my other postings:
- Blogger templates (6)
- Blogspot - How to (14)
- CSS (1)
- HTML (6)
- Photoshop (1)
- Tricky (12)
- Uncategorized (1)
- Widgets (3)
- Wordpress (6)
- Wordpress Themes (11)




