Everything posted by Charly
-
Adding HTML into PHP Loop
Hello, I am working on a Wordpress website that is using custom taxonomies. I have found the following code to list taxonomies: <?php // Get terms for post $terms = get_the_terms( $post->ID , 'status' ); // Loop over each item since it's an array if ( $terms != null ){ foreach( $terms as $term ) { // Print the name method from $term which is an OBJECT print $term->slug ; print $term->name; // Get rid of the other data stored in the object, since it's not needed unset($term); } } ?> How my question is, how can I add html to this loop? I have tried multiple times but it either errors out, or it doesn't print the taxonomies. The desired result it to have the following markup: <button class="filter $term->slug" data-filter="$term->slug">$term->name</button> If anyone could help me, I would greatly appreciate it :-)
-
Anchor links wont work
Someone helped me in the end, just needed to remove # from id.... I knew it would be something simple I was missing lol
-
Anchor links wont work
Hello hello :-) I am hoping someone will be able to help me. I am working on a bespoke Wordpress build and for some reason, I just cannot get some anchor links to work. It's driving me potty and I just don't know what the problem is. I have discovered, static anchor links are working fine. However, I am using Advanced Custom Fields to generate ID's for the anchor tags. The IDs are generating correctly, but won't work as anchor tags. Anyone have any ideas? The staging url is here. The bit I am referring to is the service boxes near the bottom of the page. The idea being you click on these and that they will take you to the services page, and down to the relevant section. The markup I am using is: <a href="/services/#example"></a> <ul> <li id="#example"></li> </ul> Thanks in advance :-)
- IE issues
-
IE issues
Hello, I am hoping someone might be able to help me. I am having issues with IE11 on a virtual machine I am running (mac user). I am looking at a site I have developed http://dev.whitstabledesign.com/SPS/ and can see in IE11 it is: Not showing background colours on the homepage, appointments, contact page. They should be all salmon colour, no white space at all. Also, it seems to be ignoring the top padding on every page but the homepage. Am I missing something really obvious here? Works fine on all other browsers including IE10.
-
Quoting for website builds
Good morning :-) I am working along side a creative agency (actually only about 4 people within the business) and web design is very new to them. The problem I am having is, they quote a price for a build of a website BEFORE any design work or wireframing is done. So the general functionality of the website isn't planned correctly which can cause problems in the building stage for me when I start asking questions about how it will work. So, my question is, how do other people work when quoting work?
-
Responsive Image Blocks
Thanks for your comment! I did actually mean max-width and I do know how to use media queries. Just figured there must be a cleaner way to approach this and thought someone else might have a better idea. I am self taught and i've learnt alot by talking to other people... sorry for bothering you.
-
Responsive Image Blocks
Hello, I am hoping someone might be able to help me with something.... I am trying to make a responsive image grid and I thought I had nailed it, however, I have noticed the images squish up in small resolutions. Now my initial thoughts were that if all the images were in proportion they would downsize the same. However, after adding: width:100%; height: auto; the images all display at different sizes and I can figure out a solution. Has anybody experienced this before? The block CSS is: .services-single-image-block{ margin-bottom:20px;} .services-single-image-block .column-one{ width:30%; float:left; border-right:5px solid #fff;} .services-single-image-block .column-two{ width:40%; float:left;} .services-single-image-block .column-three{ width:30%; float:left; border-left:5px solid #fff;} .services-single-image-block .image-two, .services-single-image-block .image-four{ border-bottom:5px solid #fff;}
-
Centering div over slider
Hello :-) Hoping some fresh eyes will be able to help me out. I am trying to put a static title over the top of a slider, but centered both horizontally and vertically. I thought I had cracked it but realised it's not quite central vertically. Can anyone see where I am going wrong? Live URL here. Css is: #portfolio-single-gallery{ position: relative; top: 0; left: 0; width: 100%;} .title-overlay{ top: 50%; width:100%; text-align:center; z-index:99; position: absolute;} .title-overlay h1{ color:#fff;} #portfolio-single-gallery .slider-nav{ margin:20px 0px; z-index: 10; width: 100%;}
-
Add additional classes to JS Script
Thanks for that Rob, I am now going to look into what you said about it being a global variable. Haven't a clue what that is so it's good learning for me. Thanks :-)
-
Add additional classes to JS Script
Good afternoon, I am using a script to make a certain class the same height. Now I am wondering how I can provide multiple classes? I tried simply adding another in but it didn't work. This is the script: <script type="text/javascript"> var maxHeight = 0; $(".level").each(function(){ maxHeight = $(this).height() > maxHeight ? $(this).height() : maxHeight; }).height(maxHeight); </script>
-
Make slider buttons same width
Thank you! I wrapped the numbers in a span, offset them out of view then change the styling to the li instead of a. Perfect, thanks for all your help :-)
-
Make slider buttons same width
Helloooo :-) Hope some lovely person would be able to help me.... I have a slider that has navigation buttons at the bottom. Now, I was hoping to hide these by making the text colour the same colour as the background. However, when the slider gets to 10 (and becomes double digits) it messes up the button size. I've tried a few things like making the text smaller and specifying the link width but nothing seems to be working (grr). Can anyone suggest anything? CSS is: .rslides_tabs li{ display:inline-block;} .rslides_tabs li a{ background: #717071 none repeat scroll 0% 0%; padding: 0px 3px; color: #717071; margin-right: 10px; vertical-align: middle;} .rslides_here a{ background:#ed7025 !important; color:#ed7025 !important;} you can find the live link here. Thanks in advance :-)
-
Table / Table Cells
Thank you, I appreciate your answer. However, I am trying to get the columns to expand depending on the content.... I think min-height would just restrict that. Plus, once the content spills over the min-height, I am back with the same problem again.
-
Table / Table Cells
Good evening, I am wondering if someone would be able to help me.... I am working on a design that requires both team member boxes to remain the same height. Now, I managed to get the two columns in each team member box to remain the same height using table & table cell. However, I can't seem to apply this to the outside columns that are currently floated, the right column is smaller when you reduce the screen resolution. You can see what I mean here. The CSS I am using is: .team-section-one{ margin: 40px -40px 40px 0px;} .team-item-wrapper{ padding: 0px 40px 20px 0px; display: table; width:50%; float:left;} .team-item .left-column{ width:65%; display: table-cell; padding-right:20px;} .team-item .right-column{ width:35%; display: table-cell; position:relative;} .team-item .right-column .inner{ text-align:right; width:100%; position:absolute; bottom:0px; padding: 0px 20px 20px 20px;} Can anyone help me? It's important that all columns remain the same height (expanding to fit content) and that the member title remains at the bottom of the coloured column. Thanks in advance to anyone that might be able to help me :-)
-
Combining JS
I moved all my scripts and css files into the functions and enqueued them, this seemed to sort the problem out :-)
-
Combining JS
Thanks for your reply, my footer goes: <?php get_template_part('scripts'); ?> <?php wp_footer(); ?> The scripts above are in the scripts template. I am using the html blank theme which has alot of scripts pre-installed. I am not sure what half of these are and will probably look at removing them as you suggested.
-
Combining JS
Good morning, I am having trouble getting two scripts to work along side each other, both are called in the footer of the website. The first one (mobile nav) is: <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery-1.9.1.min.js"></script> <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/modernizr.custom.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#nav-mobile").html($("#nav-main").html()); $("#nav-trigger span").click(function(){ if ($("nav#nav-mobile ul").hasClass("expanded")) { $("nav#nav-mobile ul.expanded").removeClass("expanded").slideUp(250); $(this).removeClass("open"); } else { $("nav#nav-mobile ul").addClass("expanded").slideDown(250); $(this).addClass("open"); } }); }); </script> The second one (slider) is: <script> jQuery(function ($) { $(function() { $(".rslides").responsiveSlides({ pager: true, }); }); }); </script> The error I get is "Uncaught TypeError: undefined is not a function" - you can see this live here. If I move the second script to the header, everything works fine. Can anyone help me resolve this, I am not great with JS unfortunately. Thanks in advance :-)
-
Mystery Shadow....
Not sure why that happened sorry...
-
Mystery Shadow....
Hello, I am using Chrome - I tried on a couple of other browser too and see the same shadow. It's right at the very bottom where the copyright is. It's very subtle but it's annoying me :-)
-
Mystery Shadow....
Good morning, I am hoping to borrow someone eyes for a minute :-) I am working on a site at the moment and I can see a very subtle shadow at the very bottom of the page. It is insanely annoying that I cannot find the source... can anyone see what I am missing. Link is here - would be very grateful...
-
Custom Post Types
I finally worked it out - seemed I had missed the loop out oops.
-
Custom Post Types
Hello :-) I have set up custom post types 'features' on a new site that I am working on. The custom post type has been included in my functions and I have set up the relevant pages: archive-features and single-features. <?php get_header(); ?> <main role="main"> <section class="features"> <div class="content center"> <div class="features-section-one"> <h1>Featured In</h1> </div> <?php get_template_part('single-features'); ?> <?php get_template_part('pagination'); ?> </div><!--/ Content --> </section><!--/ Section --> </main><!--/ Main --> <?php get_footer(); ?> The problem I am having is that, when you are editing 'features' post within the wordpress dashboard and you click on 'view' - it takes you to an unstyled page with the post on it. There are no header / footer / archive styles but the post styles are present. My question is, what template is this using, does anyone know? I cant see myself, even if I inspect the code within the browser. I have been through all my template files and they all have header / footer tags in them so I am very confused. Thanks in advance :-)
-
Adding coloured box before menu item
Hello, Thanks for your messages :-) I took the code out as it wasn't working but you can see the development site here. Basically, I want to alternate the coloured blocks before each menu item. I could add html into the menu but I don't want my client to have to do that, I would prefer it to automatically alternate OR the client simply having to put a colour class in via the menu settings in wordpress e.g .red .blue See attached image for what I am trying to achieve.
-
Adding coloured box before menu item
Hello, I am not very good with menus, I just wondered if someone might be able to help me. I want to add a coloured box to each menu item - see attached. I have a couple of colours I want to use and I want to pick these by adding classes into my Wordpress menu for example .red .orange .yellow. I thought of using the before:: but I can't see to get the desired effect. Can any one give me any advice? I am working on a blank canvas at the moment so no CSS to post as such. Thanks in advance :-)