Forums

Create a post with pre-existing dummy content? (5 posts)

  1. drew.barden
    Member
    Posted 8 months ago #

    Hello, I need to have it so when my client clicks “new post” the content pre-existing. So all they’ll have to do is change the “placeholder content” text to reflect what they want to say. Help?

    Example of how I'd like the dummy text in a new post to look:

    [tab:Overview]
    Placeholder Content

    [tab:Amenities]
    Placeholder Content

    [tab:Map]
    Placeholder Content

    [tab:Booking]
    Placeholder Content

    I'm sure there is a simple php solution for this, I just don't know what it is!

  2. RockyMtnHi
    Member
    Posted 8 months ago #

    You might try something similar to this in your loop code. I have simply added the else section to the logic:
    <?php if (have_posts()) : while (have_posts()) : the_post();?>
    <?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
    <?php endwhile;
    else
    // place default code here
    endif; ?>
    Haven't tried it, but it makes logical sense.

    Here is an example of simple tab code that works fairly niftily:
    http://67.199.78.149/1/
    Note that is it at our old site, hence the IP address.

    Hope it helps.
    [signature moderated Please read the Forum Rules]

  3. MichaelH
    moderator
    Posted 8 months ago #

  4. drew.barden
    Member
    Posted 8 months ago #

    Thank you for the responses! I did end up finding the post-template yesterday. I hadn't thought searching the word "template" would return favorable results. However, it did!

    What I'm struggling with now, is to create a panel in the Dashboard that accepts input for "current specials" (it will be a global value). I then need to be able to call the value into a post.

    I found a plugin called custom fields shortcode, but the variable it pulls in isn't a global variable that can be pulled into all posts dynamically. So I'm stumped.

    The reason for all of this, is I need to use tabbed navigation in posts. I am not sure how to code them in, so I used a plugin that makes the post content look something like this:

    [tab:Overview]
    Placeholder Content

    [tab:Amenities]
    Placeholder Content

    [tab:Map]
    Placeholder Content

    [tab:Prices]
    (INSERT current special here)
    Base price placeholder

    Example page on the site in question:
    http://adifferentimpression.com/clients/horizon/vacation-rentals/beach-time/

    I hope I'm being clear enough. I'm new to the Wordpress forums :)

  5. MichaelH
    moderator
    Posted 8 months ago #

Reply

You must log in to post.

About this Topic