Styles have disappeared despite being referenced correctly - php

Help!!! My worst nightmare has come true. My site is broken. It happened after attempting to install some PHP scripts to automatically minify and concatenate CSS and JS files. These were MISER and Minify. Each one created problems, so I took them out. Now none of the styles are showing, despite the fact that the CSS files are referenced properly. I had backed up the site prior to making these changes, but restoring the backup does nothing to fix the problem. Does anyone have any ideas? I am in crisis mode and nothing I do seems to fix the problem!

The following code is invalid:
<link rel="stylesheet" href="/themes/C5-LR/css/foundation.css'); ?>" />
<link rel="stylesheet" href="/themes/C5-LR/typography.css'); ?>" />
<link rel="stylesheet" href="/themes/C5-LR/css/main.css'); ?>" />
'); ?> should be removed in each link.

<link href="/themes/C5-LR/css/foundation.css'); ?>" rel="stylesheet">
<link href="/themes/C5-LR/typography.css'); ?>" rel="stylesheet">
<link href="/themes/C5-LR/css/main.css'); ?>" rel="stylesheet">
All these links are broken, remove ); and you should be good just like the above answer. You only need to reference those if you are using an
#import url('some-css-file.css');
instead of

Related

Stylesheet conversion for wordpress cannot use php tags

Im learning wordpress and I am using this youtube tutorial as reference https://www.youtube.com/watch?v=fZCFRQAcqLU
Im trying to convert my php code from
<link href="style.css" rel="stylesheet">
to
<link <?php bloginfo('stylesheet_url'); ?>rel="stylesheet">
After conversion, the page returns a blank page. I noticed that I cant use any php tags for this and I dont know why. it is already in my C:\xampp\htdocs\wordpress\wp-content\themes\wpbootstrap_master\index.php file. Any my Xamp is running fine. Help please
<link href="<?php echo bloginfo('stylesheet_url'); ?>" rel="stylesheet">
Use php code in href tag l
ie. href="<?php echo bloginfo('stylesheet_url'); ?>"
So I solved the question, turns out that the code is fine and it has no error. But since this is word press I needed to run it to its own server.

jqGrid 5.1.0 "Warning" ("Please, select row") Dialog Appears On Page Load

I am building a new app using jqGrid 5.1.0. When my page loads the grid displays as expected and contains the expected data. However, immediately a "Warning" box appears with the text "Please, select row". I can't close the Warning and I can't do anything with the rest of the page.
After thinking through the problem as well as Googling I suspected maybe the order in which I am loading .js and .css was the problem so I experimented with different orders but to no avail.
Here is what I am loading (paths altered for brevity but all .js loads and all .css is accessible)...
<script src="...jquery-2.2.3.min.js"></script>
<script src="...jquery-ui.js"></script>
<script src="...grid.locale-en.js"></script>
<script src="...jquery.jqGrid.min.js"></script>
<link rel="stylesheet" type="text/css" href="...jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="...jquery-ui.structure.css" />
<link rel="stylesheet" type="text/css" href="...jquery-ui.theme.css" />
Maybe I am missing one or more of either. Hard to say since, like I said, everything appears correct but I can't interact with the page.
Not sure what else to do.
Thanks for your guidance.
After further investigation I found I was missing .css for the grid. Oops!
<link rel="stylesheet" type="text/css" href="...ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" href="...ui.jqgrid-bootstrap.css" />
<link rel="stylesheet" type="text/css" href="...ui.jqgrid-bootstrap-ui.css" />
Page now loads without the Warning appearing and the grid, based on initial testing, works as expected.

CSS linking issues

i need some help with linking css to a php file.
This was completed by someone else and now i need to fix it. We have the main css that controls the look and feel of the entire site. The other CSS is just for the accordions page. that needs to be added in.
Current links include:
<!-- CSS Linking -->
<link href="css/template.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/accord.css" rel="stylesheet" type="text/css" />
If i remove the ?php echo from the second one it doesn't work, but if i leave it in there the css/template.css doesn't work.
Basically if both are in there are the same time they one doesn't work. Is there are way to resolve this?
The answer was that in the css of the second file there was an element of code that was overwriting the other file. The people had a body element. This has been removed and now both working together well.

Issue linking CSS to backend Zend Framework 1

I am working on a Zend Framework 1 application. It is successfully installed on my localhost and is working without any problems. However I've noticed that the css for the back end of the application is not working.
When I view the page source I can see the stylesheet has been loaded and can click on the link to it to view in the browser.
However the style is not applied to any of the elements on the screen and I do not understand why.
This is the layout file for the page: (adminstyle.css is not loading...)
<link href="/css/adminstyle.css" media="all" rel="stylesheet" type="text/css" title="default" />
<link rel="stylesheet" href="/css/smoothness/jquery-ui-1.10.2.custom.min.css">
<link rel="shortcut icon" href="images/favicon_2.ico" />
</head>
does anyone know what might be causing this issue? Apologies for the question if it seems stupid but I'm not really experienced with this sort of thing and I am trying to get to the bottom of it. Any help is much appreciated.
I can provide more details if required, I just do not want to post lots of unescessary snippets of code up.
Here is the right way to write links in zend framework cause with your way it will work just for the index/index , for other view you won't get the style css applied :
<link rel='stylesheet' type='text/css' href="<?php echo $this->baseUrl()."/css/style.css"; ?>" >
the same for your js files
hope it helps.

Linking CSS in Wordpress with PHP and bloginfo()

I'm attempting to link my CSS file with my header.php file for a Wordpress site I'm working on, but I'm having a little trouble following along.
I was told to set it up like so:
<link href="<?php bloginfo('stylesheet_url');?>" rel="stylesheet">
Below is my current code:
<link href="<?php bloginfo('/style.css');?>" rel="stylesheet">
However if you look at the current state of the site, http://thenerdup.com, it's obvious that the CSS file is not linked properly.
For what it's worth, this is the tutorial I'm following along with: http://blog.teamtreehouse.com/responsive-wordpress-bootstrap-theme-tutorial
I'm currently on the part about editing the header.
Thanks for any help.
Actually it should be
<link href="<?php bloginfo('stylesheet_url');?>" rel="stylesheet">
So it'll echo/print the url of your stylesheet.
Here bloginfo() is a function and stylesheet_url is a parameter of this function. There are other parameters too, for example if you write bloginfo('name') then it'll print the name of your blog.
Also you can use
<link href="<?php echo get_stylesheet_uri();?>" rel="stylesheet">
Read more at Codex.

Categories