Editing template
-
Is it required to move the CSS file with the template to themes?
-
When moving to the Themes folder nothing works. I does not show the changed version. Where do i change except for the css?
1) Which files are you moving?
2) Where did you move them to?
3) Do you have any caching on?I am moving Verify.php and tickets.php from templates to the themes folder.
And it does not find it. And shows the lines i have edited from the files.I don’t know. When i edit the files in templates folder it shows it correct. But not when moving a copy.
Are you moving them to WP-content/themes/, or to WP-content/themes/{your-theme}/?
The latter is correct.
WP-content/Themes/
You need to move them into your active theme directory.
Okay. I will try doing that.
It can’t find the css file. I have edited the ticket.css and followed the guide on your webpage. But somehow i can’t seem to get it to work correctly.
Can you send me a link to a ticket?
https://pyrotest.dk/krudt-aften/tickets/?ticket_id=co2fd11e8c4b060000
It should look like the standard ticket with a few changes. The addon of a name of a buyer.
The links to stylesheets in your templates don’t include a stylesheet; they’re just linking to the directory where stylesheets are held. Those directories are correct (if you want to be using the core styles rather than custom styles), but there’s no file name included.
Take a look at the documentation again, and verify that the code you’re using actually matches this:
http://docs.joedolson.com/my-tickets/2014/12/01/templating/
You don’t *have* to use that PHP code at all; all that you need to have is a valid URL to any CSS file that contains the styles you want to use.
I have made a few changes to the original CSS and want to use as much from the original things. Only with a few adds.
As i can see it should match up:
`<link type=”text/css” rel=”stylesheet” href=”<?php echo plugin_dir_url( ‘my-tickets/css/generic.css’, __FILE__ ); ?>”/>
<link type=”text/css” rel=”stylesheet” href=”<?php echo plugin_dir_url( ‘my-tickets/css/ticket.css’, __FILE__ ); ?>”/>`Generic.css and ticket.css is copied to the folder “css” in root plugin.
As they are changed a bit.Maybe i am doing it totally wrong i am still very new to coding. And try a lot of things. This does not work for me. As far i can see.
I’m not sure what you mean by ‘root plugin’. If you’re customizing files, you absolutely *must not* store them in the
/my-tickets/directory, as your changes will be erased as soon as you update the plug-in.You can place your CSS files absolutely anywhere on the server and reference them by a direct URL. E.g., you could place them at
/wp-content/and just use ‘/wp-content/ticket.css’ as in place of<?php echo plugin_dir_url( ‘my-tickets/css/ticket.css’, __FILE__ ); ?>.As i can see it works correct now?
Seems likely. There are styles loading at any rate; I can’t judge for you whether you’re getting what you want.
The topic ‘Editing template’ is closed to new replies.