Posts tagged wordpress

wordpress-logo

JQuery Bermasalah di WordPress versi 3.2 ke atas (Terbaru)

2

Jika Anda memiliki situs berbasis wordpress dan setelah upgrade ke versi 3.2.1 atau lebih (saat ini versi 3.3.1), beberapa plugin dan tampilan terkadang tidak berjalan sebagai mana mestinya alias bermasalah. Hal tersebut juga saya alami di situs ini, dan beberapa situs saya yang lain. Permasalahan yang muncul antara lain slider yang ada di themes jadi tidak jalan, menu admin pada dashboard sebelah kiri menjadi tidak berjalan, dropdown menu yang menggunakan JQuery menjadi tidak berjalan seperti biasa, dan lain-lain.

Bagaimana solusinya? Di postingan ini, dibahas salah satu solusi yang sudah saya coba dan berhasil. Solusi tersebut didasarkan pada postingan dari salah satu tulisan Velli Darman Domo di situsnya.

(more…)

Popularity: 6% [?]

Free HTML5/CSS3 WordPress 3.1+ Theme With Responsive Layout: Yoko

In this post we are glad to present to you yet another freebie: a responsive WordPress theme Yoko which was designed by talented designers Ellen and Manuel from Elmastudio and released for the Web design community. Of course, the theme is absolutely free to use in private as well as commercial projects.

Yoko is a modern and flexible WordPress theme. With the responsive layout based on CSS3 media queries, the theme adjusts to different screen sizes. The design is optimized for big desktop screens, tablets and small smartphone screens. To make your blog more individual, you can use the new post formats (like gallery, aside or quote), choose your own logo and header image, customize the background and link color.

Release in Free HTML5/CSS3 WordPress 3.1+ Theme With Responsive Layout: Yoko

Download the Theme for Free!

The theme is released under GPL. You can use it for all your projects for free and without any restrictions. Please link to this article if you want to spread the word. You may modify the theme as you wish.

Preview in Free HTML5/CSS3 WordPress 3.1+ Theme With Responsive Layout: Yoko

Features

The theme requires WordPress 3.1+ to run. It has following features:

  • Cross-browser compatible (tested in Chrome, Firefox, Safari, Internet Explorer 8+)
  • HTML5 (with fallback for IE < 9) and CSS3
  • Responsive layout (CSS3 media queries, not supported in IE < 9, but you can use libraries like Respond.js by Scott Jehl or CSS3-Mediaqueries-js by Wouter van der Graaf to make it work in older versions of IE.)
  • WordPress post formats (aside, gallery, image, video, link and quote)
  • Theme options page, custom background, custom header image
  • Optional sub menu
  • A custom social links widget to promote your RSS-Feed, Facebook, Twitter, Flickr, Vimeo, LinkedIn or Delicious profile
  • Full-width page template
  • Google Web fonts in use (Droid Sans and Droid Serif)
  • Threaded comments with Gravatar support
  • Shortcodes for multiple columns, info boxes in three colors and highlighted text
  • Currently available in English, German and French.

Screenshots

Three-column-layout in Free HTML5/CSS3 WordPress 3.1+ Theme With Responsive Layout: Yoko
Three-Column-Layout.

Two-column-layout in Free HTML5/CSS3 WordPress 3.1+ Theme With Responsive Layout: Yoko
Two-Column-Layout.

One-column-layout in Free HTML5/CSS3 WordPress 3.1+ Theme With Responsive Layout: Yoko
One-Column-Layout.

Comments in Free HTML5/CSS3 WordPress 3.1+ Theme With Responsive Layout: Yoko
Comments area.

Customheader in Free HTML5/CSS3 WordPress 3.1+ Theme With Responsive Layout: Yoko
Custom Header.

Post-format-gallery in Free HTML5/CSS3 WordPress 3.1+ Theme With Responsive Layout: Yoko
Post Format Gallery.

Themeoptions in Free HTML5/CSS3 WordPress 3.1+ Theme With Responsive Layout: Yoko
Theme Options.

Behind the Design

As always, here are some insights from the designers:

