WordPress.org

Ready to get started?Download WordPress

Forums

[...] Please help. (11 posts)

  1. Konziner
    Member
    Posted 6 years ago #

    Hello,

    For about 3 or 4 days now i have been trying to figure out how to use the featured post plugin. I am not sure what I am doing wrong, I was wondering if anyonbe knew how to call the function and also how to set it up? Just an example code will be fine. Thanks.

  2. syncbox
    Member
    Posted 6 years ago #

    you'll like get more help if the subject line reflects what you are wanting.

  3. flick
    Member
    Posted 6 years ago #

    As there are a few plugins with that feature, it would certainly help if we could have a link to the actual plugin page :)

  4. Konziner
    Member
    Posted 6 years ago #

    I apologize.. I made a post on this yesterday but no one responded. here is the plugin :

    http://wordpress.org/extend/plugins/random-featured-post-plugin/#post-5150

    AND here sync is the post to prove like, what you said is totally like, wrong.
    http://wordpress.org/support/topic/179771?replies=2

  5. flick
    Member
    Posted 6 years ago #

    The irony is that I did actually reply to that post :) It did make far more sense, as this particular thread doesn't even show what WP version you're using etc.

    I wasn't sure if I had understood your question correctly though, as it seems the author of the plugin provides some good examples as to how to integrate it with a WordPress site.

  6. Konziner
    Member
    Posted 6 years ago #

    Mosey thank you for your reply.

    He does have some good examples. The issue is, Im not sure im doing the code correctly. I assume I have to use the <php? function {}(); ?> the issue is I am not doing it correctly, I dont think.

    I was wondering if anyone had an example code by chance.

    Thanks!

  7. flick
    Member
    Posted 6 years ago #

    I'm not sure quite where it would go in your own index.php at present, but let's assume you want to use the second example on the author's page.

    The actual code you would use is something like:

    <php if ( function_exists('show_featured_post') )
     show_featured_post('', '', true, 42);?>

    which he has helpfully explained means that you would always display a featured post from category 42, if the plugin was activated. This is what the if function exists part does.

    It might help to look at some of the comments on that page as well, because it seems others were having some issues trying to get the plugin to work the way they wanted.

  8. Konziner
    Member
    Posted 6 years ago #

    Thanks mosey.

    I have indeed tried the following :

    <?php if ( function_exists('show_featured_post') ) show_featured_post('', '', true, 42); ?><?php show_featured_post(); ?>

    Still, nothing on the page. Plugin is indeed acivated.

  9. flick
    Member
    Posted 6 years ago #

    Konziner: For some reason, it seems as though show_featured_post is called twice in the sample you provided above?

    All you would/should need is just

    <php if ( function_exists('show_featured_post') )
     show_featured_post('', '', true, 42);?>

    This should be sufficient to show any featured posts from category 42.

    Hopefully I've understood what you mean ^^;

  10. Konziner
    Member
    Posted 6 years ago #

    AND you rock. TY!

  11. flick
    Member
    Posted 6 years ago #

    Glad to be of some help! :)

    p/s: Not sure if it's possible, but might be worth editing the title of the post to reflect the actual topic of the thread. ^^

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.