• Hi
    i’m giving a go with wordpress to see wether it fits my need and i’ve stumbled in a problem that seems pretty difficult (to me, al least:).

    I’ve got my page template for the static pages which is pretty easy (one column layout):

    backticks
    <?php get_header(); ?>
    <div id=”content”>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class=”contentPaginaInterna” id=”post-<?php the_ID(); ?>”>
    <h1><?php the_title(); ?></h1>
    <?php the_content(); ?>
    </div>
    <?php endwhile; endif; ?>
    </div>
    <?php get_footer(); ?>
    backticks

    the problem is that i need to split the content in two: an image above the title and the text below it. How can i do that and still leaving the possibility to create the page in one step only?

    Here’s what i need to achieve:

    header()
    img (part of the content)
    title()
    text content
    footer()

    Any idea? is the problem clear?
    Vitto

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter hcvitto

    (@hcvitto)

    is there a way i can call a php worpress tag (ie: title()) directly inside the content insert page (from the admin)?

    Thread Starter hcvitto

    (@hcvitto)

    anyone got an idea about this?

    Use a post image plugin like, for example, my EasyPermGals.
    What you then do is add this bit of code to your Page template:
    <?php easypermgals_header(); ?>
    Now, you write or edit a Page and upload the image you wish to display above your headline. Upon uploading, while the media box is still active, make sure to give the image a title that contains the word [header], including the brackets.

    Done.
    By setting a dedicated header image with this [header] word, you can still upload images to use inside your content and not worry that they show up where they should not.

    If you just want to use the header function of the plugin (and not have all attached images show up under your post), make sure to disable the “full-auto-mode”.

    Thread Starter hcvitto

    (@hcvitto)

    thanks Mores
    i’ll try it right now!!

    Thread Starter hcvitto

    (@hcvitto)

    i tried but maybe i can’t use it yet..

    i made a page with this content:

    <img> (with title [header])
    text content (with some html)

    and this is the code of page template

    <?php get_header(); ?>

    <div id=”content” id=”post-<?php the_ID(); ?>”>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php easypermgals_header(); ?>
    <?php the_title(‘<h1>’,'</h1>’); ?>
    <?php the_content(); ?>

    <?php endwhile; endif; ?>
    </div>
    <?php get_footer(); ?>

    I expected the img to be above the title but it is not..
    What i did wrong?

    Thread Starter hcvitto

    (@hcvitto)

    has the title tag maybe precedence over anything else?

    the easypermgals_header(); function just outputs a basic < img src= blablabla> tag, so I suspect it’s got something to do with the css styling. Maybe the title tag is floated or something.

    can I see the result somewhere? It’s kind of hard to debug without seeing what’s actually going on.

    Thread Starter hcvitto

    (@hcvitto)

    unfortunately i’m working on my local pc but i guess is a problem with the wp title tag, which gets automatically before any content..
    i’m gonna just hardcode the title in the content nad that’s it..
    but i’m giving a go to your plugin with the gallery..hope i can do it well. I’m gonna keep you informed.
    Many thanks
    vitto

    try wrapping easypermgals in a div, or a span, and formatting that.
    like

    <span style="float:left;clear:both;"><?php easypermgals_header(); ?></span>

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘page template problem’ is closed to new replies.