• Resolved soupking

    (@soupking)


    Hi everybody,

    I’ve figured out how to create post template pages, but I have no idea how to remove sections of content via hooks/filters (which as a noob seem to be referenced like the same thing) or div tags within.

    Is there an example or page to read regarding this subject at all? And please, I am not talking about making page and post templates. I am asking about how to remove and add content conditionally within once this page re-route is made based on category etc.

    Sorry if that sounds a bit snippy, I just find that my questions regarding the subject can sometimes come out unclear. Just trying to communicate the best I can.

    If any of you guys know of a great resource for this, I’d be grateful. I’ve been round and round in the Codex and end up either re-visiting what I know or going through more complex examples of stuff I don’t understand.

    Thanks for reading. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • I don’t think you’ll find 1 single resource for this as so much depends upon what you actually want to do. Plus there is often more than valid solution to a given problem. For example category templates are a perfectly valid route for what you describe.

    Thread Starter soupking

    (@soupking)

    Hi esmi,

    Yeah, I’ve been to that page as well as the one on conditional tags.

    The thing is I just want to do something very basic like create a condition for a post template div section (on/off).

    But I don’t know how it’s spelled out in PHP.

    I have this in my functions.php:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    The condition address excerpts vs. full page for the index. However, it doesn’t address specific DIV tag or content hooks in a post. At least, I don’t understand what to replace it with.

    I’ve been working off samples but my current situation has nothing to compare, pattern, and learn.

    There should be a resource with an example of somebody removing a DIV or hook from a particular post template I would think, no?

    Try looking for documentation or sites related to your theme.

    Thread Starter soupking

    (@soupking)

    Cool, will continue to do that. I’m using Thematic and their docs and forum has been a mainstay for me all month.

    Thanks esmi! ??

    Thread Starter soupking

    (@soupking)

    By the way, the answer to the question I had was something like this:

    if(is_home()){ //only show the DIV "content" on the home index ?>
    <div id="content">
    // insert content desired if the existing page is home
    </div>
    <?php }

    I’ve been everywhere and could not find a conditional argument example adding/removing DIV content anywhere. Only page/post by ID or category. That and more complex PHP examples that don’t include any <DIV> tags to show content integration.

    Thank goodness for forums. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Alternate Post Template Content?’ is closed to new replies.