enter image description here
I understand how to edit the style.css (first box i boxed)
I don't know how to edit the (index):321
please suggest me some solution
Index.php means that your internet browser found that piece of CSS code in index.php file. However, it mustn't be necessary physical index.php file because WordPress uses templates and usually builds page by merging/combining different files.
In the image that you provided I saw nav items, if you can't find this code in index.php file - probably you can find it at header.php file.
Of course both index.php and header.php files are editable just like style.css
Please remember that editing template files isn't very good practice - you may lost your changes when you will upgrade template.
Related
The problem is as follows:
Originally, all of the individual pages on my website were in the root folder of the site.
I have now moved the majority of the pages into various sub-folders.
For example: The main page for our Apache Totem Freestanding Light Box used to be in the root folder, but is now in subfolders: /lightboxes/apache-totem-freestanding-lightbox/index.php
The problem is that various elements of the page have “PHP Modules” included for common elements such as the header, the breadcrumbs, the footer, the css file etc.
For example, for the header we have as a link on each page.
The files that these “PHP includes” point to are situated in their own folder on the site root, called ‘modules’.
The trouble with this, is that the ‘PHP Includes’ can’t seem to find the modules because I guess they are expecting to see them in a folder called ‘modules’ that is situated in the same subfolder as the current page.
I’ve partially got around this by changing the link to the module to have ../../ in front to tell it that it has to look two folders up from the current folder, but the page is still having difficulties displaying all of the information.
To give you an idea of this, I have uploaded the Apache Totem Index Page in its subfolder /lightboxes/apache-totem-freestanding-lightbox/
https://www.w-co.co.uk/lightboxes/apache-totem-freestanding-lightbox/
As you can see, the main content of the page is displayed ok and the css file is doing its job with styling etc.
But there are various other problems, for example:
1. There is an image missing from the header
2. The quote button in the header and the content is pointing to the wrong place (quote.php is on the root folder but the button is trying to link to the current subfolder)
3. All of the items on the breadcrumb trail link to the current page
4. All of the links in the footer are also trying to point to the subfolder lightboxes
Is there anything you can think of to fix these issues?
Thanks,
Tony
The URL for the images should be something like this https://www.w-co.co.uk/images/worldpay/visa.gif
You have to use base URL https://www.w-co.co.uk and then image path. You can define("BASE_URL", "https://www.w-co.co.uk") and use it like in the following.
<?php
define("BASE_URL", "https://www.w-co.co.uk/")
?>
<img src="<?php echo BASE_URL;?>images/worldpay/visa.gif"
I know i might get downvoted for asking this but i really need to know:
I have index.php and no index.html
In my index.php, i dont see a body section.
I need to add some code to the body section.
I'm using wordpress theme named: "responsive".
Here is the link for it:
https://en-ca.wordpress.org/themes/responsive/
I would really appreciate it if someone could have a look and let me know where i can find the section.
Thanks
First, learn how to use WordPress. WordPress themes are located at wp-content/themes/{your-theme-name}/.
The index.php in web root does not relate to your user interface.
Wordpress is based on php so that means that you won't be writing purely html files. Instead of index.html your main page will be index.php.
In index.php you can still write 100% pure html, but you can also mix it with php. In index.html you can't add php code.
You'll find HTML in the theme's .php files. The <body> tag starts in header.php and you'll find </body> in footer.php.
There will also be an index.php, and/or front-page.php, and/or home.php file, but those aren't necessarily going to match up to your experience with index.html files -- they're used to output the content of your website's homepage, the blog page, or archives pages like category pages. Take a look at https://wphierarchy.com/ to learn more about what each theme file does.
Make a backup copy of your theme. Then you can start editing these files to see what they correspond with.
I'm following a PHP Ecommerce tutorial and for personal reasons I had to stop with the tutorial for a few months and today I got back to it and started off with a video where we are writing CSS code for a sidebar with categories so that it can have a scroll feature on it when more categories are added. I wrote the CSS and it didn't work, I tried watching the tutorial again and everything seems to be fine...then I noticed that if I delete the link for the stylesheet in index.php or any other file the CSS obviously won't work, but when I got into the styles.css file itself and delete all the code, save and refresh the page, the CSS remains on all page's while the CSS code doesn't exist anymore.
Please can anybody help? I will also post any code that you need.
There might be a default css file that's resetting your styles.css file. Check to make sure there is no other css file that controls the styling (one that acts as the main-stylesheet); simply do an inspect element on whatever div/id you want changed and see the css style that controls it.
I am currently building a gallery using some very basic php - namely the inclusion of:
<?php include("page.php"); ?>
but I'm running into an issue calling images.
To explain the situation, I am building a php page for each item of artwork I want displayed and instead of building 30+ additional pages in the root folder I have created a sub-folder (in this case '/art/' ) where all of the artwork pages will live. Linking to them is easy enough but when I go to view the pages items I am calling in such as header.php or footer.php don't appear.
Example:
<?php include("header.php"); ?>
Now, simply adding '../' resolves this issue and the header, footer and additional php items I need are imported.
<?php include("../header.php"); ?>
Unfortunately the images are not - all I get in their place is the default missing/broken image icon. Of course if I go into the headr.php page and add the '../' to each image I am calling in then it works great in the php files in the /art/ folder but then I get the exact same broken icons when I go to any pages in the root directory such as index.php.
The conclusion I am at is that while adding ../ does point the page inside the /art/ folder to look in the previous directory it is still trying to locate images from an image folder within the /art/ folder and not the /images/ folder in the root folder. I could easily just make a copy of the contents of the images folder and place it within the the /art/ folder but that seems redundant.
Is there a better, preferred solution to tell the php include where to look for the images? Or is it best to just house all php pages in the same root folder?
Oh I had this one before :),
It's an issue because when you import the file php just pasts
the file contents in the new file so the relative pathing is
then made from there.
TL;DR
Use dirname(FILE).'/'.(..) as your path's instead.
I hope you understand what I mean.
Im working on a section of my site which is for file storage. By default when you navigate to a folder without index.html all the files and directories are listed, and can be downloaded. I was wondering how I could keep this but style the page and add extra links and buttons to it. Thanks
The page is generated by mod_autoindex.
You can use the HeaderName directive to insert a file into the top of the response (including some content and <link>s to stylesheets.
I found this in a quick search, but haven't messed with it before:
http://paradox460.newsvine.com/_news/2008/04/05/1413490-how2-stylish-apache-directory-listings