Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Yannick Lefebvre

    (@jackdewey)

    This is not possible at the moment. What I am thinking about to handle such specific requests is to allow users to write an expression using WordPress conditional functions that could become much more tailored to user needs.

    For example:

    in_category(4) || is_category(4)

    Would make the dialog appear if what is displayed is assigned to category 4 or is the archive page for category 4.

    It’s either that or making a bunch of fields to specify things like a comma-separated list of post types, categories, archive page types, etc…

    The former would give complete control to users but might be a little daunting as it is more programming like. The latter would create more clutter in the interface, but be simpler.

    What do you think?

    Thread Starter zfly9

    (@zfly9)

    Yes i would much appreciate the first example that could take the wordpress conditionals!

    Is there any workaround I can knock out before you implement that?

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    You can always try to hack around the code. That being said, I will try to see what I could implement this evening to support this.

    Thread Starter zfly9

    (@zfly9)

    Awesome!

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    Please upgrade to version 3.4.2 and give it a try. You will find a new field called PHP condition string in the admin. To see it appear on all posts and the archive page for a category, you would need to set the PHP condition string to something like

    in_category(27) || is_category(27)

    where 27 would be the numeric category ID. Let me know if this works for you.

    Please consider donating to support this plugin’s development and rating it.

    Thread Starter zfly9

    (@zfly9)

    That’s awesome thanks for adding that.

    Whenever I put something in there, it adds global css to the entire site.. Very weird.

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    What do you mean by global CSS? Are you talking about the inclusion of the Modal Dialog stylesheet on all pages?

    Thread Starter zfly9

    (@zfly9)

    Yes it applies it to all pages, to the body, header, etc.. Changed the whole look of my website. It should only apply to the modal, let alone at least the page that the modal is active on.

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    Very strange. I will investigate over the week-end. I did not get any layout changes on my side.

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    Do you still have the latest version running? Does this extra CSS appear only on pages where you that match the PHp condition that you indicated? Can you perhaps try to look at the source of the page with and without the plugin, to see what the real different is? I am not getting any CSS changes on my personal site with the extra code I added to support PHP conditions.

    Thread Starter zfly9

    (@zfly9)

    Nope, like I said above.. It shoes up on all pages. Not just ones that match the php condition.

    It might not affect yours because your CSS might be similar.

    It adds CSS in the head.

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    Can you give me a link to your site so I can see what is happening directly?

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Modal Show On Certain Post Category’ is closed to new replies.