Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter The Three

    (@3wwwgr)

    i have added this code:

    <?php $flexible_posts = new WP_Query( array(
    'year' => $today["year"],
    'monthnum' => $today["mon"],
    'day' => $today["mday"],
    'meta_key' => 'wpb_post_views_count',
    'orderby' => 'meta_value_num',
    'order' => 'DESC'  ) ); ?>

    But now the loop can’t take the number of “posts to show” from widget… Any idea?

    Plugin Author DaveE

    (@dpe415)

    Hi TheThree,

    FPW has hooks available for you to be able to adjust the query parameters. There is no reason for you to rewrite the whole query. If you just add your custom parameters through the dpe_fpw_args filter instead of rewriting the value of $flexible_posts with a completely new query, you’ll not loose the settings that are configured through the widget interface.

    Using hooks in WordPress is a fundamental feature of the platform. if you’re unsure how to use them appropriately, I suggest reading up on the topic in the Codex.

    Cheers!

    Plugin Author DaveE

    (@dpe415)

    Closing this ticket as resolved since I haven’t heard back in quite a while. Please feel free to reopen if you’re still having trouble.

    Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom filed integration?’ is closed to new replies.