SEO Auto Linker
[resolved] SEO Auto Linker for custom fields (3 posts)

  1. sigsol
    Posted 4 years ago #

    Is it possible to have the plugin scan custom fields?
    I am using custom fields a lot for my site, most of the text comes from them.


  2. chrisguitarguy
    Plugin Author

    Posted 4 years ago #

    It's very possible, but it's not something that's going to go into the plugin because it would very implementations specific.

    But here's a few ways you could do it. Where ever you use/echo out get_post_meta, run it through a filter:

    <?php echo apply_filters( 'add_seo_auto_linker', get_post_meta( $post->ID, 'testing', true) ); ?>

    Then you can hook into that filter in functions.php and run the content through the auto linking filter:

    add_filter( 'add_seo_auto_linker', 'cd_wpforum_test' );
    function cd_wpforum_test( $content )
        return pmgSeoAutoLinkerFront::content( $content );
  3. imarap
    Posted 3 years ago #

    Hi, I know this post was already marked as resolved, but I need to use SEO Auto Linker with custom fields and I cannot make it work.

    I have tried your solution, however when I insert your code in a page template, the page cannot be displayed.

    I use both the advanced custom fields and the wordpress meta fields, none of them worked.

    <?php echo apply_filters( 'add_seo_auto_linker', get_field( 'field_name', $post->ID ) ); ?>

    <?php echo apply_filters( 'add_seo_auto_linker', get_post_meta( $post->ID, 'field_name', true) ); ?>

    Any ideas? Thanks for your time.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • SEO Auto Linker
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic