Bookmarks

I’ve spent half day yesterday trying to get bookmarks working EXACTLY the way I wanted.

My idea was to get them displayed in the sidebar in a way that allows to submit entire site (not only particular posts) to favourite social bookmarks services. And they had to be “made of” icons (not text).

I didn’t expect any problems since there is quite a lot of plugins offering such feature but…. Most of them is designed to use within posts. I skipped those which “auto-implement” in post structure because there was no chance to customize them. I tried two other that required adding php code manually within the_loop. Wp-Notable seemed to be perfect but… later one when trying to customize its look to match my theme I discovered that it also works only for posts! I found only one designed to submit entire site (AddMySite ) but it uses list or dropdown menu (you can choose option).

Finally I found an article on DIY text bookmarks ;) for posts. When I saw how EXACTLY the code looks like I realised I can customize it to have it working for entire site!

I’ve checked two more places to make sure given code for submitting to bookmarks services is correct (actually in one case I had to change it a little).
I’ve removed all <?php the_title() ?> and then replaced all <?php the_permalink() ?> with <?php bloginfo('siteurl');?>.
That’s a piece of code I used for bookmarks on this site:
Continue Reading »

AdSense

AdSense is said to be the most popular (true) and the easiest way to monetize your blog. I’m not planning to explain that neither discuss. I just want to experiment ;).

The point is I heard quite a lot of funny (?) stories about how ads correspond (or rather NOT correspond) to the content of the site. According to features described on google ad should match content perfect. That’s what I’m going to find out… [ if there happen some really cool examples of mis-connection I won’t hesitate to list them ;) ]

To insert code I used AdSense-Deluxe WP plugin. It has features that allow to automate process of inserting ads within posts as much as it’s possible.

“How to change color of ‘Continue reading…’ link?”?

Such simple – hahaha ;) – question made me almost mad. I mean, I thought solving that problem would be piece of cake. I was wrong.

I tried to create different class’ or ID’s in style.css and then add tags to ‘Continue Reading…’ but either it gave no result or results weren’t as I expected (like blank page when I put code outside ' ' instead of inside OR red color of ALL links). Actually I decided to give up.

But this morning I was studying really good website on CSS ( unfortunately in Polish ;) ) and… taaadam! I was struck by lightning -> solution so simple that simpler one just simply doesn’t exist.

Forget about style.css and add styling straight in place you need it!

So code which looked like this:

<?php the_content('Continue Reading &#187;'); ?>

Now looks like that:

<?php the_content('<span style="color: #b3aef8">Continue Reading &#187;</span>'); ?>

And if you want to read the end of that story just press that beautiful bluish ‘Continue reading…’ link :D

Continue Reading »

Index

My biggest problem with finding solutions is that quite often I can’t name it ;). I mean I can explain/describe what I want to achieve but knowing the proper term makes everything much easier. I guess additional problem is that my home language is Polish but all terms connected with web stuff (all terms I know ;) ) I can name only in English.

I wanted to find out how to make index -> kind of “table of content” with titles linked to particular paragraph on the same page. Searching on completely different subject (as usually) I discovered “name” -> NAMED ANCHOR :). That was that :).

To create index itself you need to link each item with right paragraph using <a href="#[name]"></a>.

Then title of corresponding paragraph need to look like this: <a name="[name]"></a>. And done ;).

Also convenient feature of named anchor is fact that if a browser cannot find a named anchor that has been specified, it goes to the top of the document. No error occurs :).

New culinary ideas

Travelling might be really inspiring. Getting to know new culture, new people usually leads to testing food they eat…

Essential Ingredients

Getting them might be very challenging ;). Especially if you want to prepare at home food from cuisine completely unknown in your country. Like Indonesian food in Poland…

Incredible Recipes

To get them you need to have good relationships with people you met while travelling. Only if they trust you they will share results of their personal experience and quite often years of experiments in kitchen…

<div style=clear:both;></div> -> forum solution

Hihihi… Polish forum is the best :).

I was explained that this tag

<div style=clear:both;></div>

is disappearing only because I use WYSIWYG Editor! And that editor ‘likes’ to cut off some tags ;). Bad, bad WYSIWYG…

So I turned it off and… voila! Tag is where it should be all the time and I can edit post as much as I need :D.

Lightbox 2.0

