We're merging with GenerateBlocks! Learn more here.

Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 51 total)
  • Author
    Posts
  • in reply to: Change order of elements #6267
    Janek
    Participant

    Ok, I’m really shitty now, cause I’ve wasted your time. I did the old disable all plugins except WP Show Posts and Advanced Custom Fields and it seems that the problem was the Codeit Glossary plugin which somehow is preventing the custom field from appearing. Makes no sense but there you go! I’ll work at fixing this issue by troubleshooting the Glossary plugin with their dev. There plugin is great in theory but it has so many quirks.

    in reply to: Change order of elements #6257
    Janek
    Participant

    Hey Tom,

    That only appears to display the page title below the content instead of the post title of the WPSP list. It also targets all WPSP lists.

    I’d prefer to implement a custom field as shown above, this way I can ensure it only works on the WPSP that have posts that use the custom field. But as mentioned for some stupid reason it doesnt work with ‘wpsp_after_content’ but it does with ‘wpsp_before_content’.

    in reply to: Change order of elements #6255
    Janek
    Participant

    So I found in one of my old support threads here that I can use wpsp_after_content as a filter so with the following I should be able to output a custom field after the content however I’m finding it doesnt want to work. Something to do with the filter since if I change it to wpsp_before_content it outputs the custom field above fine. Any thoughts?

    add_action( 'wpsp_after_content', 'tu_add_custom_meta_testimonial' );
    function tu_add_custom_meta_testimonial() {
        $meta = get_post_meta( get_the_ID(), 'testimonial_source', true );
        if ( isset( $meta ) && '' !== $meta ) {
            echo '<div class="testimonial-source">' . $meta . '</div>';
        }
    }
    in reply to: Change order of elements #6254
    Janek
    Participant

    Alternatively if I could get a list of the filters I can output a custom field after the entry-content myself.

    in reply to: Carousel Functionality #6119
    Janek
    Participant

    No problem, Tom. Thanks for the update. I have a project I’m involved in that would certainly benefit from the carousel function. 🙂

    I’ll keep my eyes peeled for the update in the future.

    in reply to: Custom Field repeater/URL output #5581
    Janek
    Participant

    I’ve had a browse, but didnt find anything. I’ll take a better look and maybe post up something there.

    Thanks for your help as always, its appreciated! 🙂

    in reply to: Custom Field repeater/URL output #5574
    Janek
    Participant

    Sorry for the late reply.

    Yes I believe these are the correct ID’s. I’ve just doubled checked them and there is a sub field called link, however the target and title is provided by setting the field type to Link. The input on a post using the custom field would show WordPresses’s standard hyperlink window which in turn would provide data for the link, target and title fields.

    I took a screenshot of the custom field post input options here:
    https://drive.google.com/open?id=1SAuM1qX5XY-pw0DggNS7Ay27sCsVkMpn

    As well as a screenshot of the custom field setup in the ACF plugin here:
    https://drive.google.com/open?id=1QT_jpgeBvQIrTaPgBMC7BqfF8zlSzcYt

    Perhaps that provides a better idea than my description?

    If nothing jumps out at you, it might be time to try a different approach rather than using the repeater field I’ll try to get this working with a single entry.

    in reply to: Custom Field repeater/URL output #5552
    Janek
    Participant

    Interestingly it doesn’t output anything on the front end. I looked over the code and nothing seems to be out of order. Any thoughts? 🙁

    in reply to: Hide container when post list is empty #5548
    Janek
    Participant

    Awesome, that seems to work perfectly. Thanks.

    Although do you know why the other Show Posts container wasnt having the no-results class applied to it?

    Seems quite odd.

    in reply to: Output Custom Field in Div Class #5525
    Janek
    Participant

    Holy shit, it works! Your a legend! Thanks for the help! I think I’m slowly grasping the basics of PHP… but don’t think youve seen the last of me! 🙁

    I used the following for anyone who might come after me:

    add_action( 'wpsp_after_title', 'tu_add_advertising_images' );
    function tu_add_advertising_images() {
    if ( function_exists( 'get_field' ) ) {
            $image = get_field('advertisement_desktop');
      $mobile_image = get_field('advertisement_mobile');
    
            if ( ! empty( $image ) ): ?>
    		  
    <div class="desktop-image">		  
    		  <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />   
    </div>
    
    <div class="mobile-image">
        <img src="<?php echo $mobile_image['url']; ?>" alt="<?php echo $mobile_image['alt']; ?>" />
    </div>
      <?php endif;
      
        }
    }
    
    in reply to: Hide container when post list is empty #5521
    Janek
    Participant

    Hey Tom,

    Sorry to drag this one back out, but I’m having an issue with this. I have a second WP Show Posts list that should hide when empty but it doesnt. This is due to the fact that it doesnt apply a .wpsp-no-results class when empty.

    I’m completely at a loss why it wouldnt apply that class to itself like the other one on the page, I’ve tried to recreate it with a new list as well, and same thing happens.

    To view the section with the list in it you can access my staging site:
    http://staging.janek-dev.flywheelsites.com/

    Username to view the site is collaborator… and surely you know what the password is by now. 😉

    I’ve been doing tests here to no avail. If you access the page source and search for .wpsp-no-results you can see that it only appears once and thats in the #upcoming-airshows div section which has hidden automatically with the code you supplied earlier. The other one that should hide is the #next-episode div, but its not it just sits there and wont add the no results class to itself even though its empty.

    I still need to reply to your other posts on here, and I apologise for not getting to them sooner. The site proper launched last night and leading up to it I’ve been doing last minute bug fixes. Obviously I didnt catch them all. 😛

    in reply to: Displaying read more button with read more tag #5462
    Janek
    Participant

    No worries, Tom. I’m happy to just shelve this one for the moment. I’ve spoken to the client and asked if we can forgo that functionality and they are ok with it.

    Thanks for looking to this for me.

    in reply to: Displaying read more button with read more tag #5457
    Janek
    Participant

    The site url has changed to:
    http://staging.janek-dev.flywheelsites.com/wp-admin

    I’ve been moving things around in order to be ready to deploy the site in 2 days.

    in reply to: Reloading script on Ajax pagination load #5456
    Janek
    Participant

    :'(

    As much as I love Ajax pagination, I’ll just have to let this one go I guess.

    Thanks for checking though!

    in reply to: Output Custom Field in Div Class #5441
    Janek
    Participant

    Awesome, that worked! Thank you!

    Just one or two more questions and I swear I’ll be done with this.

    If I had more than one image field how would I go about inserting that?

    For instance at the moment I have:
    $image = get_field('advertisement_desktop');

    But I also have this field that I want to include
    $image = get_field('advertisement_mobile');

    I also need a way to display one or the other depending on breakpoint. Which I was going to do with CSS. Is there a simple way to output these in separate divs classes?

Viewing 15 posts - 1 through 15 (of 51 total)