WordPress.org

Ready to get started?Download WordPress

Forums

Custom modifying default theme templates (19 posts)

  1. Netdetective
    Member
    Posted 8 years ago #

    I'm having difficulty figuring out to custom modify the default page templates in wp-content/themes/default/. If you go to http://www.beyourowndetective.com/blog/ you will see I added my own custom table code with graphics, but it's way below the header tag. I want it to be at the very top of the page above h1 heading tag. I tried moving <?php get_header(); ?> below my table code, which sort of works, but it turns the entire page background color grey, and probably does other weird things to the page. My form code at the bottom of the page appears to be ok. I'm not even sure if I am using the template editor correctly, or if I can add my own table codes. I assume I can.

    Fred

  2. moshu
    Member
    Posted 8 years ago #

    1. The default is quite difficult to "customize" for a beginner, but if you succeed - you'll learn a lot :)
    2. Put that table of yours in the header.php above the call for the blog title. Actually you can even comment out the blog title if you don't need it.

  3. Netdetective
    Member
    Posted 8 years ago #

    Yes I could leave the blog title out and put in my own fixed heading title on the page, or turn the page topic into the h1 heading. Fortunately, I have some background in CSS and PHP (self-taught - didn't learn this stuff in college). I had no trouble with the stylesheet. I have some what of an understanding how the system works, but it is fairly complex. I think I'm making progress, so I must be doing good for a beginner.

    Next challenge is figuring out to put in an "Ads by Google" banner on the sidebar of the page.

  4. moshu
    Member
    Posted 8 years ago #

    If you have the code for the ads - open the sidebar.php and place it where you wish.

    [don't worry, I didn't learn the web related things at the university either: there was no web/internet when I was a student :)]

  5. Netdetective
    Member
    Posted 8 years ago #

    Something weird is going on with the css on this blog page. Notice how the grey boxes containing "moshu Member" "Netdetective Member" are now hiding some of the posts. It wasn't doing this yesterday.

  6. James
    Happiness Engineer
    Posted 8 years ago #

    Hm, I don't see that. Try clearing your browser's cache, then reload the page.

  7. Netdetective
    Member
    Posted 8 years ago #

    They're gone now, They bounced over to the right sidebar when I submitted my post. I hope my WordPress installation doesn't do this, because I figure it could get me into trouble with Google for having hidden text.

    My page template http://www.beyourowndetective.com/blog/ is beginning to take shape. I commented out the heading tag code in header.php. Now I need to figure out how to put the appropropriate h1 tag for the page's topic immediately below the blue "Conduct your own Investigations" bar.

  8. Netdetective
    Member
    Posted 8 years ago #

    Now I'm having trouble figuring how to get rid of the "Blogroll" links to other people's websites in the sidebar. I searched every template file for "linkcat-1" but this could not be found anywhere. Neither could "Blogroll." I'm wondering if I should not be using a modified version of the Kubrick default page, and find a custom template elsewhere. It's my understanding, Google is on the lookout for blog spam, and the WordPress default pages tend to look very suspect.

  9. moshu
    Member
    Posted 8 years ago #

    Did you try your admin panel > Links > and > Manage Links, or > Link Categories?

  10. Netdetective
    Member
    Posted 8 years ago #

    Thanks, that worked. I just wanted to remove the sidebar links.

    BTW, what's your opinion of custom modifying the default "Kubrick" page vs uploading my own custom page? Is this a good or bad idea? My homepage does not have a complicated design, so I figure if it's not too hard to achieve the same look in the default template, that should work fine.

  11. Netdetective
    Member
    Posted 8 years ago #

    I created a new page, but now my modified copy of the Kubrick template is not working in the new page. It's only working in the main /blog/ page. Should I create my own custom template, and put it in it's own separate directory? I get the feeling my modified version of Kubrick is likely to cause me endless problems. I would really much prefer to create my own custom template modeled after my homepage - http://www.beyourowndetective.com. You recommended I not use Dreamweaver to edit the template files, but would it be ok to use it to design and edit my own templates? If you go to my main /blog/ page, then click on my "When should you hire a private investigator?" link under "Pages" you will see my new page is completely lacking my custom graphics or designs that are on the main page.

  12. moshu
    Member
    Posted 8 years ago #

    Kubrick is a PITA for beginners... sometimes even for those who have been aroung for quite a long time. If you want to modify a theme - choose anything but the Default :)
    If you want your own theme, it should be in its separate folder like any other theme and should have all the necessary files.
    More > Using_Themes
    Theme_Development
    Blog_Design_and_Layout

  13. Netdetective
    Member
    Posted 8 years ago #

    Is Kubrick known to have bugs? Is even Classic a better choice? I could choose one out of http://wordpress.org/extend/themes/, but I would likely need to do heavy modification without Dreamweaver. I figured out what I was doing wrong. I needed to edit page.php.

  14. moshu
    Member
    Posted 8 years ago #

    No, it doesn't have bugs. It's just too complicated :)

  15. Netdetective
    Member
    Posted 8 years ago #

    Is the Classic template about as good as any for custom modification? When I put in my images, links, etc.. is it recommended I need to use absolute paths containing the full URL rather than relative paths, to prevent broken image links and broken links, since new pages will likely be generated in different directory structures? I normally use "/" "../" etc.. instead of the full URL. I added my own /images/ folder in wp-content/themes/ to contain the images.

    Why was Default made to be so complicated?

  16. moshu
    Member
    Posted 8 years ago #

    Too many question for 1 post (even for 1 topic :).
    There are about 300 themes or so. Find the one which is the closest to what you want and take it from there.
    It is one thing to put images in a template (e.g. as a bg-image) and it is a totally different thing to insert images in your post.
    Focus on one thing at a time ;)

  17. Netdetective
    Member
    Posted 8 years ago #

    If I am using images in my template, should I use absolute paths there?

  18. moshu
    Member
    Posted 8 years ago #

    @Netdetective,
    I can answer this question and hundreds more, of course, that's what the forums are for.
    The answer is: I'd create an "images" folder inside the theme folder and keep all the theme images there. So from the stylesheet I'd have to reference them like this:
    background: #xxxxxx url(images/mypic.jpg);

    However if you are serious about making your own theme, I am going to tell you how I started. Downloaded 3-4-5-27... themes and dissected them, studied what they did - until I completely understood how the template files work together in a theme. And have read all the then-existing articles in the Codex. The rest was just playing a bit with colors, margins and other stuff in the CSS file :)
    I am saying again, please, don't misunderstand, there is nothing wrong with asking questions. It will just take much more time until you "get the picture".
    Just my $0.02

  19. Netdetective
    Member
    Posted 8 years ago #

    I was able to achieve the look I wanted with the default template. I found the Kubrick theme easier to work with than the other themes I looked at.

Topic Closed

This topic has been closed to new replies.

About this Topic