WordPress.org

Ready to get started?Download WordPress

Forums

New CMS area (3 posts)

  1. alby54
    Member
    Posted 1 year ago #

    Hi, I need to create a new area to be included in the flow with header, content, sidebar and footer. Such area (let's call it "media") should then be assigned to certain pages or categories. I'm working with a child theme from twentyeleven. I would like to know what files I must create and if I can get away with just adding a function or so... definetely I'm not going to get into editing main CMS files ^_^
    Right now I've included the area in the content but it is not really efficient beacause as it changes in a page, I'll have to change it in all the single articles that belong to that category page.
    That's why I want to be able to add it to the CMS and have it available with a similar call:
    get_media();

    thanx for any help that could put me on the right track

    Alberto

    (I'm not a php expert)

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

  3. alby54
    Member
    Posted 1 year ago #

    Thanks, alchymyth, I realized that the code I need is already there in Twentyeleven so I just have to create media.php and place the hook in the proper template:
    <?php get_template_part( 'media' ); ?>

    and it works

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.