A funny thing happened on the way to the photo opportunity at Ron Ellis' farm here today.

Just as Sen. Edward M. Kennedy (D-Mass.) and his huge campaign caravan came striding around the corner of the equipment shed, somebody in the press corps noticed a pair of hogs mating in a nearby pen. The TV producers signaled frantically to their camera crews, and for a few moments the nation's surrogate eye ignored Kennedy and his presidential campaign to focus on the porcine activity.

Other than that, though, and the few bruises sustained when the camerawoman from Swedish TV tripped over a John Deere bean header and tumbled, minicam and all, into a snow drift, everything went well today as Kennedy continued his efforts to convince rural Iowa to support his challenge to President Carter in the precinct caucuses that are now less than two weeks off.

Despite the crescendo of interest and activity in these last days before the first voting of the 1980 election, there are still some candidates here -- California Gov. Edmund G. (Jerry) Brown Jr. is one -- who can make their rounds in a single van.

Not Kennedy. His parade through the rolling country south of Des Moines today involved five police cars, a bulletproof limousine, six sedans, two vans and two Trailways buses. At each stop the various vehicles disgorged a flood of people and electronic gear that seemed to overwhelm the folks of the quiet county seats Kennedy visited.

It was Kennedy's third day of campaigning in the country -- he has concentrated on cities in previous Iowa tours -- and the pattern of activity has become fairly ritualized.

The candidate is always greeted by a big crowd, composed mainly of Democrats contacted by the local Kennedy oranizations, but generally including a good number of Republicans and apathetics who could not resist the opportunity to see a Kennedy in the flesh.

Kennedy speaks for five or 10 minutes, answers questions for five or 10 more, and then spends the last hour in each place patiently shaking hands wiith every man, woman, child and infant present.

One or twice daily he tours a farm, factory or retirement home, which gives him a chance to spend more time with individuals and gives the media their daily dosage of "visuals."

At every appearance this week, Kennedy urged his audience to tune in his half-hour TV ad, to be aired here Monday, "so you can hear why it is we're running for president."

Despite the media orientation, human moments still crop up now and then. One occurred this morning when Kennedy and his family stopped at the Four Corners Bingo Parlor and Laundromat, just across from the Marion County Courthouse in Knoxville, Iowa.

Someone in the audience asked Kennedy whether his wife would be as active in his administration as Rosalynn Carter is. "Well, I'll let her speak for herself," Kennedy said, turning to his spouse.

Joan Kennedy shot a despairing look at her husband, "This wasn't rehearsed," she said in a shaky voice, but then she forged on gamely.

"All I want to be is a good campaigner," she said. "I would like very much to be First Lady, but that's a long way down the road." Her husband tried to move on to the next question, but Joan Kennedy continued.

"If I speak out on anything, it will be the things I know best, my lifelong love for music and the arts and the humanitites," she said.

Her jittery performance made a striking contrast to the smooth professionalism of her husband and, for that matter, of Rosalyn Carter. But it won over the crowd.

"That Joan, she's a real person," said a woman in the audience afterward, and those standing around went out of their way to tell a reporter that they strongly agreed.