Flexibly shifting attention between stimulus dimensions (e.g., shape and color) is a central component of regulating cognition for goal-based behavior. In the present report, we examine the functional roles of different cortical regions by manipulating two demands on task switching that have been confounded in previous studies—shifting attention between visual dimensions and resolving conflict between stimulus-response representations. Dimensional shifting was manipulated by having participants shift attention between dimensions (either shape or color; dimension shift) or keeping the task-relevant dimension the same (dimension same). Conflict between stimulus-response representations was manipulated by creating conflict between response-driven associations from the previous set of trials and the stimulus-response mappings on the current set of trials (e.g., making a leftward response to a red stimulus during the previous task, but being required to make a rightward response to a red stimulus in the current task; stimulus-response conflict), or eliminating conflict by altering the features of the dimension relevant to the sorting rule (stimulus-response no-conflict). These manipulations revealed activation along a network of frontal, temporal, parietal, and occipital cortices. Specifically, dimensional shifting selectively activated frontal and parietal regions. Stimulus-response conflict, on the other hand, produced decreased activation in temporal and occipital cortices. Occipital regions demonstrated a complex pattern of activation that was sensitive to both stimulus-response conflict and dimensional attention switching. These results provide novel information regarding the distinct role that frontal cortex plays in shifting dimensional attention and posterior cortices play in resolving conflict at the stimulus level.