Showing posts with label wordpress. Show all posts
Showing posts with label wordpress. Show all posts

Jun 14, 2013

Wordpress: easy way to have colum shortcodes

Sometimes you have to create a new Wordpress template that requires columns. The hard way to achieve this is via CSS: you can somehow add HTML code to your posts and pages and then set the rules in your CSS files so they show as the columns.

The easyest way I found to achieve this is via a cool Wordpress plugin called Column Shortcodes. It lets you use a series of shortcodes so you can put many different column sizes in your pages with simply copying a shortcode. This way your posts are less messy and you don't have to touch it's HTML code.

Just download the plugin, install it and then you will be able to use all these shortcodes:

[full_width][/full_width]
[one_half][/one_half]
[one_half_last][/one_half_last]
[one_third][/one_third]
[one_third_last][/one_third_last]
[two_third][/two_third]
[two_third_last][/two_third_last]
[one_fourth][/one_fourth]
[one_fourth_last][/one_fourth_last]
[three_fourth][/three_fourth]
[three_fourth_last][/three_fourth_last]
[one_fifth][/one_fifth]
[one_fifth_last][/one_fifth_last]
[two_fifth][/two_fifth]
[two_fifth_last][/two_fifth_last]
[three_fifth][/three_fifth]
[three_fifth_last][/three_fifth_last]
[four_fifth][/four_fifth]
[four_fifth_last][/four_fifth_last]
[one_sixth][/one_sixth]
[one_sixth_last][/one_sixth_last]
 
 
Remember to put your text between the tags. For example if you want a left text that is in a 2/3 column and a right column that has 1/3 your post should look like:

[two_third]This is my left column text[/two_third]
[two_third]This is my right column text[/two_third] 


Just make sure you use the corresponding tags: if you use one_third then you should use two_thirds if you want to put something in the remaining text. Of course you could nest another column set inside a column set like:

[two_third][one_half]Hello world[/one_half][one_half_last]Lorem ipsum[/one_half_last] [/two_third] 
[one_third_last]Just another text[/one_third_last]
...

By the way, the "_last" word at the end of the tag just makes the column stick to the right, or that's what I guess looking at the CSS provided by the plugin.

Have fun with the columns :D

Wordpress: Add a slider the easy way

If you need to add a slider to your wordpress theme you can do many things. You can hardcode it into your page template, but that's the hard way and not very flexible.

You can make it quickly and easily using the Meta Slider plugin. It's a very well made plugin for Wordpress that let's you easily put a slider into a post, page or even in all your pages if you wish.

The steps to do it are:

1. Download the plugin and install as stated in the link above (check Installation).
2. Activate your plugin in your admin panel.
3. Look to the bottom of the control column, you should see a green button tagged "MetaSlider".
4. Press the "+" sign on top left of the screen to add a new slider.
5. Configure your slider with the images you want to show. Test it before you go to the next step (there is a button to save and test it).
6. Copy the shortcode (in case you want to put it into a post or page in your Wordpress) or the PHP code also provided by the plugin, and paste it where you need it.
7. Enjoy :-D

Hope it helps you!

Mar 7, 2012

Wordpress page as external link

Let's say you need a "Contact" page in your Wordpress but you don't want a page displayed. All you want is to open the email client with a "mailto" link. How to do that?

After digging on the web for some time i found this solution. You just have to create a blank page in your wordpress, and then put this in the title of the page:

<a href=”your-link”>The title</a>

So for example, if you want to open the mail client to your  email address, you should put a page title like:

<a href=”mailto:contact@mysite.com”>Contact</a>

And what if you want to point the link to another site?

<a href=”http://www.google.com”>Go to Google</a>

No plugins, no special tricks needed to put a link to a mail address or external link in your menu bar!

Thanks to Ulysses for the info.

Have fun!