Changing the comment template in wordpress - wordpress

So wordpress uses php wp_list_comments(); to go into the wordpress core and fetch comment-template.php to output comments.
As I understand it, editing the wordpress core is a no no, so how does one go about styling the actual comments themselves?
This is only possible so far with CSS, but I want to completely change how they look and for this I'll need to edit the php/html.
The comment-template.php itself is monolithic, writing any semblance of that is frankly, beyond my abilities.
So how can I edit that, or create my own without breaking the wp core?

Related

How to edit an already existing Wordpress theme?

I know it can be a very dummy question but I'm trying to figure out how I can develop and make changes in an already existing wordpress page (write new code, etc)? Before the changes go online, I must be able to save it somehow and I also need approval from its owner.
What is the best practice for it? It has some paid plugins also, I was thinking that I should create a parallel wordpress site exporting everything from the existing one and work locally.. how does it sound? Any suggestions?
I work on mac and use Docker.
Many thanks in advance!
Cheers!
Have a read on Wordpress Developers relating to Child Themes. Tou can get started here - https://developer.wordpress.org/themes/advanced-topics/child-themes/
This will allow you to activate a child theme over a normal theme and any changes you make to its functions.php will not be overridden when the parent theme updates.
You will just need to maintain the code incase major updates are undertaken on the parent theme.

Adding a CMS (wordpress) to a website?

I have made a site using html, css and javascript and is only on my local machine and have not put it onto a server yet, but i was wondering if i could use a cms on this site like wordpress? The site is only 5 pages but i have done all the styling myself.
Would i just have to install wordpress to the server and add the files there maybe? Or is there a lot of changes needed to make this work?
I have very little knowledge of PHP but i am a quick learner if that counts for anything.
Thanks for help.
Simple answer: yes
More complicated answer: why?
If your site is only 5 pages, and you've custom designed and built your layout, then I'm not sure what WordPress will add for you.
That said, if you want to add a blog or the like, WP would certainly be nice to have.
If you want to go that route, you have a few options:
use WordPress for everything, using the 5 pages you made as 'pages' inside of WordPress. You'll have to modify what you built for that to some extent.
leave the 5 pages as-is but add WordPress 'next to it' and run the blog/cms content from there. It can look the same, or maybe you want it to look a bit different.
leave your 5-page site as-is, and use WordPress or another CMS product on a separate server. You can set it up as a subdomain and then either install your own, or leverage something like Posterous or Wordpress.com
The short answer to your question is:
it will take some effort, you won't be able to just drop the files and install wordpress and have everything work immediately. With some work, though, it is definitely possible.
If you've done the styling and you want to incorporate that into wordpress you'll have to go through the process of creating your own theme. http://themeshaper.com/2009/06/22/wordpress-themes-templates-tutorial/ Try this site to see what that requires. Alternatively, google "creating your own wordpress theme" or something similar.
It will require some extensive PHP work, but a lot of these tutorials have already done that heavy lifting for you. In any case, it will be worth it for your to pick up some PHP skills, enough to follow along the tutorials.
I had to do this myself and what you can do is integrate your design into an existing design. You could just create your own theme, which takes some time but it is the correct way to do it.
http://yoast.com/wordpress-theme-anatomy/
I knew 0 php and I was able to create my own theme in a few hours. Best of luck.
I'm not sure what you mean "add the files there", I assume you means that use a WordPress-based website to display your site, then you can simple create a page by WordPress and then link this page to your site.
But if you means to create a wordpress theme which based on your existing site, then you can search a tutorial and follow it to create a wordpress theme by yourself. Making a wordpress theme will needs some PHP work, but not complicate, wordpress has very detailed documations and API.
I would suggest using the Umbraco CMS for it. The advantage is that you start with an empty site, add your css, js, and create your own content types, paste in your HTML for the templates, and you're ready to go. It is a perfect CMS for few page sites to larger sites and also has a great community around it, including lots of documentation and screencasts. Templating is done with the Razor syntax, very easy to learn and lots of documentation. You'll need to have a Microsoft-based server to host it and this may be a barrier depending on your hosting scenario.

Do I have to Upgrade WordPress to "pro" if I want to edit the CSS?

