WordPress.org

Forums

Jetpack by WordPress.com
Conditional 'render' value (4 posts)

  1. manuelmasia
    Member
    Posted 1 year ago #

    Is it possible to change the value of 'render' setting according with the post type? Maybe I can declare add_theme_support when the post type is available somehow?

    TIA, Manuel :-)

    https://wordpress.org/plugins/jetpack/

  2. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Hi! Instead of setting conditional render functions, you could have one render function and use conditional logic therein to render differently by post type.

  3. manuelmasia
    Member
    Posted 1 year ago #

    Thank you for getting back to me.

    I tried that in facts, but it doesn't seem to understand what is the post type... If I add the function to 'init' it is to early to check what is the post type... am I right? If I add the function to a "later" hook, the "add_theme_support" function doesn't seem to work anymore...

    BTW: I'm sorry, I'm talking about "infinite-scroll", forgot to mention it before.

  4. Richard Archambault
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    I tmight be easier to help you with this if you shared your code. Can you paste it to http://pastebin.com for example?

    Thanks,

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic