Posts tagged as:

Wordpress

Boris Terziev is a Bulgarian professional photographer and we have created his new  portfolio at boristerziev.com

{ 0 comments }

First lets install some plugin to show the latest tweets in wordpress. The plugin that I used is this one: http://wordpress.org/extend/plugins/twitter-for-wordpress/

You can use any plugin.

Install and put the widget in some position.

Here is an example of the output needed for the jQuery to work correctly:

<div>
    <p>A tweet is here</p>
    <p>Another tweet here</p>
    <!-- cont... -->
</div>

Read more…

{ 0 comments }

A great plugin to add a sitemap to your WordPress site – HTML Page Sitemap

The only limitation is that it shows only pages, not posts.

{ 0 comments }

In wordpress 3.0 and above there is a nice build in menu. To create a drop down menu using this menu system follow there articles:

http://new2wp.com/pro/jquery-drop-down-menu-wordpress-3-menu/

http://wphacks.com/top-5-wordpress-navigation-menu-tutorials/

This is the main code in the CSS to achive the result:

#menu-header ul ul {
	display: none; /* For testing, change to display: block; */
	list-style:none;
	z-index:100;
}
#menu-header ul li:hover > ul {
	display: block;
}

{ 1 comment }

To do this add another page template in your theme’s folder.

You could create a Page (Write > Write Page) called…,  that just uses a custom Page template implementing query_posts().

I do something similar on my site but don’t list every post! Just the categories with description and such. However, one can combine the idea of a Category Page with what I do on my ‘Archive’ Page:

Sometimes the  function wp_query(); brakes the pagination, so if this hapens use this code insted:

<?php $limit = get_option('posts_per_page'); 
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; 
query_posts('showposts=' . $limit . '&paged=' . $paged); 
$wp_query->is_archive = true; 
$wp_query->is_home = false; ?>

Notes:

$limit is assigned the ‘posts_per_page’ option from your WordPress settings, but can be changed to something else if you like:

$limit = 20;

These:

$wp_query->is_archive = true; $wp_query->is_home = false;

after the query_posts() are important as they force posts_nav_link() (and so pagination) to work, along with a few other helpful results gained for fooling WordPress into thinking we’re in the archive pages.

For the $paged stuff, see:
http://wordpress.org/support/topic/57912#post-312858

For more info: http://wordpress.org/support/topic/querying-all-posts

{ 0 comments }

One plugin which I found: http://wordpress.org/extend/plugins/widget-context/

{ 0 comments }

Create a php file with some unique name (like snarfer.php) and put it in your WordPress theme directory.

This is the way you create a WordPress Page templates:

<?php
/*
Template Name: Snarfer
*/

Read more…

{ 0 comments }

In some versions of WordPress there is a filter that strips some tags from the html code. If you want to remove this filter just open wp-includes/kses.php and find this row:

function kses_init_filters() {
    // Normal filtering.
    add_filter('pre_comment_content', 'wp_filter_kses');
    add_filter('title_save_pre', 'wp_filter_kses');

    // Post filtering
    add_filter('content_save_pre', 'wp_filter_post_kses');
    add_filter('excerpt_save_pre', 'wp_filter_post_kses');
    add_filter('content_filtered_save_pre', 'wp_filter_post_kses');
}

and comment out the rows that you need:

function kses_init_filters() {
    // Normal filtering.
    add_filter('pre_comment_content', 'wp_filter_kses');
    add_filter('title_save_pre', 'wp_filter_kses');

    // Post filtering
    //add_filter('content_save_pre', 'wp_filter_post_kses');
    add_filter('excerpt_save_pre', 'wp_filter_post_kses');
    //add_filter('content_filtered_save_pre', 'wp_filter_post_kses');
}

Then if you save the post in html it’s OK, but if you switch to normal view and then go back to html view the tags could be stripped again. This hapens most likely from the MCE Editor and to resolve this issue you could install a plugin called TinyMCE Valid Elements or some similar plugin.

{ 1 comment }

To begin the tutorial, extract your theme into a folder and open it to see all the files. If your theme has only one sidebar, then most probably you will NOT find a file called functions.php in your theme folder. In that case you will have to create this file yourself. Just open notepad or any other code editor to start a new file. Put this code into that file:

Read more…

{ 10 comments }

I had a problem. I couldn’t change the category slug in some of my categories. So I found the solution at:

http://wordpress.org/support/topic/category-slug-cant-be-updated

The problem comes from the fact that the tags and categories are stored in the same table in the database. And the tags also have slugs. So if there is already a tag with the slug that you want to put in the category you can’t do it until you delete the tag or change it’s slug.

You just need to go to the tags table in the admin panel and change the tag slug that’s making the problem.

{ 1 comment }