0

How i can create a welcome message area for my frontpage with backend control {admin panel}

Welcome

message

4
  • Are you able to modify your template files, or are you looking for a plug and play solution?
    – Pippin
    Commented Jun 24, 2012 at 14:36
  • 1
    Please improve your question: Where and how do want to add that content: editing the theme, installing a plugin? Show us your research efforts.
    – fuxia
    Commented Jun 24, 2012 at 16:39
  • Dear Toscho i want to edit the theme not plugin , i do research !! . i need to make it option using theme option Commented Jun 25, 2012 at 9:16
  • dear pippin as i answered i need to edit the theme Commented Jun 25, 2012 at 9:16

3 Answers 3

-1

Create a page theme, then call it in index.php:

$recent = new WP_Query( 'page_id=**ID**' ); 
while ( $recent->have_posts() ) : $recent->the_post();
    ?><h3><?php the_title(); ?></h3><?php 
    the_content();
endwhile;
2
  • <?php $recent = new WP_Query("page_id=**ID**"); while($recent->have_posts()) : $recent->the_post();?> <h3><?php the_title(); ?></h3> <?php the_content(); ?> <?php endwhile; ?>
    – ahmedag
    Commented Jun 24, 2012 at 12:25
  • 2
    You can edit your own answer to make corrections and updates... Also, use the proper formatting for code.
    – brasofilo
    Commented Jun 24, 2012 at 14:10
0

Put a loop on the front page limited to posts with the tag "welcomeMessage". Then, on the back end write a post with that tag. Edit the post whenever you want to change the message.

0

If you are using a static frontpage, you can add the message to a custom field on the post editing screen and then put a shortcode in the page to display it, e.g. [welcome-message].

add_shortcode( 'welcome-message', 'echo_welcome_message' );
function echo_welcome_message() {
    global $post; 
    return get_post_meta( $post->ID, 'welcomemessage', true );
}

I don't see how this is really much different than just adding the welcome message to the top of the page content, but hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.