• Resolved lpburny

    (@lpburny)


    Hello,

    Awesome plugin!

    Is it possible to hide/show a post by its ID using php snippet in certain time interval?

    I am using YITH’s Badge Management plugin and the problem is that there is no place to insert the usual shortcode for those specific posts (badges), so my idea is to use php snippet instead to do so. I want to hide and show these badges on my products and schedule them by hour.

    Thanks

    • This topic was modified 2 years, 10 months ago by lpburny.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter lpburny

    (@lpburny)

    Hello,

    Any help please?

    Thank you!

    Plugin Author Arno Welzel

    (@awelzel)

    If shortcodes are not possible and you need a “php snippet” that means someone has to program something to achieve this.

    Of course you can hire a programmer to do this for you based in source code of Timed Content. However I can not provide such a thing for free and don’t have time at the moment to do individual programming tasks.

    • This reply was modified 2 years, 10 months ago by Arno Welzel.
    Thread Starter lpburny

    (@lpburny)

    Hello,

    Thank you for your answer.

    I saw that it is possible to use action hooks in PHP with the plugin, that is why I thought it is easy to do so.

    So using the hooks below it is possible?

    I meant this:

    add_action( “timed_content_server_show”, “{function_name}”, {priority_level}, 4 );

    `$post_id – the ID of the currently displayed Post/Page
    $show – the value of the show attribute. If not set, defaults to “1970-Jan-01 00:00:00 +000”
    $hide – the value of the hide attribute. If not set, defaults to “2038-Jan-19 03:14:07 +000”
    $content – The content enclosed by the shortcode

    • This reply was modified 2 years, 10 months ago by lpburny.
    Plugin Author Arno Welzel

    (@awelzel)

    No – hooks are used when the shortcode is executed.

    This hook is called before the shortcode is about to show something. But this still requires the shortcode to work. Without the ability to use shortcodes the hook won’t help you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hiding specific post by ID in PHP’ is closed to new replies.