• Resolved ataraxia36

    (@ataraxia36)


    First thanx for this great plugin
    I use autolinks on my WP (words typed in the content and custom fields redirect to post with same title) for that i use:
    <?php echo apply_filters(‘the_content’, get_post_meta($post->ID, ‘the_key’, true)); ?>
    My problem, as that’s custom field i have to use
    editable_post_meta( get_the_ID(), ‘the_key’);
    My question, how can I use echo apply_filters(‘the_content’, with editable_post_meta( get_the_ID(), ‘the_key’);
    I tried stuffs like:
    apply_filters(‘the_content’, editable_post_meta( get_the_ID(), ‘the_key’)); etc
    thanx (and sorry for my bad english)

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter ataraxia36

    (@ataraxia36)

    no idea?

    Plugin Author scribu

    (@scribu)

    1. Open the Autolink plugin and find the line that looks like this:

    add_filter( 'the_content', 'you_will_need_this_part' );

    2. Copy that second argument into the following line, which should be put somewhere in your theme’s functions.php file:

    add_filter( 'post_meta', 'you_will_need_this_part' );

    3. Call editable_post_meta() normally.

    Thread Starter ataraxia36

    (@ataraxia36)

    thanx for the response but it doesnt worl for me.
    in fact i’m using “SEO Smart Links” plugin. In the plugin file I have:

    add_filter(‘the_content’, array(&$this, ‘SEOLinks_the_content_filter’));

    So i added in my function.php

    add_filter(‘post_meta’, array(&$this, ‘SEOLinks_the_content_filter’));

    and then in my single.php

    <?php editable_post_meta( get_the_ID(), ‘discographie’); ?>

    But it doesnt work, i got this error:

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘Array’ was given in /homez.85/graphzic/www/xxx/wp-includes/plugin.php on line 166
    [empty]

    Thread Starter ataraxia36

    (@ataraxia36)

    it’s working !
    thank you very much !
    I added the line in the plugin file not in the function.php
    thanx to you !!

    Plugin Author scribu

    (@scribu)

    I added the line in the plugin file not in the function.php

    That works, but you’ll have to do it each time the plugin is updated.

    If you take another look at the plugin, you will find this line:

    $SEOLinks = new SEOLinks();

    That means that the $SEOLinks variable contains the reference we need, which we will use like so:

    add_filter('post_meta', array(&$SEOLinks, 'SEOLinks_the_content_filter'));

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Autolink’ is closed to new replies.