Everything posted by mrludable
-
Error in HTML
Hi guys & gals, I have a WordPress site that has been live for over a year, there are 2 versions of it (2 different languages) but on the main site (English version) there is an error in the HTML. Looking in the header.php file I don't any issue. Attached is a screenshot of where it says the error is compared to the actual code in the .php file. The other language version of the site is fine (it's a duplicate)... *The 'og' in the <html> tag is from an SEO plugin, I have disabled this to see if it fixed the problem but it hasn't. Thanks for the replies!
-
Visual Composer Issue
Hi all, I've used VC on many WordPress sites, I think this is the first time I've seen this. The Backend Editor button is not displaying, it was working fine a few days ago, as I was making an edit it disappeared. I have updated everything, disabled all plugins, checked VC settings to make sure Backend Editor is enabled, still nothing, it just shows the VC code, as in screenshot attached... Any help? Thanks, Al.
-
Google Maps Link
Thanks for the replies guys. Great info there. I'm not sure if the client wants to go ahead with it now anyway, but at least I have an idea of how to go about it now. Cheers!
-
Considering a career change -thoughts?
Welcome to forum! rbrtsmith's response was spot on. I'll give you some feedback on how I got to where I am. I started back in 2010 doing some courses until 2012, after being a barman for about 8 years. The courses I did were, Web Design for Beginners, Advanced Web Design, PHP & MySQL and some other part time courses. I ended up getting an internship with a web design company which turned into a job (front-end). I do really enjoy it but I wouldn't consider myself anyway near as good as rbrtsmith, he answers all my questions - thanks rbrtsmith & Jack too. I find that I am probably not up to date with everyone else, with 2 young kids at home it's hard to find the time to keep up to date with everything. This forum is a great place to start and to get help on just about anything!
-
Google Maps Link
Hi guys, Hopefully this is straight forward enough. I currently have a site with GPS coords listed, how would I go about creating a link to open Google Maps so a user can 'Find a Route'. Hope that makes sense. Thanks, Al.
-
input[type="radio"]:checked + span Styling Issue
Hey Jack, Here is a very basic fiddle of it - https://jsfiddle.net/allanlud/usjoL467/3/. It does work fine here, but that is only a small portion of the overall form, there are many more options down the form similar to what you see there. So I was hoping to find out if there was a cleaner way to write the jQuery code or is it ok as is?
-
input[type="radio"]:checked + span Styling Issue
Thanks for the reply Jack. It sure is in relation to the previous post. What I'm trying to do is use a bg image in place of the radio button but keep the radio button functionality, I seen while searching earlier that some people mentioned that if the radio button (input) is set to display none it won't work. Here is what I am trying to accomplish. Which brings me to the next point, there are different sections in the form and when a user selects one section I'd like another section to appear. Here is the code I have so far some the sections, I'm a novice at all this so excuse the coding and I know there must be a better way to code this up. $('input[name=window]').change(function () { if ($(this).val() == 'Front') { $('#damageChips').show(); } else { $('#damageChips').hide(); } }); $('input[name=damage]').change(function () { if ($(this).val() == 'oneToThree') { $('#chipSize').show(); } else { $('#chipSize').hide(); } }); $('input[name=chipsize]').change(function () { if ($(this).val() == 'fingernail') { $('#edgeChip').show(); } else { $('#edgeChip').hide(); } }); $('input[name=edgechip]').change(function () { if ($(this).val() == 'Yes') { $('#result').show(); } else { $('#result').hide(); } }); $('input[name=continue]').change(function () { if ($(this).val() == 'Yes') { $('#details').show(); } else { $('#details').hide(); } }); What the code above does is display the next form section, but what I noticed is if I select in the correct order the options above, they work fine but if I go back to the start of the form and change the first option the other options below are still displayed so I'm thinking I'll need some code to group them together somehow, rather than have them work individualy - hope that makes sense. Al.
-
input[type="radio"]:checked + span Styling Issue
Hi again, I'm trying to style radio buttons and display a bg colour on the span when the radio button is selected but it doesn't seem to be working. Here's the HTML & CSS. <div class="options"> <label for="windowFront"> <input id="windowFront" class="js-radio-button" name="window" value="Front" type="radio"> <span>Front Windscreen</span> </label> </div> .options label input[type="radio"]:checked + span { background: #ed1c24; color: #fff; } Any ideas why it's not working? Thanks, Al.
-
jQuery & Radio Buttons
Perfect, thanks very much Jack!
-
jQuery & Radio Buttons
Hi all, Just looking to add checked="checked" to a radio button when it's selected. Here's one of the radio buttons: <label for="windowFront"> <input id="windowFront" name="window" value="Front" type="radio"> <span>Front Windscreen</span> </label> Thanks, Al.
-
HTML Form Help
Thanks for the replies guys but I've actually got it sorted =)
-
HTML Form Help
Hi all, hoping someone in here can help me. Basically, I have a form, the form has a quantity dropdown, this quantity represents the amount of people taking a course. The quantity of people ranges from 1-25 with 2 sets of prices, 1-9 = €70 and 10-25 = €40. What I need is a way of calculating the total price depending on how many people were selected. This form then needs to be sent to the client and PayPal - but that's probably a whole other thing. Thanks, Al.
-
jQuery Conflict
Thanks Robert, that's sorted the issue now =)
-
Shopify Coding Help
Hi all, I've been working on adding custom fields to a product to allow a customer to added text etc. I came across an issue this morning which is, when a customer is on the cart page they see the product and the custom field data they have added, text image etc - I have a bit of CSS styling added to this page, basically something like: Text on Front: Hello World (text before : in bold) When the quantity is changed, lets say from 1 to 2 the styling is removed. Anyone know why this would be? Ok, looks like the code I need to edit is contained within {% raw %}, here is what I'm looking at: {{#properties}} {{#each this}} {{#if this}} <p>{{@key}}: {{this}}</p> {{/if}} {{/each}} {{/properties}} I have 2 custom text fields and 1 file upload field. The file upload field needs to display an image. Here is what the code looks like further up in the cart-template.liquid file. {% assign property_size = item.properties | size %} {% if property_size > 0 %} {% for p in item.properties %} {% assign first_character_in_key = p.first | truncate: 1, '' %} {% unless p.last == blank or first_character_in_key == '_' %} <p class="custom-section"><span class="order-variant">{{ p.first }}: </span> {% if p.last contains '/uploads/' %} <a class="order-custom-image" href="{{ p.last }}"><img src="{{ p.last }}"></a> {% else %} {{ p.last }} {% endif %} </p> {% endunless %} {% endfor %} {% endif %} Any ideas on how to add that in the {% raw %} section? Thanks, Al.
-
jQuery Conflict
Hi all, I'm not the best with jquery but basically I have a WordPress site that is using Rev Slider and I have added the following snippet of code to adjust some divs on resize: <script src="https://code.jquery.com/jquery-1.10.2.js"></script> <script> $(window).resize(function() { if ($(window).width() < 1100) { $('.swap-one').insertAfter('.swap-two'); } else{ $('.swap-one').insertBefore('.swap-two'); } }); </script> The CDN was copied from an example I found, not sure what should be the correct jquery version, but basically there is an issue with this and the slider, they don't seem to work together. Here is a link to the site. Rev slider looks like it's using this: .../wp-includes/js/jquery/jquery.js?ver=1.12.4'></script> My code is in the footer. Thanks, Al.
-
Adding a Class to Article Sidebar Links
Hi Jack, sorry only getting back to this now. The second section of code above looks like it will work as it was throwing out the individual article ID's and then the current article ID so that will let me add a class to a list item, the only thing is how will I code that now, adding your code above displays the ID's what I need is an if statement along the lines of, if article.id is equal to currentArticleId display class="on". EDIT: I have just added this: {% if article.id == currentArticleId %}class="on"{% endif %} And that has added the class 'on' to the current article, that look OK to you? It's working on my end, thanks so much for your help Jack, solved a problem I thought I wasn't going to get sorted! =)
-
Adding a Class to Article Sidebar Links
Sorry this might be a stupid question but when you say active classes you mean what I am trying to add the active class to? I was getting a warning in the back end when adding your code above, just added this in to see what it would display and was just the Blog name. {{ current_url = blog.url | append: blog.title }} I was trying to add something like this earlier, but not sure how to code it: {% if article.url | remove: "/blogs/" == article.handle %}class="on"{% endif %} I was getting the same result when using {{ article.url | remove: "/blogs/" }} and {{ article.handle }}.
-
Adding a Class to Article Sidebar Links
Just tried that again and this is what was being output: {{ article.url }} was displaying /blogs/news/article-handle <-- I removed the real article handle and {{ current_url }} was displaying /blogs/news *I had explained to the guy on Shopify forums that the page_title would not be the same as the article.title because we would change the page title for SEO reasons, hence why his first solution did not work.
-
Adding a Class to Article Sidebar Links
Geeting some help from someone over on the Shopify forums, he had suggested the following but nothing has worked yet. <a href="{{ article.url }}" title="{{ article.title | escape }}" {% if article.title == page_title %}class="on"{% endif %}>{{ article.title }} {{ page_title }}</a> {% assign current_url = blog.url %} <a href="{{ article.url }}" title="{{ article.title | escape }}" {% if article.url == current_url %}class="on"{% endif %}>{{ article.title }} {{ page_title }}</a> =(
-
Adding a Class to Article Sidebar Links
Hi Jack, Thanks for the reply mate, unfortunatley that didn't work, I was trying something similar but wasn't sure if I was on the right track. To me it makes sense to have link.active in there but it just doesn't seem to work. Any other thoughts? I had thought that maybe page.url == to article.url that might work, but don't think the page.url applies to blog articles =( Thanks, Al.
-
Adding a Class to Article Sidebar Links
Hi all, What I want to do is add a class (class="on") to the links in the sidebar of an article but I want only the current link to have the on class, if that makes sense. Currently I have a list of links (most recent blog posts) in a sidebar and I want the current article to be highlighted with the on class and some CSS but I'm not sure how to go about it. I have an OK understanding of liquid but just not sure how to code this? Here is the code for the sidebar links: {% for article in blog.articles limit:20 %} <li> <a href="{{ article.url }}" title="{{ article.title | escape }}">{{ article.title }} {{ page_title }}</a> </li> {% endfor %} How can I add a class to only one link depending on what article a user is on? Thanks, Al.
-
Gift Voucher Plugin?
Hi fisicx, thanks for the reply. Would greatly appreciate if you could point me towards coding this myself or even links to those plugins? Thanks, Al. =)
-
Gift Voucher Plugin?
Hi all, I'm just wondering how I would go about adding Gift Voucher functionality to a website. What I want is for someone to pay an amount then receive an email that they can print off and bring to a store. I looked around for some plugins but didn't find anything that suited. Any ideas? Could a PayPal button be a good option? Thanks, Al.
-
jQuery Help (.addClass)
Hi guys, Thanks for the replies. I had actually wanted the currencies to be in an unordered list. The guy that had coded it came back to me today and has added code that will allow the selected currency to have the class .active when navigating to a new page. I haven't yet looked at the code, but will be working on it again late so can have a look and maybe post the extra code here.
-
jQuery Help (.addClass)
Hi all, I have a currency list on a store as follows: <div id="top-left"> <p class="nw-selector-indiv"><span class="USD">USD</span> <span class="GBP">GBP</span> <span class="EUR">EUR</span> <span class="AUD">AUD</span> <span class="CAD">CAD</span> <span class="JPY">JPY</span></p> </div> That is hardcoded in. Here is some jQuery that changes classes when clicked. <script> $('#top-left .nw-selector-indiv span').click(function(){ $('select#currencies option').removeAttr('selected'); $('#top-left .nw-selector-indiv span').removeClass('active'); var theClass = $(this).attr("class"); $(this).addClass('active'); // var realz = $('select#currencies option').filter(function() { // return this.value.toLowerCase() == theClass; // }); $('select#currencies > option[value="'+ theClass +'"]').prop('selected',true).trigger('change'); }); </script> My problem is that I want the currency that is selected to have the .active class when the age loads, so let's say I'm on page#1 and select JPY, I want JPY to be highlighted (.active class added) when I go to page#2. Currently it is only added on a click event. Any ideas on how that can be done. *I did not add the code above, just trying to edit it. Also let me know if anyone needs to see more code, might be missing something.