Why doesnt' my bootstrap work on specific pages? - php

I'm doing some school homework right and am creating a PHP site. I'm using an HTML template demo as my template, however, after some editing, certain pages won't load bootstrap properly unlike the others. Here are screenshots of the site:
While on another page they load properly.
Also, before I sign in, my modal had no container.
It will be a great pleasure for me if anyone would be able to help me.
Thanks in advance!
edit: i didnt know what or where it went wrong so i upload my whole project here : https://github.com/ch182/spp

Related

Function in button

So I'm working on a wordpress theme and it's really twisted. The problem is I'm comfortable just with html and css, as I'm a code noob, so I would really appreciate your help here.
The problem here is that I want to put a tracking script and a redirect on a specific button. I'd now how to do this if I'd find the button's html form.
But when I go to the code in the page where the button is, this is the only thing showing regarding the button
<?php BookYourTravel_Theme_Utils::render_submit_button("primary-btn",
"submit-accommodation-booking", esc_html__('TRIMITE REZERVAREA',
'bookyourtravel')); ?>
BookYourTravel is the theme
I know you should maybe see all the files to know what to do, as this doesn't seem as enough info.
But I also have a functions.php file. Should I look there? Do you have any idea where should I go?
Thank you a lot. Really stuck here.
Are you writing the theme yourself or are you working with someone else's theme? If you're working on someone else's theme, I would reccommend looking into building a child theme so if you change some code, the OG theme is still there in it's entirety and if they update the theme, your code wont get destroyed in the update. There are tons of tutorials on how to set up a child theme and theres a plugin that will make it for you called Child Theme Configurator if you're not too keen on doing it yourself.
You should be super careful when you're editing functions in your theme(especially if you're new to PHP), but that's where this html is being generated. One of those functions is the thing that's generating your html. If you find where the function is held, you could probably change it so it echos the extra code you're looking to implement but it would be on every button that this function generates throughout your site.
You didn't really give enough information for us to do anything. So if you are really pulling your hair on this one just replace the old button with a new button that you wrote. I can help you out on that end if you don't know javascript.

Advanced Custom Fields Issue

So, there's a code that I've recycled multiple times on sites as it's well liked by my company. I am trying to update and recreate my portfolio due to my old hosting company wiping my entire file system. My fault for not having a back up, but lesson learned. Makattak.com Using this code here, I am unable to get anything to display.
A site I've used it on is here: Bowhunting.com
Here is a photo of my repeater field in ACF. I followed the same structure but still cannot get anything to display.
Can anyone offer some suggestions as far as what I am doing wrong? I've tried cutting things out, I've tried rebuilding from scratch, I just can't seem to get the loop to happen.
I am using the latest version of WordPress, and the latest purchased copy of ACF: Advanced.
I know this my sounds stupid but, did you assign the template to a page and select the page on the wordpress Reading settings?
Thanks to both Dre and Raul Cruz, I was able to find the issue.
I didn't set the Reading Settings to Home Page, static.
I revamped my code to change the_sub_field('field'); to
get_sub_field('field')
a change I made while debugging but didn't revert back
There was an issue with my syntax, and when writing the code back in, line by line, testing after each line, I was able to get what I needed back in working order
Thank you both for the help.

How to change code on the front page of a Magento store?

I am helping out with a Magento store initially configured by another developer who is now gone from the company, and I have no experience using Magento at all. Instead of using the built-in newsletter tools, he created an HTML form which points to a completely different server (which he owns) and now we no longer get notifications when a customer signs up for it.
Somehow, he embedded the HTML into the front page of the Store's website. I spent hours looking for the HTML and did find it, in a page called "Subscribe.phtml". I got happy, changed the code inside that page to what I want it to be, uploaded it back to the server and... nothing. No change at all to the site. I flushed the cache but that did not help.
The page does not appear to have much code in it. In CMS->Pages->Content, it shows only this:
{{block type="featuredproductslider/featuredproductslider" name="featuredproductslider"
template="magentothem/featuredproductslider/featuredproductslider.phtml"}}{{block
type="newproduct/newproduct" name="newproduct"
template="magentothem/newproduct/newproduct.phtml"}}
Under Design, it shows only that the layout is "3 columns". There is literally nothing else in this section.
Can you help me understand how I can change the HTML in this area to make this work? If this is helpful, here's a picture of the area that I am trying to configure:
Thank you.
On page 44 of the manual, there's a section called "How to find out which layout file to modify". I used Template Hints and figured out where the code lived. This is what Jim was referring to. It would have been nice for someone to instruct me on how to do this.
I set it up and found that the previous developer had modified the template directly rather than use blocks or other parts built-in to the system to modify the front page.
You can enable template hints in the Magento configuration:
Go to System->Configuration
Change "Current Configuration Scope" to "Main Website"
Go to Advanced->Developer
Under the Debug tab, choose "Yes" for the "Template Path Hints"
Save configuration.
Now go to your homepage, refresh the page and you will see paths to all templates used on the homepage. You will then get a good idea of where each block comes from.
It won't solve your problem, but it might help you find the right template to edit.

Page Jumping Error from HTML to PHP - Site coded in tables?

I am working on a site that was previously developed by someone else.
You can see the site here: http://www.pivotalevents.com/nonametag/index.html
Having issue on this page here: http://www.pivotalevents.com/nonametag/introduce.php
I have coded in a CAPTCHA on the contact page and used some PHP, making the page a PHP extension file 'introduce.php'. Previously it was 'introduce.html'.
The problem: When going from any page on the site, to the contact page, the entire contact page jumps around. The page expands, then collapses back to it's normal width. If you look at the logo, you can see it jump out, then back in.
When I change the page back to .html extension, it doesn't do this.
Why is this happening? Is it because the site's main wrapper is a table?
Any direction would be greatly appreciated! :)
Yes this could be because the site's main wrapper is in a table...
I re-wrapped the site in div tags and now the page does not jump. Seems there was a problem related to the tables and switching from HTML to PHP.

Facebook Plugins wont work with ajax

I have a blog page that uses ajax to call different article from PHP files once the relevant link is clicked. The problem is that when the PHP loads the Facebook plug-ins don't work. If I open the PHP files using the URL directly in the address bar on the browser then they work fine. I am including links to my page so that you can see it in action. If you replace blog.html with blog1.php you will see what I mean. I would really appreciate any help. Thanks. http://www.tagwebsites.com.au/blog.html
I managed to sort this out with the help of Facebook. The issue was as simple as adding the BFML tag to the html tag at the top of each page. It works great now. Thank you to everyone that sent messages through. I really appreciate your help.

Categories