Support » Plugin: All in One SEO Pack » apply_filters aioseop_description

  • Resolved RichTWebGuy

    (@richtwebguy)



    apply_filters aioseop_description
    is gone from get_main_description
    by design?

    I was filtering the description previously

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author wpsmort

    (@wpsmort)

    Please provide the full code you are using to filter aioseop_description.

    Basically I’m doing something like this

    function MySeoDescr ($descr)
    {
        $descr = 'new description';
        return $descr;
    }
    add_filter ('aioseop_description', 'MySeoDescr', 1);

    After a recent update, it doesn’t seem to get called anymore.

    Plugin Author wpsmort

    (@wpsmort)

    I just tested that code on a new site with the latest version of All in One SEO Pack and the default Twenty Seventeen theme and it worked fine. It output this:

    <meta name="description" content="new description" />

    Plugin Author Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    @richtwebguy

    What page is it not working on? Also, is there a meta description at all for that page? Do you have a manually entered one?

    The website in question is under local development and not publicly accessible.. It just seemed that it stopped working all of the sudden. I’ll double check things on my end. I wanted to verify that that the change to “get_main_description” made sense.

    If I drop back to 2.4.3.1 filter works. Interestingly, the og:description and twitter:description get filtered. meta name=”description” does not.

    Things are a bit hectic now. Using 2.4.3.1 will work until I can pursue this more.

    Thanks

    • This reply was modified 10 months, 1 week ago by  RichTWebGuy.
    Plugin Author Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    @richtwebguy It would be very helpful if you can tell me a big more about your situation.

    Did you manually enter a meta description for that page in addition to the filter?
    What should the filter do exactly?

    This setup is a little complex so I hesitated to get too deep 🙂

    I have a wordpress page that is used as a template. WP rewrite rules are used to generate some dynamic pages which will use this template.

    The page content would have placeholders in it, say {product} that would be replaced on the fly. So I figured I could do the same with title and description. So the AIOSEO box under the content textarea has things like: “Learn more about {product} and so on”.

    So I did

    add_filter ('aioseop_title', 'twdWpseoTitle', 1);
    add_filter ('aioseop_description', 'twdWpseoDescr', 1);

    so I could make the same replacements as I do to the content.

    With AIOSEO 2.4.4 the {product} placeholder is still present as it seems my filter isn’t called. Which brings us back to the original question: I believe “apply_filters aioseop_description” was removed from get_main_description. And does this make sense.

    HTH

    Plugin Author Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    We’re used to complex setups. AIOSEOP rarely has any problems on non-complex setups. It’s the non-standard things we want to know about the most. 🙂

    Yes, it makes perfect sense. Thank you. We’ll have this resolved in the next release, hopefully within the next few days.

    Thanks for looking into this !!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘apply_filters aioseop_description’ is closed to new replies.