“Since the mobile Web is getting more and more popular every day, we think that it’s also time for WordPress themes to become more flexible and adapt to different devices and screen sizes. While designing the Yoko theme, our goal was to create a minimalistic design with focus on content and good readability on various devices. Also we wanted the theme to be easy to use and customizable for everybody, so we kept the theme options simple while still including the most important options to add a personal style to the theme.

The main problem to solve during the design and development process was to make sure that all the different contents and plugins that people will use still work in the responsive layout. Of course the responsive design approach is still in development but we think it’s a lot of fun to explore new possibilities and as doing so make Web design and WordPress themes more powerful and flexible to use.”

Thank you, Ellen and Manuel! We sincerely appreciate your work and your good intentions!


© Smashing Editorial for Smashing Magazine, 2011. | Permalink | Post a comment | Smashing Shop | Smashing Network | About Us
Post tags: , ,

Free WordPress 3.1 Theme: Splendio (With PSD Sources)

Today, we are glad to present a new freebie: a beautiful theme, designed by Vlad and Elena Scanteie which was developed exclusively for Smashing Magazine and its readers. As usual, the theme is free to use in both private and commercial projects. The theme is based upon the Twenty Ten WordPress theme and requires WordPress 3.0 to run.

Release in Free WordPress 3.1 Theme: Splendio (With PSD Sources)
Visit the demo or a large view.

The upper area contains a slider where you can place extra emphasis on your most important pages. The main area can include the content of your latest blog posts. On the right side you’ll find an overview of latest blog entries as well as the latest tweets.

The upper area of the sidebar features five latest comments. You can place any widget under it as it is defined as a dynamic sidebar. Also, right above the footer you’ll find a Flickr gallery in case you wish to showcase your latest shots. The footer itself is designed in a pronounced blue, giving it a nice contrast to the rest of the design. There you you can place your≈ widgets such as Pages, Categories, Archives, and others. A soft upper area, a useful middle area, and a strong footer are the essence of this theme.

Download the Theme for Free!

The theme is released under GPL. You can use it for all your projects for free and without any restrictions. Please link to this article if you want to spread the word. You may modify the theme as you wish.

Spl1 in Free WordPress 3.1 Theme: Splendio (With PSD Sources)

Screenshots

Spl2 in Free WordPress 3.1 Theme: Splendio (With PSD Sources)
The footer area.

Spl3 in Free WordPress 3.1 Theme: Splendio (With PSD Sources)
Main content area.

Spl4 in Free WordPress 3.1 Theme: Splendio (With PSD Sources)
The comments area.

Behind the Design

As always, here are some insights from the designer:

“Releasing a theme on Smashing Magazine is always a challenge for us at DesignDisease. A challenge we look forward to. ‘Splendio’ is a theme where we try to solve the empty space that exists around most themes with a joyful rhythm of lines and squares, complimented with a light color palette. The specialized header images complete the package, as it can be used both in a static or randomized manner.”

Thank you, Vlad and Elena! We sincerely appreciate your work and your good intentions.


© Smashing Editorial for Smashing Magazine, 2011. | Permalink | Post a comment | Smashing Shop | Smashing Network | About Us
Post tags: ,

New WordPress Power Tips For Template Developers And Consultants

It has been a big year for WordPress. If there were still some lingering doubts about its potency as a full-fledged content management system, then the full support for custom taxonomies and custom post types in WordPress 3.0 core should have put them to rest. WordPress 3.1 took those leaps one step further, polishing custom taxonomies with multi-taxonomy query support, polishing custom post types with native template support for archives and feeds, and introducing features (like the “admin bar”) that make it easier to quickly edit and add content from the front end.

In the broader community, we’ve seen incredible plug-in suites such as BuddyPress mature, and even the emergence of independent WordPress-dedicated hosting services, such as page.ly. To celebrate WordPress’s progress, let’s review some new tips that can help template developers and consultants up their game even further.

Foreword for New Developers: What is a “Hook”?

Most of these tips take advantage of core WordPress “hooks.” Hooks are points in the code that allow any number of outside functions to “hook in” and intercept the code in order to add to or modify behavior at a particular point. Hooks are the fundamental concept that enables virtually all plug-ins. WordPress has two kinds of hooks: actions and filters.

