• Greetings!
    I have less than average technical skills, so please answer me in basic lamens terms. (Oh and please don’t send me links to the codex, I don’t understand it.)

    Can you tell me the exact path to the twenty eleven theme STATIC PAGE FILE? (To the twenty eleven theme only).

    By path I mean: wp-content/themes/twentyeleven/index.php (or whatever it is)

    It is NOT index.php. Index.php works only for the blog static page, not the static homepage. Page.php doesn’t usually do anything at all. Content-page.php is the only one that usually comes close to working. (The plugin im trying to get to work “dynamic content slider” has a code to place in static theme files, and when i place it under content-page.php it shows up but ruins my page content). So either I am not finding the right place to put it, or it’s the plugins fault.

    If this means anything, I use my web server c panel to locate my theme files and edit them. I have the latest version of wordpress, and obviously I am using a static page as my home page, and my site is https://stellarbeam.com

    My Objective is to be able to post codes to display whatever I want on my static homepage, for example a featured slider, or other random things.
    But in order to do this, you need to know the correct theme template file. Grrowl. I can’t find it.

    Has anyone written a “how to customize static pages for dummies?” Because the technique of adding fancy gadgets and stuff works fine for index.php when you have your home page set to show blog posts, but NOT for static pages.

    Also, can somebody tell me why suddenly my theme editor button is no longer showing up under appearance? It used to be there. I keep thinking it might be easier to just place codes in there under template files, but now I can’t find my editor button. And Yes, I am self hosted. The editor button was there.

    Alternatively, I can just edit the theme through my web server panel like I have been doing? What IS the difference between doing it that way and the theme editor in the WP admin panel?

    Ps. I am not making a “child” copy of twentyeleven theme (whatever that is). The only edits I ever make are simply to add in the odd gadget, (so far only one gadget im trying to get to work) easy to keep track of as i don’t have much. I really love this theme as it is, so I keep it as it is.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter thunderseed

    (@thunderseed)

    Update: I now know for sure this is a problem with the twentyeleven theme.

    Because editing page.php for static page works fine with all other themes I have tried. I have done tests, inserting code just before the div id line before it turns into a loop on page.php.

    Changes should be showing up on page.php but noooo. Why is twentyeleven not working for static pages? I thought this was supposed to be a default theme, so you would think it would have that option.

    Anyone know, doesn’t anybody?

    I am not making a “child” copy of twentyeleven theme (whatever that is).

    https://vudu.me/child

    Hopefully I can change your mind. You need to make a child theme, otherwise ANYTHING you do to the 2011 theme will eventually be lost. It is pointless, and dangerous to edit 2011.

    Best case, your changes get lost. Worst case, you break your site.

    If you are editing a theme, and your edits go bad, WP relies on having a clean copy of 2011 to fall back on. If your edits to 2011 are what breaks WP, it has no clean 2011 to fall back on. Normally if you break a theme, you get locked out of WP. So you delete/rename that theme, and WP automatically reverts to 2011. So you need that clean 2011 in there or you can’t get in.

    CHild themes literally take seconds to make.
    https://quirm.net/2011/08/01/wordpress-child-themes/
    Here are blank ones to even get you started

    page.php in 2011 does control page output…. however you need to understand how it works.

    <?php get_template_part( 'content', 'page' ); ?>

    this line appears in 2011
    That offloads to a new file: content-page.php

    https://vudu.me/cy
    may help you understand teh get_template_part

    Thread Starter thunderseed

    (@thunderseed)

    Thanks Rev. Voodoo,
    Why will all my changes eventually be lost, how is that possible? Is that a sure thing, why would it come with a theme that would eventually break my site or vanish. Isn’t there somewhere I can just download a child theme? Because it sure does not sound simple.

    I already know that content-page.php is part of page.php, that was obvious within two seconds of my search to find the proper placement. Yet that still doesn’t change the fact that I don’t know where to put it (the code to get my thing to show up on my static homepage).

    Are you telling me where the static page is effected? I’m just not quite sure what you were writing about in that last bit. Yeah I sort of get how get_template_part works, basically it’s just a thing that connects to another thing, that is part of that main thing, can you please tell me what this has to do with my static page and thus where i put my code to effect my static page?

    No, page.php does not work for the page output for twentyeleven. (At least not for my twentyeleven) That’s what I’m saying.
    I know what i’m doing, I have put the same code, exactly where it is supposed to go in other themes just to test it out to see if it was the theme or a stupid mistake I was making.
    It is the theme, not me. The code is supposed to go above the div id line in page.php. It works fine in all the other themes, but not twentyeleven. That means either my twentyeleven theme is dysfunctional, OR static page is effected some other way in twentyeleven than it is for other themes and i need to find a different placement and i highly doubt my theme is dysfunctional so its obviously a different placement.
    I was hoping someone could tell me where that is, bluntly.

    content-page.php works, but it ruins my content. By ruin I mean it simply replaces ALL my content with a random post, and i do not want that. This may obviously be, because I am placing it within a loop, or in the wrong spot, or in the wrong template. Which is why i need to know exactly what the path is to where the static page is effected.

    When i say content-page.php works, i mean that the code for the gadget i want to show up on my static page actually shows up, and works completely fine. BUT it ruins my content like I said above. So far content-page.php is the closest I have found that affects anything for the static homepage.

    This is still not resolved! Stupid twentyeleven theme LoL

    Why will all my changes eventually be lost, how is that possible?

    The links I provided in my reply explain a lot if you click them!! WP needs to be updated, for upgrades, security, bugfixes, etc. 2010 and 2011 are themes that ship with WP, so they are part of core. When they get updated, they get new versions, with fresh files, overwriting any changes you make.

    Isn’t there somewhere I can just download a child theme?

    That was the second link I gave you. You can download bare child themes that you can just install, and start working with.

    In your description, static page is not the same as static front page. They are different animals!

    If you go look at my test site right now, you will see the phrase “I’m right before the loop”

    the site is cdn.rvoodoo.com

    I simply added it to page.php right before the loop

    The loop starts at:

    <?php while ( have_posts() ) : the_post(); ?>

    and ends at

    <?php endwhile; // end of the loop. ?>

    so all of content-page.php is inside the loop

    As you can see though, I can edit page.php and then set a page as my front page and have the content show up.

    THe problem you are going to run in to, is that page.php applies to static front pages, and ALL pages.

    Where (on the page) are you trying to have this whatever appear? And what exactly IS it? Certain plugins may not be compatible with certain themes…. due to coding, styling, query conflicts, etc.

    Not to intrude on this post but thank you very much, voodoo. I just wish I could figure everything else out with how to build a website.

    Thread Starter thunderseed

    (@thunderseed)

    Thanks again Rev,
    Ah I see, it’s the updates that will lose the prior theme, that makes sense. I guess I will have to make a child theme. Or if I happen to find a similar theme exactly like twenty eleven but even better that would be awesome, but I doubt it, I’ve tried on lots of themes and don’t like em.
    I was wondering if I could ask you a favor? If I happen to run into issues while making the child theme, could I email you for assistance? I’m pretty good at following instructions though, the instructions in your links are easy and straightforward. I’m guessing there is a lot more to it than just installing the bare child theme, probably got a days work ahead of me.
    Thanks for the test page, how come i can’t do it! This means there is something internally wrong with my theme, maybe i’ve done something to mess it up. Great. If page.php works for you, then its something wrong with my thingamajig.
    I’ve tried that so many times. Even when i just write something there it doesn’t show up.
    I’m not sure how to display code here, hopefully this works: `<?php if( is_home() ) {
    dynamic_content_gallery();
    } ?>This is the short code im trying to work with. It is part of the plugin called Dynamic Content Gallery, so you wont get anything showing if you dont have that installed. It's not working for me at all. It works in all other themes I've tried. Alternatively there is this one:<?php dynamic_content_gallery(); ?>` This makes it display on all pages, the prior one makes it display on just home page.

    I’m not sure why it’s not displaying, but no matter what i try to display on page.php it doesn’t work. It does not effect any of my pages at all. Nadda. Maybe it is dysfunctional. Because this should be working.

    Ideally this is the line this short code is supposed to be above <div id="content" role="main">which is still above the loop. perhaps i’ll have better luck just switching to another theme. I don’t have to make a child version for other themes do I? Just making sure. But man, this is frustrating i wanna figure it out.

    I have no clue if the codes I pasted are going to show, though i wrapped them in “code” above haha.

    I have no idea what the problem could be. Maybe i should post my entire contents of page.php to see if it differs from the original? Maybe somehow i messed it up. If my code shows up here, then ill do that.

    Thanks for your patience!

    Thread Starter thunderseed

    (@thunderseed)

    well here goes nothin, ill see if this works, perhaps i messed it up somehow does anyone have an original copy of this to see

    <?php
    /**
     * The template for displaying all pages.
     *
     * This is the template that displays all pages by default.
     * Please note that this is the WordPress construct of pages
     * and that other 'pages' on your WordPress site will use a
     * different template.
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    
    get_header(); ?>
    
    		<div id="primary">
    
    			<div id="content" role="main">
    
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php get_template_part( 'content', 'page' ); ?>
    
    <?php if( is_front_page() ) {
    dynamic_content_gallery();
    } ?>
    
    					<?php comments_template( '', true ); ?>
    
    				<?php endwhile; // end of the loop. ?>
    
    </div><!-- #content -->
    		</div><!-- #primary -->
    
    <?php get_footer(); ?>
    Thread Starter thunderseed

    (@thunderseed)

    oh and in case you were wondering more about the dynamic content gallery the configuration guide is here: https://www.studiograsshopper.ch/dynamic-content-gallery/configuration-guide/

    Maybe it doesn’t work with twentyeleven theme, but i did contact support there too. They did not give me any clue to as whether or not it worked for twentyeleven other than telling me twentyeleven was difficult to work with, which i can tell haha. And as i said before, it works fine in all other themes i’ve tried.

    Thread Starter thunderseed

    (@thunderseed)

    By the way I really like your site Voodoo, thanks for the links. Your explanations are easy to understand and well written. I will be busy with the child theme creating now lol.

    Thread Starter thunderseed

    (@thunderseed)

    So basically, that child theme download I just downloaded to my site for twentyeleven in the link you posted is good to go… i don’t have to do anything else? That’s it? If so that is the easiest thing in the world! ??

    Sorry about the delay…. the holidays kept me away!

    Yes, that child theme is good to go. All you would need to do to it is add things which you would need.

    So for instance if you wanted to edit page.php, as it seems you do, you would copy 2011’s page.php and put it in your child theme.

    That way the version in your child theme would be used instead of the parent themes, you could then edit it safely and it won’t get overwritten

    As for pasting in your code to page.php…. where are you trying to have the output in relation to the normal page content? Above, below, etc….

    Thread Starter thunderseed

    (@thunderseed)

    Not sure if I get your question, but if you take a look at the theme (yoko) I am currently using at stellarbeam.com (which is not twentyeleven) the featured content slider is above the page content, underneath the header, right where it’s supposed to be.

    This is what I keep trying to do for twentyeleven but it just doesn’t work. Nothing I edit for page.php works for my twentyeleven theme.

    There is something wrong with my twentyeleven theme. Did you by chance look at the above code to see if I had messed it up or not haha?

    Maybe I should just replace it. Can I find a fresh page.php file anywhere? Do i just re-download the theme? Because this one I have is not working properly. I just updated my wordpress to the latest version, but I’m still having the same issue with the twentyeleven theme.

    Thanks for all the help!

    You can download it from the theme repo, or download a fresh copy of WP at the download tab in the menu at the top of the page. DL WP to your computer and unzip it, 2011 is in there

    Your code above would be placing the slider inside the loop, between the post content and the comments template… which doesn’t seem like where you want it.

    So… the while (have posts( bit of code starts the loop

    Then the get_template_part bit of code calls out like we discussed earlier to control the actual display of the page content

    Then the comments_template code calls out to display your comments form

    Finally, the loop ends at the endwhile

    So, is your featured thingy supposed to be inside or outside of the loop?

    To get the slider up under the header, before the content, I would play around with putting it

    <div id="primary">
    
    			<div id="content" role="main">

    Above, or below each of these things. Probably under the content div but before the while have posts code would be where I would start.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Need help locating static page theme file (twenty eleven)’ is closed to new replies.