Srilatha Marru's Blog
WordPress Events Manager – Get the ical file per category

I am using the wordpress plugin Events Manager http://wp-events-plugin.com/ It had features to download the ical files for an individual event and all the events on the site. Both of these can be achieved with below urls:

http://example.com/events.ics – This url gets the ical file with all the events on the site.
http://example.com/event//ical – This gets an ical for an individual event.

And I want to get the ical file per category.

To get the ical file per category below are the steps to follow:

  1. Modify the ical template templates/ical.php and add a search attribute e.g. ‘category’=>’7′

    http://wp-events-plugin.com/documentation/using-template-files/

    http://wp-events-plugin.com/documentation/event-search-attributes/

  2. To get the category ID I used the following code:

    $uri=$_SERVER['REQUEST_URI'];
    $args=explode('/',$uri);

    /* Get the category ID */
    if($args[1]=='events' && $args[2]=='categories') { $cat_name=$args[3]; $cat_obj=get_term_by('name', $cat_name , 'event-categories'); $cat_id=$cat_obj->term_id; }

  3. The url for the ical file per category will be http://example.com/events/categories//events.ics

I hope this will save some time for you!

Srilatha Marru's Blog
What To Do when Images Don’t Appear in your RSS Feed

One of the quirky little annoying things about WordPress is that it sometimes (or maybe always) uses relative image links in its RSS feed. What this means is that, when you put an image in an article, the link says, “Hey, article, just look for this image in this specific directory, relative to this article. In other words, if your image is in the directory, “http://www.mywordpressblog.com/images/image.jpg ,” then WordPress might automatically set the link to that image relative to your domain. In other words, instead of giving the entire URL, it might do something like this”…/…/images/image.jpg .” Now this works great in terms of your article, which resides in a fixed location in the database on your server. But for an RSS feed, it doesn’t know what the relative link is relative to, and therefore, it returns nothing to your readers.  So, try to use the absolute url for images instead of relative paths.

More about this can be found at this article http://www.mytechtool.com/eliminating-relative-link-errors-what-do-you-do-when-images-dont-appear-in-your-rss-feed/

Srilatha Marru's Blog
Show protected tweets on your WordPress site!

I protect my twitter account to save myself from email spam of requests through twitter. And hence my tweets are private too and not public. I have been looking for wordpress plugins to display the protected tweets and Twitter Stream wordpress plugin came at the right time. It allows to you display the protected tweets on your site.

But please make sure you have installed latest WordPress version(currently its 2.9.2) for this plugin to work.

Some other good features about this plugin are that it caches the tweets in local file system. So the tweet cache is used when the twitter API requests exceeds the limit. The default rate limit for calls to the REST API is 150 requests per hour.

There you go you got the latest protected tweets!

Srilatha Marru's Blog
Useful WordPress Plugins

I have been using wordpress lately for most of the blog websites I am building. The some of useful plugins in building basic theme blogs have been:

1. Page order: This plugin allows you to change page order display on the navigation bar. You can find the plugin at WordPress Page Order

2. Askimet: Askimet plugin is used to block spam comments on your blog post. It is activated by default from wordpress 2.0. If it is not shipped along with your wordpress download then you can download it at WordPress Askimet

3. Multi author comment notifications: When a comment is posted by a user, this plugin is used to send approval notifications to selected authors/users of the blog. Usually, user comment notifications are only sent to author of the post for moderating comments. This plugin facilitates selected users to moderate the comments. This plugin is useful feature when there are multiple moderators for a blog. You can find the plugin at: WordPress Multi author comment notifications

4. Different posts per page: “Different Posts Per Page” plugin will allow you to modify the number of posts shown in home, category, archive or search page. You can even set the order of posts by ascending or descending order. You can find the plugin at: WordPress Different Posts per Page

5. Contact Form:Contact forms plugin is set up to ask questions on the siteWordPress Contact Form

6. Domain Theme:Domain Theme allows you to specify more then one domain name with your WordPress installation and optionally associate a specific theme for each domain. This enables you to present your site under multiple domain names. Ex: http://oliverrogers.com/ and http://www.thefaithofchrist.com/ WordPress Domain Theme

7. Google xml sitemap: This plugin will create a Google sitemaps compliant XML-Sitemap of your WordPress blog. It supports all of the WordPress generated pages as well as custom ones. Everytime you edit or create a post, your sitemap is updated and all major search engines that support the sitemap protocol, like ASK.com, Google, MSN Search and YAHOO, are notified about the update. WordPress Google Sitemap Generator

Srilatha Marru's Blog
WordPress 2.8 tinymce editor

I have upgraded my blog to wordpress 2.8.1.   And the tinymce ediotor got disabled.  Here the solution to enable tinymce agian:

  1. Delete the wp-admin and wp-includes folders.
  2. Get the old verison (2.8 ) version wp-admin and wp-includes folders.

And there you go. The tinymce is enabled agian.



AUTHOR

profileWeb Developer working in advertising agency.

Recent tweets

The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.