If you bought after the ex-date you will not get a dividend on those shares.
You will **NOT** continue to get a dividend on shares that you sold. Presumably, the dividend you collected was on shares bought before, then sold after, the ex-dividend date.