Action hooks are intended to allow developers to intercept certain activities and execute some additional functionality. For instance, when a new post is published, the developer may want to add some extra functionality, such as posting the title and a link to Twitter.

Filter hooks allow the developer to intercept and modify data that is being processed by WordPress for display or saving. For instance, the developer may want to inject an advertisement into the content before displaying the post on the screen.

Learn more about hooks on the official WordPress codex.

The Underused Pagination Function

Many great plug-ins are in the official WordPress repository. But using fancy plug-ins to add fairly basic functionality to your theme is often like driving a tractor trailer to go around the block. There’s usually a lighter, smarter way: a bike or even a car. And while plug-ins are a fine solution for consultants who are staging a complete roll-out, they’re awkward solutions for theme developers who want to sell standalone templates.

WP-PageNavi is one of the most popular WordPress plug-ins; and no doubt it is well developed. It is ideal for those who are uncomfortable digging into WordPress code. But did you know that WordPress has a function built right into core that (with a bit of savvy about its parameters) can generate pagination links for everything from comments to post archives to post pages?

The function in question is paginate_links(). (For those who like to fish around in the source, it’s on line 1954 of general-template.php in the wp-includes folder as of WordPress 3.1.) Believe it or not, this underused function has been around since 2.1. Another function, paginate_comment_links(), is actually a wrapper for this function that is designed specifically for paging comments, and it has been around since 2.7.

The function takes an array of parameters that make it versatile enough to use for any kind of paging:

  • base
    This is the path for the page number links, not including the pagination-specific part of the URL. The characters %_% will be substituted in that URL for the page-specific part of the URL.
  • format
    This is the “page” part of the URL. %#% is substituted for the page number. For example, page/%#% or ?page=%#%.
  • total
    The total number of pages available.
  • current
    The current page number.
  • show_all
    Lists all page links, instead of limiting it to a certain number of links to the left and right of the current page.
  • prev_next
    Includes the “Previous” and “Next” links (if applicable), just as you might normally do with the previous_posts_link() function.
  • prev_text and next_text
    Text to put inside the “Previous” and “Next” links.
  • end_size
    The number of page links to show at the end. Defaults to 1 (e.g. 1 2 3 … 10).
  • mid_size­
    The number of pages to show on either side of the current page. Defaults to 2 (example: 1 … 3 4 5 6 7 … 10).
  • type
    Allows you to specify an output style. The default is “plain,” which is just a string of links. Can also be set to list (i.e. ul and li representation of links) and array (i.e. returns an array of page links to be potentially outputted any way you like in code).
  • You can also add query arguments and fragments.

Because the function takes all of the information needed to generate page links, you can use it for pretty much any pagination list, as long as you have some key information, such as the number of pages and the current page. Let’s use this function to generate pagination links for an article archive such as a category or main post index:

// get total number of pages
global $wp_query;
$total = $wp_query->max_num_pages;
// only bother with the rest if we have more than 1 page!
if ( $total > 1 )  {
     // get the current page
     if ( !$current_page = get_query_var('paged') )
          $current_page = 1;
     // structure of “format” depends on whether we’re using pretty permalinks
     $format = empty( get_option('permalink_structure') ) ? '&page=%#%' : 'page/%#%/';
     echo paginate_links(array(
          'base' => get_pagenum_link(1) . '%_%',
          'format' => $format,
          'current' => $current_page,
          'total' => $total,
          'mid_size' => 4,
          'type' => 'list'
     ));
}

Here’s the HTML generated by that code on the first of 10 posts pages:

<ul class='page-numbers'>
     <li><span class='page-numbers current'>1</span></li>
     <li><a class='page-numbers' href='http://mysite.com/page/2/'>2</a></li>
     <li><a class='page-numbers' href='http://mysite.com/page/3/'>3</a></li>
     <li><a class='page-numbers' href='http://mysite.com/page/4/'>4</a></li> 
     <li><a class='page-numbers' href='http://mysite.com/page/5/'>5</a></li>
     <li><span class='page-numbers dots'>...</span></li>
     <li><a class='page-numbers' href='http://mysite.com/page/10/'>10</a></li>
     <li><a class='next page-numbers' href='http://mysite.com/page/2/'>Next &raquo;</a></li>

