• Yea, that’s a bad title, but I am somewhere below step zero, I have installed WordPress 3 times and crashed it 3 times (had to uninstall). But it isn’t for a lack of ability, if I gave my full resume I would be over qualified for a very long list of IT and programming jobs. But over the years I have aggressively avoided third party libraries (WordPress, Jquery, etc).

    For 2 different, super complicated, reasons I have offered to help with 2 websites that use WordPress. Well, one has it running, not going to touch it till I figure out how to use WordPress. That is where the second one comes in, as the person that will be using it (once it’s built) is familiar with doing certain tasks in WordPress (some addon, plugin, or something).

    Is there is no simple way (for a programmer) to change stuff in a theme??? I want to add/change a background image, I want to change a font color, I want to not have a link underlined, I want to change the size or position of a div, and several other things. And the biggest thing I wish to change is the “headers” and “footers”, just about every theme has some crazy thing going on. I have used CSS and HTML so much that for most things I don’t need any reference material, but when it comes to changing it in WordPress I am completely lost. What is most shocking is that things that seem hard coded (should be found in a file) are stored in the database (definitely wrong). But if I edit the database manually, at all, the best case scenario is stuff (html elements) disappears. Some themes have a paid option to, in theory, change “some” stuff, but if the free option is nearly garbage I am not inclined to pay anything.

    So how do I setup WordPress to have full editing ability on a theme??? If you’re wondering which theme, so am I. I have tried 4, and deleted 4, so I am not really sure.

    • This topic was modified 2 years, 4 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m not sure what you’ve seen so far, but this is a good place to start:

    https://developer.www.ads-software.com/themes/getting-started/

    As far as how to find everything, that’s a little bit hrader. Because WordPress is able ot be customised in many wys, there’s also many ways that these customisations could be happening, and they all depend on how the themes author has done them.

    Even with this, there’s still a range of WordPress functions that are normally used, and these are called using actions and filters. Normally CSS files will be added using wp_enqueue_style() and JavaScript will be added using wp_enqueue_script(). But again… different themes may do this in different ways and at different points.

    One thing to keep in mind is that any changes done to a theme should either be done by creating a Child Theme, or done as CSS edits in the Customizer. That way your changes won’t get over-written by any future theme updates.

    Thread Starter shanekh

    (@shanekh)

    I think my frustration made that post a bit longer than needed.

    Your link subtlety suggests building my own theme. That thought has crossed my mind. I am avoiding that option as generally figuring out somebody else’s code is not fun, event if it is well documented. It turns a weekend project into a multi-week project.

    That Customizer, I think that is what is used for the default theme, and its utter garbage. I am fairly certain not all the CSS can be modified with that, and maybe the bigger issue is it can’t add CSS.

    The Child Theme seems like a waste of time, it’s the same amount of work as building a full theme, but you have the added headache of figuring out how to fixing someone else’s screwed up theme.

    I guess I was hoping there was some pre-built way to display, and edit, all the CSS for a theme. Maybe along with that all the class and id attributes so you can add CSS.

    Hmm, in that line of thought, does that wp_enqueue_style() function call all the CSS for a theme? And then does that function or some other function allow the creation/editing of CSS for a theme? If so making a plugin, to hack the themes, maybe an option. I guess I could also build a PHP function to look through the database and theme files to find all the CSS. But then the issue is whether WordPress will allow me to make changes?

    • This reply was modified 2 years, 4 months ago by shanekh.

    What you are talking about… just isn’t right.

    WordPress uses it’s functions to enqueue various CSS files. That’s how themes, and some plugins, set up the CSS for the site. Unless it’s set up as options on the theme (some themes do this, some don’t) then the CSS is all in .css files. Which files these are varies depending on the theme. The only one that’s going to be standard across any theme is the main styles.css file – but that doesn’t have to have any actual CSS rules in it. They can be somewhere else.

    When I mentioned the Customizer, you may be looking at something wrong because the main thing I’ve ever used that for is to add in additional CSS rules that are inserted by WordPress into the <head> tag after the other CSS files have been loaded. Just to be sure, when you’re on your site editing it (somewhere in the public site), you click on the ‘Customize’ button on the to admin bar, and then go to ‘Additional CSS’. That will let you add in the style rules that you want to add.

    Again, each theme is different and can do things a different way. If you can give su an example of a theme, and what you want to do with it, then we might be able to help. Remember, it’s not a general setting somewhere so you can’t just go and do something in the admin are to change things around.

    Thread Starter shanekh

    (@shanekh)

    I did see the “Additional CSS” field. First, it didn’t seem to show up for every element I could select (hard to remember that many iterations back). And second it was very ambiguous as to how it works. As I have been digging around it looks like that adds inline style, which blows my mind. The “style” attribute at one point was “depreciated” (might have been early on in the release of HTML 5), that looks to have changed, but at minimum it is bad coding practice to use inline styles. I would think a CMS would be trying to force best practices so there is some common standard for editing.

    Really the issue is that for most WYSIWYG’s it’s standard to have an option to edit the “code”. WordPress doesn’t have that which is really strange.

    At this point I think I need to just forget the easy route. May see what I can do with building my own theme, first. But if that proves to be a hassle I may be tempted to just create a PHP function that parses the HTML output of a WordPress site to find all the CSS. Then create a function to override the CSS output of a theme (at minimum cleaning up the messy HTML). And if I need to I am fairly certain I can modify the core of WordPress, albeit, a bit more involved as updates have to be “handled”, but doable.

    I’ve been forced to use my development environment and configure it for a whole new project for this website, so that means all the guns are on the table. No ill contrived code is safe.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Modify my theme’ is closed to new replies.