Viewing 6 replies - 1 through 6 (of 6 total)
  • shamratdewan,

    I’d recommend against doing this for a number of reasons; what is your goal here, maybe we can find a way to do it that doesn’t involve hacking the plugin, or doing custom SQL queries.

    Thread Starter shamratdewan

    (@shamratdewan)

    hi, well I managed to run the query inside that function. I actually forgot to declar the var. However I also dont want to do that as its just a temporary fix.. I wanted to detect value of a var if yes then the title of that page needs to come from another table. which is running outside wp page or post using old get values on url. However, can you show me a bit details about custom query that can overwrite seo titles or meta values without touching plugin files

    shamratdewan,

    All in One SEO Pack uses the WordPress Plugin API, which means that there are a lot of hooks for this functionality that you should be able to use. For example, you can add a custom title to a post programmatically by using the aioseop_title filter; there are also various filters for meta description, keywords, etc., all usable without having to modify any plugin code. Here’s an example of how this works:

    add_filter('aioseop_title', 'sfwd_custom_title');
    
    function sfwd_custom_title($title) {
       if ( is_category( "CategoryName" ) ) {
            $title = "Custom Category Title";
       } elseif ( is_category( "CategoryName2" ) ) {
            $title = "Custom Category Title 2";
       }
       return $title;
    }
    Thread Starter shamratdewan

    (@shamratdewan)

    that looks nice I will try this first thing tomorrow morning. ..

    Thread Starter shamratdewan

    (@shamratdewan)

    thanks a lot

    No problem; good luck with it, let me know how it goes!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Inser a SQL query in aisseop_class.php’ is closed to new replies.