</ul>

Here’s a screenshot of the pagination on m62 visualcommunications, built using the em>paginate_links function.

M62-pages in New WordPress Power Tips For Template Developers And Consultants

“I Wish Posts Were Called Articles For My Client.”

Have you ever wished you could change the wording of a built-in menu item or notification? If you’re a bit WordPress-savvy, you may have considered generating your own translations file. But you might not know that you can actually “hook” the translation functions in WordPress, capturing their input and modifying their output.

Be careful with this one. The code you put in this hook will run every time WordPress runs a string through its translation filters. Complex cases and conditionals could add a considerable amount of overhead, especially when loading pages filled with translation strings, such as the administrative pages. But if you just want to rename one thing that confuses your client (for example, maybe changing “Posts” to “Articles” for that corporate client who doesn’t “blog” yet), then these hooks can be very handy.

// hook the translation filters
add_filter(  'gettext',  'change_post_to_article'  );
add_filter(  'ngettext',  'change_post_to_article'  );

function change_post_to_article( $translated ) {
     $translated = str_ireplace(  'Post',  'Article',  $translated );  // ireplace is PHP5 only
     return $translated;
}

Translations in New WordPress Power Tips For Template Developers And Consultants

Redirect Failed Log-Ins

Adding a log-in form to the front end of WordPress is pretty easy. WordPress 3.0 gave us the flexible wp_login_form() function, which displays a log-in form that can be customized with a number of arguments. By default, it will redirect the user back to the current page upon successful authentication, but we can also customize the redirect location.

wp_login_form(array( 'redirect' => site_url() ));  // will redirect back to the website’s home page

There’s just one problem: it will only redirect upon successful authentication! If your idea was to hide the default WordPress log-in screen, then sending users who fail at a log-in attempt back to the default log-in screen probably isn’t ideal. Here’s a hook and some code that you can put in your functions.php file that will redirect failed log=ins to any location of your choosing.

add_action( 'wp_login_failed', 'my_front_end_login_fail' );  // hook failed login

function my_front_end_login_fail( $username ) {
     $referrer = $_SERVER['HTTP_REFERER'];  // where did the post submission come from?
     // if there's a valid referrer, and it's not the default log-in screen
     if ( !empty($referrer) && !strstr($referrer,'wp-login') && !strstr($referrer,'wp-admin') ) {
          wp_redirect( $referrer . '?login=failed' );  // let's append some information (login=failed) to the URL for the theme to use
          exit;
     }
}

Adding Excerpts to Pages

With the addition of support for custom post types, content types (including the built-in Post and Page types) are more like abstract objects. Each content type can support any number of core features, such as the HTML editor, titles, featured images and so forth. One of these core features is the “excerpt.” By default, Pages do not support excerpts. Did you know that adding excerpt support to the built-in Page type is as simple as adding a single line of code?

add_action( 'init', 'my_add_excerpts_to_pages' );
function my_add_excerpts_to_pages() {
     add_post_type_support( 'page', 'excerpt' );
}

Technically, that was a couple of lines of code, but many themes already hook init, so the hook might not be necessary.

Page-excerpt in New WordPress Power Tips For Template Developers And Consultants

Add Body Classes Based on Special Conditions

If a theme is well constructed, then it would use the body_class() function to automatically generate classes for the body tag based on the properties of the page being viewed, like category, category-3, and logged-in.

Some websites may have sections that should share some styling but aren’t unified by any of the default classes generated by body_class. Say we want page ID 7, category ID 5 and the archive for the tag neat to share the body class neat-stuff, so that we can add a number of styling properties to them all without cluttering the style sheet.

Body-neat-stuff in New WordPress Power Tips For Template Developers And Consultants

Luckily, we can hook the body_class() output!

add_filter( 'body_class', 'my_neat_body_class');
function my_neat_body_class( $classes ) {
     if ( is_page(7) || is_category(5) || is_tag('neat') )
          $classes[] = 'neat-stuff';

     return $classes; 
}

