How to create full width posts?

I've looked at tutorials online and they are confusing. I'm just wondering if someone here can help me with an easy way to create a full width post. I want to use posts over pages for this particular content because posts have tags.

Thanks in advance. I'd really appreciate any help..

  • ThePath
    • The Bug Hunter

    Hi Mark, thanks for using the forums.

    If you want to tag pages the perhaps a page tagging plugin would be easier for you to implement?

    http://wordpress.org/extend/plugins/simple-tags/

    The one above does other things as well as allow you to add page tags.

    If you still want to use posts then I can look into this for you. If I was to do it I reckon I would use "post formats". You know like you get in the default WP theme; aside, quote, gallery etc.

    I think the above plugin will sort you out a lot quicker though, let me know dude!!

    Cheers

  • Mark
    • The Incredible Code Injector

    Hi, thanks for the quick replies!

    I've seen SimpleTags before but I'm trying to add plug-ins only when it's really necessary. Plus, I like using the Categories feature for posts.

    The theme I'm using is Simplemarket (a WPMU Dev theme) and it is responsive. However, when I go to add a new post I don't see an option for full-width as I do if I go to add a new page. I recently posted this thread over here but moved it here because I thought maybe it's not a theme specific question. Plus, Joe said Tammi may be out for a week and I was hoping to get a fast answer.

    Do you know how to add that capability for posts? That's sort of at the heart of my issue.

  • ThePath
    • The Bug Hunter

    Well you can put pages in catgeories using dummy menu items and the WP 3 menu interface.

    Anyway you want posts! OK this could be dead easy or a bit more complex.

    Let me ask you a few more questions first:

    1. Do you need the post/product list page to be full screen?

    2. Do you need the single post/product page to be full screen?

    The way I see it you have two options;

    1. Open up the index.php and single.php file for the theme and remove the get_sidebar function from each.

    2. Create a new page template similar to index.php but with out the sidebar and if the single product view has to be full screen too then you can either setup a custom post type or use this cool plugin: http://wordpress.org/extend/plugins/custom-post-template/

    I have used this plugin and its dead handy. Basically does for posts what pages already have template wise.

    Let me know the answers to my questions and explain your exact needs and I can go into this further with you dependant on what you need.

    Cheers

  • Mark
    • The Incredible Code Injector

    1. Do you need the post/product list page to be full screen? No

    2. Do you need the single post/product page to be full screen? Yes

    I previously tried your Option 1 above (remove sidebar) but the sidebar column remains even if there is no content. I've been trying to figure out a way to force or trigger full width for posts. (Not every post, I want to have the choice.)

    I checked out your Option 2 above (the plug-in) and it looks promising, but it refers me out to external instructions on how to create custom posts. And that's where things started to get very confusing. I couldn't find an example which I was able to understand for my needs.

    I know, this is starting to sound like hand holding, which it probably is. :smiley:

    What I'm trying to accomplish:
    Ideally, I would like to be able to have the option of making posts full width. I have a category called "Research" which has a lot of posts with embedded PDFs. These are files I want people to be able to read online using a PDF viewer I've installed. I've made it so they can't download the docs but I don't to have a crappy reading experience. If there's no sidebar, screen is wide enough to read the PDF. With the sidebar, it's cramped. So I'm trying to solve for that.

  • ThePath
    • The Bug Hunter

    OK right so you are uncomfortable with coding a bit. To be honest there isnt another way to do it than to jump into the code a bit.

    The way I see it the plugin above is your best bet by far.

    Do you have a test (live) site at all?

    I previously tried your Option 1 above (remove sidebar) but the sidebar column remains

    Yeh this will probably be because the content div is still shortened as the single.php page is meant to contain a sidebar and so the CSS is telling the content dive it can only go over so far.

    Like I said using this plugin is by far the easiest way to solve your problem.

    You would:

    1. Install and activate plugin.
    2. Copy the single.php file in your theme folder and rename it to: single-fullwidth.php
    3. Insert: "Template Name: Fullwidth Post" into the comments area so it would look something like this:

    /**
     * The Template for displaying all single posts.
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
    * Template Name: Fullwidth Post
     */

    And remove the <?php get_sidebar(); ?> bit.
    4. You will need to add the CSS to change the size of the content div to stretch across the now missing sidebar section...or perhaps use the content div that the full width page template uses. Hang on I will have a look at this.......
    5. Got to your PDF posts and set the new "Post Template" option in the edit post screen to "Fullwidth Post"

    Thats it. 5 steps.

  • Mark
    • The Incredible Code Injector

    I think I'm almost there. :slight_smile: Step 4 is where I had hit a wall when I tried doing this myself so thanks for enlightening me.

    What you told me works (thanks!) but I do have one important issue: The changes you suggested make my default post type full-width, correct? However, in the post's admin section I don't see any option to change back to the normal width single if I so chose. I get this message: "This theme has no available custom post templates." But that's what I thought I created. Do I need to put the custom template in a special folder or something? I think I must have missed a step.

  • ThePath
    • The Bug Hunter

    Hi Mark

    Did you defo put in the template name in single-fullwidth.php as in step 3?

    * Template Name: Fullwidth Post

    Seem like you may have missed this and the new template is over riding your default single.php

    Your single.php should be the default and if the new one has a name it should appear in the drop down with that name.

  • Mark
    • The Incredible Code Injector

    Actually, there was still an open question on this thread. ThePath was saying that I'd be able to switch the custom post type from the post admin section after activating the plug-in, but my custom post templates aren't being found by the plug-in. ThePath has experience with it so I was hoping he could shed some light one last time. :slight_smile: Points coming your way, ThePath!

  • Mark
    • The Incredible Code Injector

    Hi ThePath,

    I followed Step 3 as you instructed and named the file single-fullwidth.php

    PS - You wrote "Change line 14 in single.php from". Did you mean single.php or the new template? I changed single.php as you instructed..

  • ThePath
    • The Bug Hunter

    Right so you have single-fullwidth.php with the "Template Name: Fullwidth Post" tag in the comment code at the top? Just want to be completely crystal on that.

    Hang on let me look at the plugin again, Im trying to remember what damn site I used it on....

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.