Maris Svirksts

Sandbox for those few moments without coding
Sandbox for those few moments without coding

Archive for the ‘Wordpress Themes’ Category

Unneeded Meta tags in Wordpress

Sometimes in your theme unneeded meta tags show up. They look like

<meta content="noindex,follow" name="robots"/>

or something like this.
I have seen three reasons for this:

Plugin settings. In this case check your plugins, uncheck what's needed. Main plugin candidates: All in One SEO Pack, other seo plugins.

Blog Privacy atributes. In this case go to Settings -> [...]

Wordpress and SimplePie functionality

SimplePie functionality for your blog:

function fetch_feed_modified($url) {
require_once  (ABSPATH . WPINC . '/class-feed.php');
$feed = new SimplePie();
$feed->set_feed_url($url);
$feed->set_cache_class('WP_Feed_Cache');
$feed->set_file_class('WP_SimplePie_File');
$feed->set_cache_duration(apply_filters('wp_feed_cache_transient_lifetime', 43200));
$feed->init();
$feed->handle_content_type();

if ( $feed->error() )
printf ('There was an error while connecting to Feed server, please, try again!');

foreach ($feed->get_items() as $item){
printf('<li><a href="%s">%s</a>',$item->get_permalink(), $item->get_title());
printf(' <small>%s</small></li>',$item->get_date());
}
}

function ms_smallpie_feed($uri) {
if(function_exists('fetch_feed_modified')) [...]

How to add Wordpress sidebar

There comes a time in every Wordpress developer life when he/she needs to add a sidebar. Don't be afraid, my friend! It's not as hard as it sounds like
To get that done you need functions.php and as many sidebar-<something unique>.php files as you many sidebars you want. All tucked inside your theme folder.
They [...]

Dropdown menu

A few days a go I needed to change default Modularity theme dropdown menu from onclick like functionality to onmouseover like functionality.
It was easy. But, the script they use, it didn't work with IE6: I needed to find another way. Now, it is possible to write such script from scratch, but: if there exists an [...]

Search