2 Nephi 18:20 To the law and to the testimony; and if they speak not according to this word, it is because there is no light in them.
There are a couple ways to take that verse. It may be understood to be saying if a teacher teaches not the law, neither testifies (as an eyewitness) of Christ, they are not of God.
D&C 19:31 And of tenets thou shalt not talk, but thou shalt declare repentance and faith on the Savior, and remission of sins by baptism, and by fire, yea, even the Holy Ghost.
This instruction given to Martin Harris seems sound counsel to keep.
JST Matthew 5:21 Whosoever, therefore, shall break one of these least commandments, and shall teach men so to do, he shall in no wise be saved in the kingdom of heaven; but whosoever shall do and teach these commandments of the law until it be fulfilled, the same shall be called great, and shall be saved in the kingdom of heaven.
The commandments spoken of were the commandments he was speaking - in the Sermon on the Mount / Bountiful / Plain. Three witnesses to the same commandments. Three.
3 Nephi 12
19 And behold, I have given you the law and the commandments of my Father, that ye shall believe in me, and that ye shall repent of your sins, and come unto me with a broken heart and a contrite spirit. Behold, ye have the commandments before you, and the law is fulfilled.
20 Therefore come unto me and be ye saved; for verily I say unto you, that except ye shall keep my commandments, which I have commanded you at this time, ye shall in no case enter into the kingdom of heaven.
It's kind of important.
JST John 14
15 If ye love me, keep my commandments.
16 And I will pray the Father, and he shall give you another Comforter, that he may abide with you forever;
17 Even the Spirit of truth; whom the world cannot receive, because it seeth him not, neither knoweth him; but ye know him; for he dwelleth with you, and shall be in you.
18 I will not leave you comfortless; I will come to you.
19 Yet a little while, and the world seeth me no more; but ye see me; because I live, ye shall live also.
20 At that day ye shall know that I am in my Father, and ye in me, and I in you.
21 He that hath my commandments, and keepeth them, he it is that loveth me; and he that loveth me shall be loved of my Father, and I will love him, and will manifest myself to him.
22 Judas saith unto him, (not Iscariot,) Lord, how is it thou wilt manifest thyself unto us, and not unto the world?
23 Jesus answered and said unto him, If a man love me, he will keep my words; and my Father will love him, and we will come unto him, and make our abode with him.
24 He that loveth me not keepeth not my sayings; and the word which ye hear is not mine, but the Father's which sent me.
You love Jesus if, and only if, you keep his commandments. If you keep his commandments, he will come to you, and bring the Father to you.
D&C 132
21 Verily, verily, I say unto you, except ye abide my law ye cannot attain to this glory.
22 For strait is the gate, and narrow the way that leadeth unto the exaltation and continuation of the lives, and few there be that find it, because ye receive me not in the world neither do ye know me.
23 But if ye receive me in the world, then shall ye know me, and shall receive your exaltation; that where I am ye shall be also.
24 This is eternal lives--to know the only wise and true God, and Jesus Christ, whom he hath sent. I am he. Receive ye, therefore, my law.
25 Broad is the gate, and wide the way that leadeth to the deaths; and many there are that go in thereat, because they receive me not, neither do they abide in my law.
To receive Jesus means to take him into your home. If you don't receive him into your home in the world, meaning (as I take it) this life, you don't get exalted. But, if you keep his sayings, he will come to you and you will receive him.
D&C 130:3 John 14:23--The appearing of the Father and the Son, in that verse, is a personal appearance; and the idea that the Father and the Son dwell in a man’s heart is an old sectarian notion, and is false.
All of this is literal and not metaphorical.