I started using WordPress just a few hours ago because I need to develop a couple of blogs to a client. I understand that WordPress is the best solution if you want something fast but flexible. But, the first thing that I wanted to do was just change the font of the post and I didn't find how to do it (for all the posts, because I changed it on this one using the HTML editor). I've read something about editing the CSS, but it turns that I need to buy the Pro upgrade to be able to use the custom design.
Is this the same if I use WordPress in my server?
I need someone to guide me on this one. I need WordPress as customizable as it can be. But, I prefer not to pay! :) Unless that's the only way to do it.
If you use WordPress on your own server, you can do anything you like to it - it's open source. The "Pro" upgrade is just for WordPress blogs hosted on the commercial WordPress.com platform.
Do note that running your own installation means you're responsible for adding plugins, themes, keeping the code up-to-date, etc. That has a cost too, even if it's not money directly out of your pocket.
If you are using wordpress on your own server - you are free to do anything with it. The best way to customize your site then is using a child theme. It will contain your customization, overriding styles from previously loaded parent theme (and/or adding some scripts). You will be able to upgrade parent theme then without loosing your customization (until parent theme owners deprecate something you use, but it must not happen often). There are some plugins for simplifying working with it as well. There are also some easier customization ways, if you want just minor changes - such as Custom CSS in Jetpack plugin, which works in similar way, as far as I know.
If you're using a wordpress.com account, you have less freedom in modifying things, consider using paid custom CSS plugin maybe. Or maybe mentioned above jetpack will do.
Also, as mentioned in other answers - there are wordpress codex, wordpress.org forums, and wordpress stackexchange, they seem to be better place for such questions.
In your wordpress admin section of your site (usually www.yourdomain.com/wp-admin) on the left hand side nav bar, you will find a section called "appearance", if you expand this and click "editor" you can edit all of the files that your current theme uses. A quick warning, if you are doing this on a live server, the changes you make are live as soon as you save them!!
Hope this helps
I'm pretty sure you do not have to pay to customize CSS. Check your server installation... particularly in the folder $wordpress_install_home/wp-content/themes/default.
You should have access to all the CSS files in there.

Custom Wordpress Editor?

After looking around for hours I couldn't see anything even close to what I saw here:
http://www.youtube.com/watch?v=Y2Bu5NoYZ7M&feature=player_embedded
As you can see, they created a custom editor for Wordpress (not just some edits to TinyMCE), its a whole different editor even with an option to switch back to TinyMCE.
Does anyone know how to create custom editors for wordpress without altering the core files and just via a custom theme? I am starting to think its a custom meta box...but I am not sure.
Any clue will be much appreciated!
I suggest to use a plugin to extend the default tinymce WP uses.. Take a look at this plugin: http://wordpress.org/extend/plugins/wp-super-edit/screenshots/
If you really want a completely different editor, ckeditor is quite ok.. There is a plugin too: http://wordpress.org/extend/plugins/ckeditor-for-wordpress/screenshots/
Always use or write a plugin an don't change any core files is indeed the way to go!
Please let me know what you think!

Wordpress creating custom theme-Reusability

first approach to CMS and wordpress I'm wondering if there's any predefined html structure and classes/IDs "must-be" reference that I can refer for making my own theme willing to change in the future for another wordpress theme
thanks
Luca
There are a few other 'template' themes that could get you started - if Starkers isn't quite your thing, you might find WP Framework a good alternative. Or - just start stripping down the Twenty Eleven theme to give you a base (which is just what the Starkers theme does, using the Twenty Ten theme as a base).
There's also quite a handy first-time guide on the WordPress Codex around theme development if you'd prefer to start from scratch.
Wordpress doesn't require you to have any specific classes or IDs in your theme in terms of the HTML and CSS, the only things WP needs are things like the wp_head function inside your element on every page. Having said that themes such as Starkers were created to enable developers to have a starting point instead of starting from scratch.
Now the above applies only to whatever code you write, there are however some functions in WP that will return standard code, for instance if you don't specifically create the comment thread code, WP will generate it for you, and that is really the only code that many themes will share.
I would say that if you are intending on making a number of blogging themes for instance, having a set of standard code might be a good idea, for the article pages for example, so that you don't have to re-write code over and over. Aside from that the only code I ever reuse when making themes is the CSS to style comments if I don't hand-code the comments section, this is a good idea as it will save you a lot of time.
Wordpress provide some functions which add CSS classes depending of page type, templete, conditional tags . . .etc.
These functions are body_class() and post_class().
For more info check:
http://codex.wordpress.org/Function_Reference/post_class
http://codex.wordpress.org/Function_Reference/body_class

Resources