Jump to content

flavaflav37

New Members
  • Posts

    9
  • Joined

  • Last visited

flavaflav37's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks, please read my post a little more. I think I explain how I do not want to echo text_skill_one verbatim, but what text_skill_one outputs (a meta field), which will have the input HTML 5.
  2. Hi, I have a piece of code - <?php echo $data['text_skill_one']; ?> That is basically outputting an option from my Wordpress theme option panel, so the output from the above would be - HTML 5. What I would like to do is make this output all lowercase with the spaces removed so we have - html5 The reason being that I would like to add it as a .class name in my php file. The code I have attempted already is below - <?php $data = 'text_skill_one'; $string = $data; $output = strtolower($str); echo($string) ?> But what this is currently outputting is - text_skill_one I would like it to output the option that has been chosen in the Theme Options panel (lowercase with spaces removed) Any tips would be greatly appreciated. Thanks in advance
  3. Hi folks, Fixed this with the following - <?php $i=1; ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php $cur_terms = get_the_terms( $post->ID, 'project-type' ); foreach ( (array) $cur_terms as $cur_term ) { }?> <article class="one-third column item <?php echo strtolower($cur_term->slug); ?>" data-filter=""> <div class="thumbnail"> <a data-lightbox="width:940;height:550" data-overlayer="overlayDefault:overlay-default portfolio" href="<?php echo get_post_meta($post->ID, 'portfolio_video_url', true) ?>?autoplay=1"> <?php the_post_thumbnail('latest-thumb'); ?> <div class="roll"> <em> <i class="icon-film icon-large"></i> view project </em> </div> </a><!-- end lightbox --> </div><!-- end .thumbnail --> <h2><?php echo str_pad($i++,2,'0',STR_PAD_LEFT); ?> | <a data-lightbox="width:940;height:550" href="<?php echo get_post_meta($post->ID, 'portfolio_video_url', true) ?>?autoplay=1"><?php the_title(); ?></a></h2> <?php if ( get_post_meta($post->ID, 'gt_project_date', true) ) : ?> <p>~ <strong><?php echo get_post_meta($post->ID, 'project_date', true) ?></strong></p> <?php endif; ?> </article><!-- end article --> <?php endwhile; endif; ?>
  4. Hi Jessica, Where am I placing this exactly? Many thanks
  5. Hi Jessica, Apologies, have been away, only just spotted your reply. My current code - <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php $cur_terms = get_the_terms( $post->ID, 'project-type' ); foreach ( (array) $cur_terms as $cur_term ) { }?> <article class="one-third column item <?php echo strtolower($cur_term->slug); ?>" data-filter=""> <div class="thumbnail"> <a data-lightbox="width:940;height:550" data-overlayer="overlayDefault:overlay-default portfolio" href="<?php echo get_post_meta($post->ID, 'portfolio_video_url', true) ?>?autoplay=1"> <?php the_post_thumbnail('latest-thumb'); ?> <div class="roll"> <em> <i class="icon-film icon-large"></i> view project </em> </div> </a><!-- end lightbox --> </div><!-- end .thumbnail --> <h2>01 | <a data-lightbox="width:940;height:550" href="<?php echo get_post_meta($post->ID, 'portfolio_video_url', true) ?>?autoplay=1"><?php the_title(); ?></a></h2> <?php if ( get_post_meta($post->ID, 'project_date', true) ) : ?> <p>~ <strong><?php echo get_post_meta($post->ID, 'project_date', true) ?></strong></p> <?php endif; ?> </article><!-- end article --> <?php endwhile; endif; ?> As you can see in the H2 tag i currently have it set static, which of course loops through, and shows 01 for all entries currently, which is what I want to change. Thanks in advance
  6. Hi folks, I have a Wordpress loop which displays portfolio items, and I would basically like to add a number to each item in that loop, before the item name (ie; 01 - A portfolio item, 02 - A portfolio item, 03 - A portfolio item etc...) Quite basic, but how do I achieve this? thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.