“You Can Have Settings Access, But Don’t Say We Didn’t Warn You!”

Clients often expect full administrative access (and rightly so), including access to settings pages. Let’s look at how we can hook admin “notices” (those warning boxes generated by some plug-ins) to send some warnings to administrative users when they are on settings pages.

add_action( 'admin_notices', 'my_admin_notice' );
function my_admin_notice(){
     global $current_screen;</div>
     if ( $current_screen->parent_base == 'options-general' )
          echo '<div><p>Warning - changing settings on these pages may cause problems with your website’s design!</p></div>';
}

Warning-settings in New WordPress Power Tips For Template Developers And Consultants

Remove the “Links” Menu Item

With WordPress increasingly being used for full website implementations, the blog roll and links feature is being used less and less. Thankfully, a new, little-known function added in WordPress 3.1 makes it very easy to remove unwanted menu items such as “Links.”

add_action( 'admin_menu', 'my_admin_menu' );

function my_admin_menu() {
     remove_menu_page('link-manager.php');
}

No-links in New WordPress Power Tips For Template Developers And Consultants

Take Out the Dashboard News Feeds… and Add a New One of Your Own

If you build WordPress websites for clients, then the number of WordPress news feeds loaded by default in the dashboard might be an annoyance. If you’re clever, you might just inject some of your own client’s news.

add_action('wp_dashboard_setup', 'my_dashboard_widgets');
function my_dashboard_widgets() {
     global $wp_meta_boxes;
     // remove unnecessary widgets
     // var_dump( $wp_meta_boxes['dashboard'] ); // use to get all the widget IDs
     unset(
          $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'],
          $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'],
          $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']
     );
     // add a custom dashboard widget
     wp_add_dashboard_widget( 'dashboard_custom_feed', 'News from 10up', 'dashboard_custom_feed_output' ); //add new RSS feed output
}
function dashboard_custom_feed_output() {
     echo '<div class="rss-widget">';
     wp_widget_rss_output(array(
          'url' => 'http://www.get10up.com/feed',
          'title' => 'What\'s up at 10up',
          'items' => 2,
          'show_summary' => 1,
          'show_author' => 0,
          'show_date' => 1 
     ));
     echo "</div>";
}

10up-news in New WordPress Power Tips For Template Developers And Consultants

Add Your Own Credits to the Administrative Footer

If you build WordPress websites for clients, then you should certainly make sure that WordPress gets its due. It wouldn’t hurt to sneak in a little credit to your agency either.

add_filter( 'admin_footer_text', 'my_admin_footer_text' );
function my_admin_footer_text( $default_text ) {
     return '<span id="footer-thankyou">Website managed by <a href="http://www.get10up.com">10up</a><span> | Powered by <a href="http://www.wordpress.org">WordPress</a>';
}

Admin-footer in New WordPress Power Tips For Template Developers And Consultants

Further Reading

Here are more tips for developers who build websites for clients:

More WordPress power tips from Smashing Magazine:

(al) (il)


© Jacob Goldman for Smashing Magazine, 2011. | Permalink | Post a comment | Smashing Shop | Smashing Network | About Us
Post tags:

Elastic: Visual Theme Editor untuk WordPress

2

Elastic pertama kali lahir dalam Google Summer Code 2009, tetapi masih terus dikembangkan setelah acara tersebut selesai. Elastic adalah theme editor visual dan theme engine untuk WordPress. Bagi Anda yang kurang mengerti atau kesulitan dalam mengedit maupun membuat theme WordPress, tools ini akan sangat berguna. Elastic memang dirancang semudah mungkin. Untuk membuat theme kita hanya perlu beberapa menit saja, karena tinggal drag-and-setting komponen-komponen yang diinginkan. Penasaran ingin mencobanya, silahkan download plugin ini dan install di WordPress Anda sendiri.

Saat ini memang Elastic masih berupa plugin WordPress, namun ada kemungkinan ke depannya akan diadaptasi oleh WordPress menjadi bagian dari file inti (core) WordPress.

Berikut ini video tutorial penggunaan Elastic dan beberapa presentasi yang menjelaskan cara kerja dan penggunaan Elastic. Semoga bermanfaat.

