• Resolved preitybansal

    (@preitybansal)


    Hi, I am customizing a theme and have created a division on homepage which will hold some static content. The content at present time is written in php file inside that division. But I want that content to be editable form wp-dashboard either through a post or a custom field.
    Any idea how to achieve this.

    Thank you

    Regards
    Preity

Viewing 4 replies - 1 through 4 (of 4 total)
  • Perhaps you need to review creating a static front page?

    Thread Starter preitybansal

    (@preitybansal)

    Hi,
    I tried something like this

    <?php
    $my_id = 33;
    $post_id_1 = get_post($my_id);
    $content = $post_id_1->post_content;
    echo $content;
    ?>

    It works perfectly fine but now as it is a post it appears with other posts also.
    I want to exclude it from appearing anywhere else.
    I know using wp_query but dont know the exact code where to write in index.php.

    Any help?

    Two simple options I can think of…

    You can register a new sidebar (widget area) and place it there, then just use a text widget in that area to fill in what you want
    http://vudu.me/sidebar has an overview of that concept

    Or, you can run a loop there, and have it query one specific page/post which you continually edit with whatever you want in that area
    http://codex.wordpress.org/The_Loop

    EDIT — You guys were quicker.. carry on!

    Thread Starter preitybansal

    (@preitybansal)

    @rev. Voodoo

    I have done the second way.. and it is done now.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how can I make my static content editable from dashboard’ is closed to new replies.