• xerocool

    (@xerocool)


    Some people use wordpress for tech sites, and stuff like that. For their sources, they all ways put it in the post. Instead of doing that every time, Is it possible to create a plugin that will insert a link field in Admin > Write > Post somewhere under the posting field and in index.php template, you can insert something like: <?php linkurl(); ?> and it will display:

    Visit Site

    I want something like forevergeek.com runs. Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Ming

    (@ming)

    You can use the custom fields feature of WP:
    https://codex.www.ads-software.com/Using_Custom_Fields

    A plugin that works well with custom fields is Coffee2code’s Get Custom Fields:
    https://www.coffee2code.com/archives/2004/06/30/plugin-get-custom/

    Thread Starter xerocool

    (@xerocool)

    Well, I would like a plugin cause I already use a meta and Its showing it so….and the plugin-get-custom looks really hard. I dont think I like it. Sorry.

    Thread Starter xerocool

    (@xerocool)

    Bump. anybody made a similar plugin yet?

    I’m not sure what you’re looking for that isn’t already there…

    You can put into a custom field like “ext_ref”, with content something akin to:
    <a href="https://someurl.to" title="Visit Other Site">Visit Other Site</a>

    Then in index.php, just do a:
    <?php echo get_post_meta($post->ID, 'ext_ref', true); ?>

    (actually, not sure if $post->ID is the right way to get the current post ID, but you get the picture…)

    What more do you want? What else would a plugin provide, other than making the above ‘look’ a teensy bit more clean (but obfuscate the real thing…)?

    -d

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Req] Visit Site Plugin in posts’ is closed to new replies.