Support

Account

Home Forums Search Search Results for 'q'

Search Results for 'q'

reply

  • This reply has been marked as private.
  • i am not sure, but i think that this wrapper attributes are for backend only.
    with that you can stile backend.

    because at frontend you can easy wrap your field for example by a class & by blockquote with code like this:

    $my_quotetext = get_field('my_quotetext');
    echo '<div class="my_quote">';
    echo '<blockquote>';
    echo '<p>'.$my_quotetext.'</p>';
    echo '</blockquote>';
    echo '</div>';

    there is no need to add wrapper at backend before

  • just to get sure:
    you have a working single-performance.php, that print out everything you need.
    you have a working page-gallery.php with featured image and title that link for now to single-performance.php?
    and you wish a link to single-performance.php that only shows the gallery?

    if yes, i think this will be the easiest way to solve that would be:

    inside page-gallery.php something like that instead of permalink only
    add_query_arg( 'gallery_only', 'yes', get_permalink() );

    inside your plugin or functions.php add it to the public query variables

    function add_custom_query_var( $vars ){
      $vars[] = "gallery_only";
      return $vars;
    }
    add_filter( 'query_vars', 'add_custom_query_var' );

    inside single-performance.php get value that you pass when it come from page-gallery.php
    $my_gallery_only = get_query_var( 'gallery_only' );

    use after that if ($my_gallery_only == 'yes')
    to switch between your normal-all and gallery-only view

    hope that this is what you need and that it works for you

  • what did you mean with:

    Help me find a script that plugin Gallery.

    did you mean something like: simple lightbox?
    if yes look at my post inside this thread to get a sample that should work.
    primary you need :

    if ( function_exists('slb_activate') ){
    $content = slb_activate($content);
    }

    where $content is output of gallery before you echo it echo.

    but you could add any js that provide the popup-functionality when you know how to structure your output and how to apply the needed js.

  • you could use:

    $row1 = get_field('counter_repeater_0_counter_number'); //for first row
    $row2 = get_field('counter_repeater_1_counter_number'); //for second row
    ...
    echo "<tr><td><p>name:</p></td><td><p>";
    echo $row1;
    echo "</p></td><tr>";
    ...

    instead of your if-while loop (just add 3+4 row & echo row 2-4 where you wish)

  • what is your goal?

    • to start slider with a active class around a image?
    • add active class based on what image is shown?

    first should be possible with php without big problems. use something like that:

    <div class="quote-section">
    	<div class="slider4">
    		<?php if( have_rows('quote_slider') ):
    $img_count=1; 
    		     while ( have_rows('quote_slider') ) : the_row();
    if ($img_count == 1) {
     ?>
    			<li class="slide active"> 
    	 		    <div class="quote"><?php the_sub_field('quote'); ?></div>
    	 		   <div class="name"><?php the_sub_field('name'); ?></div>
    	 		   <div class="image"><img src="<?php the_sub_field('image'); ?>" /></div>
    	 		</li>
    <?php } else {?> 	
    			<li class="slide"> 
    	 		    <div class="quote"><?php the_sub_field('quote'); ?></div>
    	 		   <div class="name"><?php the_sub_field('name'); ?></div>
    	 		   <div class="image"><img src="<?php the_sub_field('image'); ?>" /></div>
    	 		</li>
    <?php } 
    $img_count++; ?> 	
    	 	   <?php endwhile;
    		else : endif; ?>
    	</div>
    </div>

    second is/shouldbe part of your slider js, and there i could not help you

  • @elliot First of all, shame on me, I didn’t optimize those svgs as I normally would through grunt or gulp.

    I’ve included the svg code for one of the svg images as seen in my screenshot earlier from this thread.

    
    <?xml version="1.0" encoding="utf-8"?>
    <!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
    <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
    	 viewBox="0 0 584.8 149.9" enable-background="new 0 0 584.8 149.9" xml:space="preserve">
    <g>
    	<path fill="#FFFFFF" d="M158.2,17.5c-1.2,0-2.3-0.1-3.3-0.4c-1-0.2-1.8-0.5-2.3-0.9l0.4-3.5c0.5,0.5,1.2,0.9,2.1,1.3
    		c0.9,0.3,2,0.5,3.1,0.5c2,0,3-0.6,3-1.8c0-0.4-0.1-0.7-0.3-1s-0.4-0.5-0.6-0.7c-0.3-0.2-0.6-0.4-0.9-0.5c-0.3-0.1-0.6-0.3-0.9-0.4
    		l-2.3-0.8l-1-0.4c-1-0.4-1.7-0.9-2.2-1.5c-0.5-0.6-0.7-1.4-0.8-2.4c0-0.6,0.1-1.3,0.4-1.9c0.2-0.6,0.6-1.1,1.1-1.6
    		c0.5-0.5,1.1-0.9,1.9-1.1s1.7-0.4,2.7-0.4c0.5,0,1.1,0,1.6,0.1c0.5,0.1,1,0.2,1.5,0.3c0.5,0.1,0.9,0.3,1.3,0.4
    		c0.4,0.2,0.7,0.3,0.9,0.5l-0.3,3.1c-1.9-1-3.5-1.5-4.9-1.5c-0.4,0-0.8,0-1.2,0.1c-0.4,0.1-0.7,0.2-1,0.3c-0.3,0.1-0.5,0.3-0.7,0.6
    		c-0.2,0.2-0.3,0.5-0.3,0.8c0,0.4,0.1,0.7,0.3,1c0.2,0.2,0.5,0.4,0.9,0.6c0.4,0.2,0.9,0.4,1.5,0.5c0.6,0.2,1.3,0.4,2.1,0.7l1.3,0.5
    		c0.3,0.1,0.7,0.3,1.1,0.6c0.4,0.2,0.7,0.5,1,0.9s0.6,0.8,0.8,1.2c0.2,0.5,0.3,1,0.3,1.6c0,0.5-0.1,1.1-0.2,1.7
    		c-0.1,0.6-0.4,1.1-0.9,1.7c-0.4,0.5-1.1,1-2,1.3C160.8,17.3,159.7,17.5,158.2,17.5z"/>
    </g>
    <!-- a bunch of paths more… -->
    </svg>
    
  • When adding/editing a field group it should be within the “Location” section with the rule “Show this field group if” Post Type is equal to Your Custom Post Type

  • hope this answer helps some poor lost souls.

    jquery must load before the acf stuff. for us, the problem was having async set on the script tag in an add_filter function:
    <script type='text/javascript' async src='//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'></script>

    note that this is output by in in <head> by <?php wp_head(); ?>

    we wrapped it with an is_admin() check thusly:

    if(!is_admin()) {
      add_filter( 'script_loader_tag', function ( $tag, $handle ) {
        return str_replace( ' src', ' async src', $tag );
      }, 10, 2 );
    }
    
  • you can do this with repeater

    it works like this:

    1. create a repeater field and assign to pages, has the name of image_gallery_components
    2. repeater has : image_gallery_shortcode_name, gallery_of_images (the gallery)
    3. using flexslider to display the gallery
    4. person knows how to use shortcodes

    I have done it so that each shortcode generates an indivdual instance of flexslider using some bang-hash-rush code, change it to work for you if you want.

    The idea is to get the id from the shortcode, repeat through the rows of the repeater, and if the id in the short code is the same as the id of the repeater row, output the html for the gallery.

    simple really. And remember you can do this with vimeo and youtube embeds as well.

    in your functions.php

    /**** begin custom gallery shortcode ******/
    
    function galleryShortcode($atts) {
       extract(shortcode_atts(array(
        "id" => ''
      ), $atts));
     $wrapperString ="";
     $LiString = "";
     $rand = rand(5, 3000);
    if ( have_rows('image_gallery_components')){
     $increment = 0;
    while( have_rows('image_gallery_components') ): the_row();
    if(get_sub_field("image_gallery_shortcode_name")==$id)
    {
    
    $galleryImages = get_sub_field("gallery_of_images");
    
    foreach($galleryImages as $galleryImage)
    {
    $LiString .= "<li><img src='".$galleryImage['sizes']['large']."'></li>";
    $increment+=1;	
    }
     
    $wrapperString = "<div class='galleryWrap'>
    <div id='slides".$rand."' class='flexslider slider'>
    <ul class='slides'>".$LiString."</ul>
    </div>";
    if($increment>1)
    {
    $wrapperString.="<div id='carousel".$rand."' class='flexslider carousel'>
    <ul class='slides'>".$LiString."
    </ul>
    </div>";
    }
    $wrapperString.="</div>";
    
    }
    endwhile;
    if($increment>1)
    {
    	$append = "
    <script>
    $(document).ready(function() {
    
    // The slider being synced must be initialized first
      $('#carousel".$rand."').flexslider({
        animation: 'slide',
        controlNav: false,
        animationLoop: false,
        slideshow: false,
        itemWidth: 180,
        itemMargin: 5,
        asNavFor: '#slides".$rand."'
      });
       
      $('#slides".$rand."').flexslider({
        animation: 'slide',
        controlNav: false,
        animationLoop: false,
        slideshow: false,
    
        sync: '#carousel".$rand."'
      });
    
    });</script>";
    }
    else
    {
    $append = "
    <script>
    $(document).ready(function() {
    
    // The slider being synced must be initialized first
    
       
      $('#slides".$rand."').flexslider({
        animation: 'slide',
        controlNav: false,
        animationLoop: false,
        slideshow: false,
    
      });
    
    });</script>";	
    }
    
    }
    $wrapperString.=$append;
    return $wrapperString;
    }
    
    add_shortcode("customimagegallery", "galleryShortcode");
    /****** end custom gallery shortcodes *********/

    in your page or post (if you have assigned the location to it.

    [customimagegallery id=”my-gallery”]

    // content

    [customimagegallery id=”second-gallery”]

  • I too have experienced this, I have created a video showing the issue: https://youtu.be/jdwA2suQQEw

  • I have the same problem on several sites.

    For me, the location rules say:

    Show this field group if
    Post Category is equal to Events

    This works great when I’m making a new post and have to set the category as part of the workflow, however when I open an existing post to make an edit, the fields preview briefly and then hide. They re-appear after a second if I uncheck the category and re-check it.

    It just seems like the feature that adjusts the visibility of the fields is not checking the post data on load. I hope this can be fixed!

  • dkeeling, thanks so much for your assistance on this! I greatly appreciate it!

    I have one additional questions — is there an easy way to strip the styling of the field being brought in? The client has some bolding/italicizing of text that I need to be stripped during the function you suggested above.

  • I can confirm that Rackspace Cloud Sites still result in Error. Could not connect to update server.

    Is there any way that you could include more verbose error messaging in the next plugin update so that we can all provide more qualified feedback?

  • I submitted a Github pull-request for this.
    If you wan’t to fix this add in this line of code to css/input.css inside ACF plugin.

    on line :727
    table.acf-input-table > tbody > tr:before,
    table.acf-input-table > tbody > tr:after {
    content: none;
    }

    Hope this helps

  • Adding the following css to the backend seems to work for me;

    .acf-image-uploader .view {
    		  width: 150px;
    		  height: 150px;
      		  background-color: #dddddd;

    As @eterps says…

    I make no guarantees for you, as it may completely blow up your site and ruin your life forever. You’ve been warned.

  • I was hesitant to post this because it’s very hacky and definitely does not substitute for a proper solution in the core of ACF, but it *works for me*. I make no guarantees for you, as it may completely blow up your site and ruin your life forever. You’ve been warned.

    Also, this javascript is only loaded on edit pages in the admin section with wp_enqueue_script().

    $('.acf-field-image .acf-image-uploader .show-if-value img').each(function(){
        var $el = $(this);
        var src = $el.attr('src');
        if ( src === '' || !src ) {
            $el.height('10px');
            $el.width('10px');
        }
    });
  • If your fields are conditionally displayed based on a Page Template, I’ve seen fields disappear. They come back if you change the page template and then change it back (no save/refresh required). That might not be your issue but seems worth checking. Now off to see if I can figure out a fix for it…

  • Yeah, I been doing that and found this error:

    XMLHttpRequest cannot load https://pawsinteractive.co.uk/403.shtml. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://pawsinteractive.co.uk&#8217; is therefore not allowed access.

    the test site itself runs on http://pawsinteractive.co.uk/projects/acuity

  • as far as i know:
    because you replace standard genesis loop with your own loop, you need to add schema at your own again.

    & please when you post code:
    wrap code with code tags (at top over textfield where you write your forum-post-entry you have code mark your code and press that button, than it will be formatted like mine, much better for readability. do that before first submit.)

    (if) you have forgotten that:
    please edit your post, copy-paste code form original and replace existing not formatted code, mark new inserted code and click on code. save/submit forum post again

    edit: thanks for edit your previous post, looks much better now.
    better readable than your first post with code, for example.
    with one exception somehow it add wrong ‘single_quote’ and “double_quote” ‘<div class=” instead of '<div class="`

  • Hi @robert-pal

    Thanks for the info.

    Are you able to check your console log when submitting the form.
    The console log will show an ajax request to validate the data. If you have WP_DEBUG mode on (http://www.advancedcustomfields.com/resources/how-to/debug/) you should see some PHP errors in the returned JSON.

    This will help to explain where the problem lies

    Thanks
    E

  • could you try this (use have_rows and a wile loop instead of your foreach loop) :

    <aside class="widget">
    <?php
    if( have_rows('tool_section_links') ):
    echo '<h2>Tools</h2>';
    echo '<ul>';
    while( have_rows('tool_section_links') ): the_row();
    
    $show_desktop = get_sub_field('show_desktop');
    $tool_link = get_sub_field('tool_link');
    $tool_link_title = get_sub_field('tool_link_title');
    if ($show_desktop == 'yes'){
    echo '<li class="show-for-large-up"><a href="'.$tool_link.'">'.$tool_link_title.'</a></li>';
    } else {
    echo '<li><a href="'.$tool_link.'">'.$tool_link_title.'</a></li>';
    }
    endwhile;
    echo '</ul>';
    endif;
    ?>
    </aside>

    depend on witch fieldtype you use change if ($show_desktop == 'yes') to correct value

  • I have run into this issue as well. Have not tried the get_post_meta (this gets messy with repeaters!!!).

    I posted on stack overflow and had another developer help me troubleshoot.

    http://wordpress.stackexchange.com/questions/180424/multisite-wp-query-switch-to-blog-issue

    I’m going to try to reproduce this on a fresh multisite install with a simplified test case.

  • I have run into this issue as well. Have not tried the get_post_meta (this gets messy with repeaters!!!).

    I posted on stack overflow and had another developer help me troubleshoot.

    http://wordpress.stackexchange.com/questions/180424/multisite-wp-query-switch-to-blog-issue

    I’m going to try to reproduce this on a fresh multisite install with a simplified test case.

Viewing 25 results - 17,026 through 17,050 (of 21,345 total)