WordPress.org

Ready to get started?Download WordPress

Forums

WPtouch Mobile Plugin
[Plugin: WPtouch] Removing excluded categories from mobile feed (2 posts)

  1. Ryan
    Member
    Posted 3 years ago #

    First: absolutely fantastic plugin.

    The one problem I've faced using the non-Pro version is that the category exclude function isn't as robust as (I think) it should be.

    Usually the reason for excluding categories is that certain categories shouldn't be in the regular "flow" of the site. The current function only removes these from the is_home() page -- but they still appear on archive pages and (most essentially) in the feed served up for mobile browsers.

    This is a pretty easy fix, but is going to be annoying having to replace this every time the plugin is upgraded (as the regular plugin doesn't offer any custom themes/functions):

    To fix this I simply opened /wp-content/plugins/wptouch/themes/default/functions.php and changed:

    Ln 14:
    if ( $query->is_home ) {

    To:
    if ( $query->is_home || $query->is_archive || $query->is_feed ) {

    Hope it helps someone else, and would be great to see support for this make its way into the non-Pro plugin. It's not exactly advanced functionality, seems like it was just overlooked.

    Regards,
    Ryan

  2. dalemugford
    Member
    Plugin Contributor

    Posted 3 years ago #

    Great addition!

    Added to the plugin for the next update.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags