WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
Show custom fields content (3 posts)

  1. drgoettel
    Member
    Posted 1 year ago #

    Hello.

    I'd like to know if it's possible to add a custom field content to the output or if someone could give a clue of how to do it.

    Great plugin! Thankyou for it

    Andrés

    http://wordpress.org/extend/plugins/wordpress-popular-posts/

  2. drgoettel
    Member
    Posted 1 year ago #

    I found a way to do it but I didn't wanted to touch the plugin core.

    This is what i did:
    line 1114: array_push($posts_data, $data);
    After this you can get any custom field with:
    $custom_field_value=get_post_meta($p->id,"custom_field_name", true);

    Don't forget to change "custom_field_name" with your custom field name :-)

    If anyone knows how to do it without changing the plugin code... I would be very pleased

    Andrés

  3. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Andrés,

    No, unfortunately there's no way to achieve that without hacking the plugin. Anyways, thanks for sharing your solution, hopefully it'll help others wanting to do the same.

    Cheers!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic