WordPress.org

Ready to get started?Download WordPress

Forums

php newbie needs lots of help (23 posts)

  1. cpmjohn
    Member
    Posted 7 years ago #

    I'm php illiterate but clearly have/want to learn it. My site is http://www.imcool.com/wordpress . To start, I can't even find where top learn how to modify the text in the right-hand column. This includes the bold, black text "categories" of Pages, Archives, Catetories, etc. Why when I create a "category" does it appear twice, as a black text topic (?) and a blue link?
    Is there a tutorial that starts by describes/naming these basic WordPress components?
    Here's a site similar to mine, but has been modifed significantly: http://weatherbrains.com/weatherbrains/ so I know it can be done.
    Thanks, John

  2. moshu
    Member
    Posted 7 years ago #

    That site look exactly like yours, so I don't know what are you talking about.
    Show me an example of categories being displayed "double".

    When you say you want to modufy the "text' does it mean the text itself or its look?

  3. cpmjohn
    Member
    Posted 7 years ago #

    "When you say you want to modufy the "text' does it mean the text itself or its look?"
    Your question says it all: I'd like to control/create/delete/move/edit both. Where do I modify it at, including changing the order of appearance, text size, etc?

    Specifically, I'd like to change the black text "Pages" to something more descriptive. I'd like to have a black text topic for "About this site."

    About doubling, I'd like to have a black text topic of Categories, and then add subcategories beneath that and then pages. Can it be done.
    Thanks for your jumping in. Wish I could explain my needs better, but I'm a FrontPage html guy; php is still Greek and very frustrating.

  4. moshu
    Member
    Posted 7 years ago #

    It is not as much PHP as you think... but there is a learning curve.
    You should get first a bit more familiar with all the features and things in your admin panel's million pages.

    There is also a great resource at the Codex, the online manual.

    And when I separate two questions it is not by accident: they require totally different approach, so don't mix them again.
    Changing the text is ONE thing.
    Changing the look of it - a totally DIFFERENT thing.

    One is done in the admin and/or template files.
    The other is done in the stylesheet (like everything "style" related).

  5. cpmjohn
    Member
    Posted 7 years ago #

    I've been going through that tutorial for four days. It's all circular. I haven't yet found anything that helps. That's why I thought I'd ask for help...I really need a "win" right now or I believe I'll give up. (I also have a tough time reading the narrow columns; wish it closer to normal text pages.)

    Let me try for just one: how/where do I change the black text "Pages" to say "About this site"?
    Thanks, John

  6. moshu
    Member
    Posted 7 years ago #

    1. Make an account at the Codex and log in. Go Preferences and change the skin to Monobook. It will become 'normal".

    2. You should open your template files 9the ones in your theme directory) on your computer and edit them in a plain text editor - like Notepad. (not FP!)

    3. Obviously, to edit anything in the sidebar > you'll look for sidebar.php file.
    Find this line:
    <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>
    and replace Pages with whatever you want.

  7. cpmjohn
    Member
    Posted 7 years ago #

    1. Okay, will do.

    Understand plain text editing of php files, no problem.

    2. "You should open your template files 9the ones in your theme directory) on your computer and edit them in a plain text editor..."
    Confused. Edit them on my computer or first download them from the imcool.com/wordpress web folder, edit them and load them back up to web folder?

    3. Again, do I download these from online folder, edit and resave them, and then upload to replace existing files of same name?
    Thanks, John

  8. moshu
    Member
    Posted 7 years ago #

    Somehow I always assume that before uploading it to your server first you had to dowenload, unzip Wp on your computer... so you have it here. Don't you?

    Whenever I tweak a theme (and I do it a lot for myself and others) I always keep a copy of it on my computer. And before I start messing around with them, I always save the original as, say, sidebar-original.php... and then I start playing with the sidebar.php.
    Even if it seems "too much" clicking - believe me, it is worth the 'investment'. You can always revert to the original if somethinhg is screwed up :)

  9. cpmjohn
    Member
    Posted 7 years ago #

    Yes, I have it unzipped on the hard drive.
    yes, I do and will make a backup of those files before messing with them. I always do it with html files, even when using FrontPage.

    Of course, I keep a copy of the unzipped WP also. (If things really get bad...chuckle.)

    Thanks,
    John

  10. cpmjohn
    Member
    Posted 7 years ago #

    You said: "3. Obviously, to edit anything in the sidebar > you'll look for sidebar.php file.
    Find this line:
    <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>
    and replace Pages with whatever you want."

    I finally found the second sidebar.php, it contained the wp_list_pages command. However, after studying it, I have no idea "what pages I should use to replace what pages."

    Clearly I'm no where near ready be working on this program, and, moshu, I don't expect you to put up a tutorial. What I would like is a chapter and page in the "Codex" (?) where I can find this info. Again, I keep going from one section back to another to get definitions and explanations.
    Thanks,
    John

  11. Shari
    Member
    Posted 7 years ago #

    It takes a bit of getting used to, but if you've learned HTML and CSS or anything like that, it's not impossible. The thing to remember is the PHP tags are not like HTML and CSS - they don't change how something looks, they change what is displayed there.

    Moshu said: Find this line:
    <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>
    and replace Pages with whatever you want.

    You said: I finally found the second sidebar.php, it contained the wp_list_pages command. However, after studying it, I have no idea "what pages I should use to replace what pages."

    If I understand what Moshu said, he meant you can replace the word "Pages" in <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?> with another heading, like "About This Site".

    That will change the word "Pages" to "About this site" (or whatever you choose to type in between <h2> and </h2> in that string, and it will display a list of the pages you have created in your WordPress blog underneath it.

    If you want something else displayed instead of those pages, you would then need to put a different php tag in that line. For example, if you want the blog's description to display underneath the word "Pages" or "About this site", you would need the following:

    <?php bloginfo('description'); ?>

    and you would put that AFTER the above line of code that contains "Pages" or "About this site".

    I find this page enormously helpful: http://codex.wordpress.org/Stepping_Into_Template_Tags

    Hope this helps!

  12. pramodd
    Member
    Posted 7 years ago #

    Hi John,

    You have to make changes to the theme files
    edit header.php to change header
    edit sidebar.php to change sidebar
    edit index.php to change look of main blog page
    edit single.php to change how a single post gets displayed
    AND SO ON for archives, comments, etc

  13. cpmjohn
    Member
    Posted 7 years ago #

    Thank you Shari and pramodd.
    You've reinspired me. I am re-reading the template tags doc, but it difficult to comprehend.

    My plan is to create easy access "test" and "original" folders on my HD for header.php, sidebar.php, edit index.php, edit single.php, etc. This will make it easy to modify the files, upload them and then upload originals if I really screw things up...chuckle.

    New questions:
    1.Will I be able to add a lefthand sidebar to this "theme"? I'd like to eventually add adsense code.
    2. I I upgrade to WP 2.2, will I have to rework all of this code? (What files actually get changed in an upgrade?)
    Thanks again, John

  14. cpmjohn
    Member
    Posted 7 years ago #

    Shari, I changed "Pages" to "About this site." No problem.

    Then I pasted a copy of that complete line below it (to create a "Hot Topics" heading/category). However, that carried along the same underneath links with it, which I don't want. How do I remove those links, or can't I? (Is this a "Page" thing?)

    I added <?php bloginfo('description'); ?> and see that it just added the same upper heading sentence. Not at all what I wanted.

    What I really want is to be able to create "Categories," like Air Conditioning, Engine Cooling, etc., and have them show up under the bold text "Categories" title. The categories themselves should then take the reader to a page that shows links to blogs, pages and articles dealing with each that specific subject. Or can a blog not do that? (Maybe what I need is just html with comments?)

    pramodd, I now understand what you mean; editing the individual components of the theme. What's tough for a beginner is figuring out the internal code; adjusting something doesn't always produce what logic says it should.

    How do I move my "Opening Remarks" from "Categories" to "About this site."?
    Thanks,
    John

  15. moshu
    Member
    Posted 7 years ago #

    What I really want is to be able to create "Categories," like Air Conditioning, Engine Cooling, etc., and have them show up under the bold text "Categories" title.
    That's done for you by WP out of the box.

    The categories themselves should then take the reader to a page that shows links to blogs, pages and articles dealing with each that specific subject.

    That won't happen.
    Your should really get more familiar with WP's internal working before trying to tweak things..
    Also, it would be most beneficial to learn the WP "lingo" (terminology) to make sure we are talking about the same things.
    In WP there posts (the usual blog entries) and Pages.
    Better not mix them! They have totally different purposes.

    Also, the template tags have very well-defined functions. You cannot "move" the output of one under an other one; e.g. a category under the Pages.

  16. Shari
    Member
    Posted 7 years ago #

    John, do you have access to a hosted site that you could create a "sandbox" WordPress site on? One of the things that helped me the most was to set up a fresh, empty install in a completely different directory on my server and then just started tweaking a simple theme with three dummy posts.

    You need to learn which call functions correspond to which things displayed on the page. It took me several hours a day for a couple of months to really get solid with the different parts of a theme.

    Upgrading does not change theme tweaks. The instructions say to leave your wp-content folder on your server if you've tweaked it, and only replace those files which are in the new release.

    As for the "Hot Topics" question you asked - can you provide a link to the site? It sounds to me like you're trying to approach this like HTML, which is an easy mistake to make when you just start out...

  17. cpmjohn
    Member
    Posted 7 years ago #

    moshu and Shari,
    Thanks, I appreciate the reality check. Clearly I have to read and learn the lingo. Hear that it took "several hours a day for a couple of months" for Shari to come up to speed on WP themes helped my ego a lot. My "rush" is to make something "now" to produce good screen dumps for my extremely late print magazine. Ain't gonna happen.

    I've printed out the Codex for Pages and already see where I was off base. I'll make sure to learn "posts" as well. I'm still not convinced that Blogs are the thing I'm looking for. TalkBack's Comments on html pages may actually serve my purpose. Has anyone else bridged that gap? What does WP do that I can't do with html/TalkBack comments?
    Thanks again,
    John

  18. moshu
    Member
    Posted 7 years ago #

    I would be glad to give you a precise answer about the differences between html+talkback and WP... I just have no idea what that talkback thing is :)

    In general, WP vs. html - with WP you have a dynamic database driven website with a very convenient user interface (the admin panel) to add new content on the fly, so to speak.

    And since you mentioned a "magazine": searching for magazine or online magazine or newspaper and similar keywords should bring up some amazing exmples what WP users were able to achieve using WP for their magazines.

  19. cpmjohn
    Member
    Posted 7 years ago #

    TalkBack:
    http://www.scripts.oldguy.us/talkback/
    Nice sample: http://www.1914-1918.net/hallofmemory.php

    No to be argumentative, moshu, but "very convenient user interface (the admin panel)" is a stretch...except for you php gurus. It's not at all intuitive, after a week at it, I'm still unable to modify http://imcool.com/wordpress/ to be anyway near useful and user friendly to visitors.

    I'm pulling its announcement, or at least any graphic, from my print magazine. I thank you all for your help but I just don't have time to put my life on hold to learn the thousands of terms, commands, code, etc., to produce a workable site. I sit this one out for a month or so (to hopefully get over the frustration of failure).

    There probably are many online magazines written in WP, but I'll bet none were constructed by a novice like me. I'm not complaining..."a man's got to know his limitations"...chuckle. I do have a nice running php-driven site, http://www.goHTSN.com, that uses the Article Manager script. That's more my level. Cheers,
    John

  20. moshu
    Member
    Posted 7 years ago #

    I understand.

    (just for the record: I said convenient interface for adding content - NOT for designing/modifying the look!
    + I am totally PHP illiterate, everybody knows that; however I have strong html and css skills, that's true)

  21. cpmjohn
    Member
    Posted 7 years ago #

    Sorry, I misunderstood/misread your PHP knowledge.

    To correct a mistake in my last post, http://www.goHTSN.com is a cgi script, not php. John

  22. Shari
    Member
    Posted 7 years ago #

    Moshu, you can't be PHP illiterate... haven't you designed several themes? I'm CSS/HTML literate, but I can only mod themes and only then with limits because I don't know a lot about the PHP tags that I need to use/modify!

  23. dopecoder
    Member
    Posted 7 years ago #

    Why when I create a "category" does it appear twice, as a black text topic (?) and a blue link?

    Hi cpmjohn, i also had the same problem as you. Here is how i fixed it. Instead of wp_list_categories, change to wp_list_cats

    This will remove the duplicate category name.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags