Support » Plugin: All in One SEO Pack » Inser a SQL query in aisseop_class.php

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Peter Baylies

    (@pbaylies)

    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.

    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

    Plugin Contributor Peter Baylies

    (@pbaylies)

    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;
    }

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

    thanks a lot

    Plugin Contributor Peter Baylies

    (@pbaylies)

    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.