Forum Replies Created

Viewing 15 replies - 1 through 15 (of 32 total)
  • Thread Starter jsites

    (@jsites)

    Ok, so here’s what happened and how I fixed it.

    The custom post type, qd_client, had not been enabled as a sortable post type in the Intuitive Custom Post Order plugin’s settings. As soon as I checked the box to enable that post type for that plugin, everything in ALM started working perfectly.

    Thanks for helping me figure this out.

    Separate unrelated item, hoping you’ll be able to make some progress on that filtering question I emailed you about earlier this week. Once that’s resolved, all of the ALM functionality for this site will be buttoned up.

    Thread Starter jsites

    (@jsites)

    Ok, I removed the orderby=”menu_order” from the shortcode, and now it’s not duplicating the content. So I may need to look into the plugin I’m using for that, Intuitive Custom Post Order, and see if there’s something there. I’ll report back when I have something.

    Thread Starter jsites

    (@jsites)

    There are 158 posts in that post type.

    Thread Starter jsites

    (@jsites)

    It’s in the original post, but here it is again:

    <div class="singleClient">
    	<?php $thisLogo = get_field('qd_client_logo'); ?>
    	<img src="<?php echo $thisLogo['sizes']['client-logo']; ?>" alt="<?php echo $thisLogo['alt']; ?>" />
    </div>
    Thread Starter jsites

    (@jsites)

    I switched the file to this, and it still has the same issue. Note that the include php call for clientList.php has the shortcode stuff. In the orignial post, i put that file’s content inside the main page’s code for ease of reading.

    <?php /*
    Template Name: Client List Page
     */
    get_header(); ?>
    
        <div id="content">
            <section id="mainContent">
            	<?php include('library/snippets/featured-image-space.php'); ?>
                <div id="mainContentHolder">
                    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                	<div id="inner-content" class="wrap cf">
                        <?php include('library/snippets/parent-title.php'); ?>
                		<main id="main" class="m-all t-2of3 d-5of7 cf" role="main" itemscope itemprop="mainContentOfPage" itemtype="https://schema.org/Blog">
                            <div class="entry-content">
    							<?php include('library/snippets/page-title.php'); ?>
    							<div class="contentColumns">
                                	<?php the_content(); ?>
    							</div>
                            </div>
                		</main>
                	</div>
                    <?php endwhile; endif; ?>
                </div>
            </section>
    		<?php include('library/snippets/flexblockLoader.php'); ?>
            <?php include('library/snippets/clientList.php'); ?>
    		<?php include('library/snippets/footer-widget.php'); ?>
        </div>
    
    <?php get_footer(); ?>
    Thread Starter jsites

    (@jsites)

    I sent an email about this as well, but I need the same filters to be run on both instances of the ALM shortcode, so I don’t think specifying the data-target would work, unless I can specify more than one ID on each element.

    Thread Starter jsites

    (@jsites)

    I wanted to bump this post again. Is it possible to implement my fix into the plugin’s code? Right now, every time I update the plugin on sites built with it, I have to go back into the plugin code on each site and change this line to include the ‘with_front’ => false

    Thread Starter jsites

    (@jsites)

    I found the issue, and have a fix for it, but it would require changing something minor in the plugin.

    In the wp-store-locator/inc/class-post-types.php file, on line 43 we have this:

    $rewrite = array( 'slug' => $wpsl_settings['permalink_slug'] );

    if this line was changed to this:

    $rewrite = array( 'slug' => $wpsl_settings['permalink_slug'], 'with_front' => false );

    This would then clear out the blog post’s permalink settings, so that the Stores can use their own permalink settings independent of the blog.

    Thread Starter jsites

    (@jsites)

    Sorry, I should have been more clear. I am using the Language Names widget look setting.

    I’d like to see this added as a feature to the plugin as well.

    Some of my accordions start out with an unordered list, but the output content is a blank <p></p> at the beginning and end of each accordion block.

    • This reply was modified 7 years, 4 months ago by jsites.
    • This reply was modified 7 years, 4 months ago by jsites.
    • This reply was modified 7 years, 4 months ago by jsites.

    Replying because I have a similar issue.

    Is there a way to return the post id of the location closest to my current Geolocated location?

    Thread Starter jsites

    (@jsites)

    I am using a post order plugin. I tried disabling that, and all the other plugins except for Ajax Load More (2.14.0) and Ajax Load More: Custom Repeaters v2 (2.2.4) and I still got the duplicate posts.

    Thread Starter jsites

    (@jsites)

    Here’s my entire template:

    <?php
    /*
    Template Name: People List Page
     */
    get_header(); ?>
    <?php include('library/snippets/featuredImage.php'); ?>
    <div id="content">
    	<div id="inner-content" class="wrap cf">
            <?php include('library/snippets/breadcrumbs.php'); ?>
    		<main id="main" class="m-all t-2of3 d-5of7 cf" role="main" itemscope itemprop="mainContentOfPage" itemtype="https://schema.org/Blog">
    			<?php if (have_posts()) :
                          while (have_posts()) :
                              the_post(); ?>
    				<article id="post-<?php the_ID(); ?>" <?php post_class( 'cf' ); ?> role="article" itemscope itemtype="https://schema.org/BlogPosting">
    					<section class="entry-content cf" itemprop="articleBody">
    						<?php the_content(); ?>
    					</section>
    				</article>
    			<?php endwhile;
                      endif; ?>
    		</main>
        </div>
        <div id="lower-content" class="wrap cf">
            <div id="peopleListStuff">
                <div id="peopleList">
                    <?php if ($_SERVER['REQUEST_METHOD'] == 'POST'){
                        //Build shortcode using filters:
                        $filterTags = implode(', ', $_POST['pplFilter']);
                        if($filterTags){
                            $tagShortcode = 'taxonomy="qd_people_filter" taxonomy_terms="'.$filterTags.'" taxonomy_operator="IN"';
                        }
                        $filterSearch = $_POST['pplSearchField'];
                        if($filterSearch){
                            $searchShortcode = 'search="'.$filterSearch.'"';
                        }
                        $pplShortcode = '[ajax_load_more container_type="div" css_classes="people-list-holder" repeater="template_1" post_type="qd_people" posts_per_page="16" orderby="menu_order" scroll="false" button_label="Load More" button_loading_label="Loading People..." '.$tagShortcode.' '.$searchShortcode.']';
                        
                        //use jQuery to show active filters: ?>
                        <script type="text/javascript">
                            jQuery(document).ready(function ($) {
                                <?php if($filterSearch){ ?>
                                    $('#peopleFilters #pplSearchField').val('<?php echo $filterSearch; ?>');
                                <?php } ?>
                                <?php if($filterTags){
                                    $terms = $_POST['pplFilter'];
                                    foreach($terms as $term){ ?>
                                        $('#peopleFilters input[value="<?php echo $term; ?>"]').prop('checked', true);
                                    <?php }
                                } ?>
                            });
                        </script>
                    <?php }else{
                        //Build default shortcode:
                        $pplShortcode = '[ajax_load_more container_type="div" css_classes="people-list-holder" repeater="template_1" post_type="qd_people" posts_per_page="16" orderby="menu_order" scroll="false" button_label="Load More" button_loading_label="Loading People..."]';
                    }
                          //echo $pplShortcode;
                    echo do_shortcode($pplShortcode); ?>
                </div>
                <?php include('sidebar.php'); ?>
            </div>
    	</div>
        <?php include('library/snippets/flexblocks.php'); ?>
    </div>
    <?php get_footer(); ?>
    

    All of the additional stuff to build out a different shortcode is for some filtering options. When using those, everything’s working great, no duplication. It’s just when I’m calling all posts in the People post type that i get my duplicates. And it is always the same duplicates.

    Thread Starter jsites

    (@jsites)

    I just tried that code, and I’m getting the same results.

    Here’s the page it is occurring on:

    https://aimconsulting.quantumdynamix.net/who-we-are/our-team/

    Let the first 16 people load initially. Then, click the button, and some of the first 16 will appear a second time in that next group. And as more load, some duplicates load a third time. The odd thing is that there are 43 posts in this custom post type, and 43 posts are returned on this page, but some don’t load, and others load multiple times.

    My theme is a custom-built one that I used Bones (https://themble.com/bones/) as a starting point.

    I discovered that when I deactivate Advanced Custom Fields PRO (https://www.advancedcustomfields.com/pro/) this problem no longer happens. Unfortunately, keeping that plugin disabled is not an option, so for now, I’ll just have to stick with my admin style fix listed above.

    Also, if I switch a site to the Twenty Sixteen theme, and keep ACF Pro active, this problem continues to occur.

    • This reply was modified 8 years, 4 months ago by jsites.
Viewing 15 replies - 1 through 15 (of 32 total)