Jump to content

George

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by George

  1. Friday night inspiration with Chris Coleman - Birch Infinite Performance Video Series - Solo https://t.co/49Lh4BwO5c #Awesome #Drummer

  2. ... and then here i am in the middle of nowhere with too many questions to ask.

  3. Hi Dragan, you are right, that code belongs to a wp theme, i miss the whole picture, i was looking for a twig support forum and you appear on the results. What a waste of time, sorry dude. Thanks anyway. ( i will remove my account)
  4. Hey guys! im quite new about twig and template design, i barely know php and i need some advice if its necesary to know php at all i order to learn to program with twig. At this moment also im editing a template based on twig that i bought, most the changes on the css but right now im facing a fancybox gallery which just call the first image, and a will like to add the gallery rel to the other images included in the post. i already found the missing code which call the rest of images from the post ID, but i dont know how to express it by the twig structure. this is the code wich display the gallery: <code> {% if wp.get_post_meta(post.ID, '_property_slides', TRUE) %} <div class="carousel property"> <div class="preview"> <a href="{{ wp.get_post_meta(post.ID, '_property_slides', TRUE).0.imgurl }}" class="fancybox"> <img src=" {{ wp.get_post_meta(post.ID, '_property_slides', TRUE).0.imgurl }}" alt=""> </a> </div> <!-- /.preview --> <div class="content"> <ul> {% for slide in wp.get_post_meta(post.ID, '_property_slides', TRUE) %} {% if loop.first %} <li class="active" > {% else %} <li> {% endif %} <img src="{{ slide.imgurl }}" alt=""> </li> {% endfor %} </ul> <a id="carousel-prev" href="#">{{ wp.__('Previous', 'aviators') }}</a> <a id="carousel-next" href="#">{{ wp.__('Next', 'aviators') }}</a> </div> <!-- /.content --> </div><!-- /.carousel --> {% endif %} </code> THIS IS THE FUNCTION TO CALL THE IMAGES I NEED <code> add_filter(‘wp_get_attachment_link’,'add_gallery_id_rel’); function add_gallery_id_rel($link){ global $post; return str_replace(‘<a href’, ‘<a rel=”galeria’. $post->ID .’” href’, $link); } </code> I really appreciate if you can help me with this (sorry about my weird english)
×
×
  • Create New...