Elastic: One-Minute WordPress Theme

Elastic Overview: WordCamp NYC 2009 Lightning Round

Elastic: Why WYSIWYG is the future of WordPress themes — WordCamp NYC 2009

Popularity: 1% [?]

Smush.It

Optimasi Image Website dengan Smush.It

5

Smush.ItImage atau gambar merupakan salah satu komponen web yang tidak terpisahkan dari suatu halaman web (website). Keberadaan image akan menjadikan website lebih menarik, terutama dari sisi tampilan. Di dalam isi atau content suatu website, image juga sering digunakan sebagai cara untuk memberikan gambaran dari suatu maksud dan juga akan lebih menarik pengunjung untuk membaca keseluruhan content website. Di samping keuntungan penggunaan image di halaman web tersebut, kita juga harus bijaksana dan selektif jika akan menampilkan image di halaman web, karena image akan sangat mempengaruhi performa website. Semakin banyak image yang digunakan dalam suatu halaman web, maka dari sisi performa, terutama kecepatan akses halaman tersebut, akan semakin berkurang. Lalu bagaimana dengan suatu situs yang memiliki content utama berupa image, seperti situs album foto online? Bagaimana melakukan optimasi terhadap image di dalamnya?

(more…)

Popularity: 1% [?]

wp-logo

Visual Editor di WordPress Bermasalah !?

4

wp-logoSeperti kita ketahui bersama, bahwa WordPress sebagai salah satu blog-engine yang paling populer saat ini menyediakan fitur visual text editor di dalam form postingnya. WordPress menggunakan visual text editor TinyMCE. Fitur ini sangat berguna bagi kita, termasuk saya, untuk mempermudah dan mempercepat dalam menambahkan posting blog kita. Kita dapat dengan mudah menambahkan link, mengatur ukuran huruf, jenis huruf, menambahkan gambar, mengatur warna, mengatur perataan, bullet and numbering dan sebagainya.

Lalu apa jadinya jika fitur visual text editor tersebut bermasalah alias ga muncul?? Tentu akan merepotkan kita, apalagi bagi kita yang awam dengan code atau perintah HTML. Hal tersebut juga sempat saya alami beberapa waktu terakhir. Semula saya berasumsi bahwa browser di komputer saya yang bermasalah, namun ternyata berdasarkan informasi dari sahabat saya yang juga mengalami hal yang sama, ternyata masalah terjadi di semua browser dan semua komputer juga. Kalo begitu, masalahnya ada di program atau wordpress sendiri donk. Itu kesimpulan sementara saya.

(more…)

Popularity: 2% [?]

Yang Baru di WordPress 2.3

3

Kemarin saya baru sempat meng-upgrade wordpress saya dari versi 2.1 menjadi 2.3.3. Itupun saya lakukan lewat cara upgrade manual, karena saya coba upgrade lewat fantastico di Cpanel gagal. Sempet terjadi error saat proses upgrade, tapi akhirnya berhasil juga.

Ternyata, ada banyak perubahan di wordpress 2.3. Berikut ini beberapa fitur baru di wordpress 2.3 :

(more…)

Popularity: 1% [?]

WordPress Multi Language

2

This morning, i have an idea. I want to make this site as a multilanguages site. So, i searching for some [[idWikipedia:wordpress]] plugins. There are a lot of plugins. I am trying to select it. And i get this one.

I want to download it, but… it’s so annoying. Admin rulez… [[idWikipedia:Download]] had been disabled by administrator. Ugh…. sabar-sabar… ;)

Popularity: 1% [?]

4 Tips untuk Mempercepat WordPress Anda

13

Beberapa blog wordpress kita terkadang terasa lambat, terutama jika traffic-nya lagi banyak. Itu bisa terjadi mungkin karena tempat hostingnya yang lambat, koneksi internet yang dipake sama client yang lambat, atau bisa juga karena kesalahan dan kekurang-efektifan coding wordpress kita.

Berikut ini beberapa tips untuk lebih meng-optimalkan kinerja blog wordpress kita :

(more…)

Popularity: 1% [?]

Go to Top