First time I met lightbox effect while working on Joomla! I though it would be cool to have something like that in WP. But I couldn’t find anything in plugin directory. Finally on Polish WP forum I found post about wp-lightbox2-pl. Although that plugin didn’t work in my WP install ( I guess because it is translated into Polish) I managed to find way to original one :). You can get it here.

To use it in post you need to go to code view. There is tab lightbox2. You need provide url to original image and thumbnail, specify width and height of thumbnail. You can also add caption, title and name of group of pictures if you have entire gallery. And voile. You can see result on poppies ;).

poppies

Then I changed a little style.css to have better effect when picture is enlarged. Namely I removed background and added borders on right and bottom of image. I also created new class because I wanted to keep default shadow background on images which don’t use lightbox effect ;).

Here is original piece of code:

Continue Reading »

Captions

Few days ago I tried to create captions. Unexpectedly it appeared to be more difficult then I thought ;). So below there are few solutions I created/found with examples :).

IMAGE and CAPTION in a TABLE

(inspired with this thread )

In code view I wrote:

<table style="text-align: left; width: 270px; float: left" border="0" class="">
<tr>
<td style="text-align: center; width: 270px" class=""><img src="http://www.nietoperzka.com/wptraining/wp-content/uploads/2007/06/church.JPG" alt="church.JPG" /></td>
</tr>
<tr>
<td style="text-align: left; width: 270px; color: #3674d2; font-size: 8px" class=""><strong><em>Church of Peace in Jawor, Poland was built in September 1655 as one of three Churches of Peace in Lower Silesia</em></strong></td>
</tr>
</table>
And now the question is what will happen to that text. Will it wrap photo nicely or will hide somewhere below?<div style=clear:both;></div>

And that’s what I got:

church.JPG
Church of Peace in Jawor, Poland was built in September 1655 as one of three Churches of Peace in Lower Silesia

And now the question is what will happen to that text. Will it wrap photo nicely or will hide somewhere below?

Continue Reading »

Messing with sidebar ;)

By default my Misty Look sidebar consisted of boxes in following order:
About
Archive
Categories
Pages
Links
Meta.

I just ‘redecorated’ my site and now I have only 3 pages so I don’t need a list of them in sidebar.
That was simple -> I removed code corresponding to pages from sidebar.php.

Then I reordered boxes to have them like this:
About
Categories
Links
Archives
Meta.

That also wasn’t difficult.

Steps started when I decided I want to have all boxes on home page while on the other two only: Categories, Links, Archives.

About is set as default to show up on home page only.
To force Links to show on all pages I removed if(is_home()) from following line:
<?php if(is_home()) { mistylook_ShowLinks(); ?>

Ok. Links were on all pages but… Meta as well.

It took me a while to solve it and… taaadam ;) :

1. In functions.php I added – just under function mistylook_ShowLinksnew function:
Continue Reading »

Tables

I need tables! My main site is still not upgraded to the newest avilable WP version so I can’t use there WP-Table plugin.

That plugin is not bad ;). You can edit all setting that you need (# of columns and rows, width of columns, border size, cells spacing and padding). It also possible to set colours of border and background (including alternative colour used in every second raw ;).

But as I mentioned -> can’t use it :(.

So I decided to take my chance and ‘play’ with code ; ).

First column Text to the right
Background color Centered bold text color

And now table with ‘invisible’ borders ;).

First column… … and second.

I did it :) !.

And here is a code:
Continue Reading »

Tab at the top of page linked to other site

On my site I wanted to have tab linked to Gallery installed in different place. It appeared very easy to achieve ;).
In my theme folder I had to change header.php file.
It looked like this:

<ul>
<li <?php if(is_home()){echo ‘class="current_page_item"’;}?>><a href="<?php bloginfo(’siteurl’); ?>/" title="Home">Home</a></li>
<?php wp_list_pages
(’title_li=&depth=1&’.$page_sort.’&’.$pages_to_exclude)?>
</ul>

And now it looks like that:

<ul>
<li <?php if(is_home()){echo ‘class="current_page_item"’;}?>><a href="<?php bloginfo(’siteurl’); ?>/" title="Home">Home</a></li>
<?php wp_list_pages
(’title_li=&depth=1&’.$page_sort.’&’.$pages_to_exclude)?>
<li><a href="http://www.nietoperzka.com/Gallery2/gallery2/main.php" target="_blank">Gallery</a></li>
</ul>

Iiiiiiha ;).

Page 4 of 6«123456»