This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Eleven Sites

Forum Replies Created

Viewing 15 replies - 1 through 15 (of 30 total)
  • Author
    Replies
  • in reply to: Moving mobile nav to open from the left #26286
    Eleven Sites
    Participant

    Thanks Jason. What an idiot I am! That’s what I get for not just copy/pasting your code originally! I apologize for my stupidity.

    in reply to: Best way to add to and/or customize pagination #26282
    Eleven Sites
    Participant

    Hi Jason,

    In addition to the search form, the client would like to customize the pagination to say “Page # of #”. I have the following code that I’ve used in the past to do this.

    function custom_pagination() {
    	global $wp_query;
    	$total = $wp_query->max_num_pages;
    	// only bother with the rest if we have more than 1 page!
    	if ( $total > 1 ) {
    		// get the current page
    		if ( !$current_page = get_query_var('paged') )
    		$current_page = 1;
    		// structure of "format" depends on whether we're using pretty permalinks
    		 if( get_option('permalink_structure') ) {
    		 	$format = '&paged=%#%';
    			} else {
    			$format = 'page/%#%/';
    			} 
    		echo '<span class="custom_pagination">Page '.$current_page.' of '.$total.'</span> ';
    		echo paginate_links(array(
    		'base' => get_pagenum_link(1) . '%_%',
    		'format' => $format,
    		'current' => $current_page,
    		'total' => $total,
    		'mid_size' => 10,
    		'prev_next'          => False,
    		'prev_text'          => __(''),
    		'next_text'          => __(''),
    		'type' => 'plain'
    		));
    		}
    	}
    in reply to: Template Parts don't work for archives #22600
    Eleven Sites
    Participant

    Well, I was simply trying to control the ‘archive’ layout for my custom post type. Here’s my dev link: http://50.87.248.227/~parkrang/cms/strains/. Here, for the custom post type “strains”, users will be able to browse by keyword.

    My template is content-list-strains.php. And, my code is mentioned previously.

    So, on the Content tab under Archives, I’ve set the Post Display to be List. I’d just like to understand where the pagination (‘list_paginated’) comes into play, if I don’t have the option in the Theme Options to select paginated or not, and my template doesn’t have any pagination.

    Thanks for helping my wrap my head around this!

    in reply to: Template Parts don't work for archives #22594
    Eleven Sites
    Participant

    Hi Jason,

    I’m just confused as to why, even though my template does not use pagination, I need to have:

    if ( $id == ‘list’ || $id == ‘list_paginated’ ) {
    $part = ‘list-strains’;
    }

    instead of simply:

    if ( $id == ‘list’) {
    $part = ‘list-strains’;
    }

    Thanks for the updated documentation. The “Multiple post types, a more dynamic way” section is wonderful!

    in reply to: Template Parts don't work for archives #22579
    Eleven Sites
    Participant

    Never mind, I got it to work by adding ‘list_paginated’. Curious!

    // “Strains” list
    if ( $id == ‘list’ || $id == ‘list_paginated’ ) {
    $part = ‘list-strains’;
    }

    in reply to: Template Parts don't work for archives #22578
    Eleven Sites
    Participant

    Thanks for asking this, AskWPGirl. I’m so glad I found this. But, I’m still having trouble with this for my custom post type. I’ve used the following code:

    function my_template_part( $part, $id ) {

    if ( get_post_type() == ‘strains’ ) {

    // “Strains” single posts
    if ( $id == ‘single’ ) {
    $part = ‘single-strains’;
    }

    // “Strains” post grid
    if ( $id == ‘grid’ || $id == ‘grid_paginated’ ) {
    $part = ‘grid-strains’;
    }

    // “Strains” list
    if ( $id == ‘list’) {
    $part = ‘list-strains’;
    }
    }

    return $part;
    }
    add_filter( ‘themeblvd_template_part’, ‘my_template_part’, 10, 2 );

    But, my template’s still not being used.

    Thanks!

    in reply to: Strange issue: Adding to themeblvd_header_menu_default() #20059
    Eleven Sites
    Participant

    OK, it’s fixed. A little sleep helped. It was WP Super Cache. I had to turn the caching completely off. Deleting my cache on WordPress and on my browsers wasn’t doing it.

    And, the world makes sense again…

    in reply to: Validation error: Stray end tag a #20021
    Eleven Sites
    Participant

    Yes, I haven’t tackled v2 yet. Hopefully, I’ll have some time to work with v2 beta in the next few days.

    in reply to: Jump Start 2.0? #19130
    Eleven Sites
    Participant

    I’d be happy to test it on one of my big sites (re: frontend plugins using Ajax)!

    in reply to: Need help adding toggle to a template file #18901
    Eleven Sites
    Participant

    Hi Jason,

    I just realized that when using the toggle shortcode, the title/link label has an extra space on the front of it. So, if I style my toggle label to have text-decoration: underline; that space shows up. I don’t exactly know where to fix this, so I thought I’d let you know.

    Thanks,

    Lindsay

    in reply to: Changing 'archive_no_posts' local based on post type #18498
    Eleven Sites
    Participant

    I’ve created custom queries in the functions file to be used in the post display shortcode like the following:

    <h2 class="assets">Photos</h2><?php
    echo do_shortcode('[post_grid query="photos" link="false" columns="4"]');
    ?>

    in reply to: Plugin running before the theme registers its shortcodes #17838
    Eleven Sites
    Participant

    Hi Jason, I got the following code to work with some CSS help. But, I don’t know how to get the div.rows in there…

    <?php $i = 0; ?>
    <?php while ( have_posts() ) : the_post(); ?>
    <?php $i++; ?>
    <div class="column grid_3<?php echo (0 == $i % 4) ? ' last' : ''; ?>">
        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <?php the_content(); ?>
     <h2 class="entry-title"><?php the_title(); ?></h2>
        </div>
    </div>
    </div>
    <?php endwhile; ?>
    .column:nth-child(4n) { 
    	margin-right: 0; 
    	}
    	
    .column:nth-child(4n+1) { 
    	clear: left; 
    }

    So, will I be able to open the thumbnail image/featured image in a lightbox for the Photos?

    Thanks!

    Eleven Sites
    Participant

    Jason,

    I’m stuck without the shortcodes working in my faceted search templates. I’m having trouble coding the grids to display correctly without the shortcodes. I’d also need for my images to open up in the lightbox.

    I have a Manufacturer Photos page and a Manufacturer Videos page that have a faceted search and I wanted the results to be a 4-column grid of the thumbnails. The Photos would open in a lightbox, the videos will be thumbnail YouTube players.

    What can I do to keep moving forward and getting this site launched?

    Eleven Sites
    Participant

    Hi Jason,

    When do you anticipate the next update to the theme supporting these frontend plugins using Ajax?

    Thanks,

    Lindsay

    Eleven Sites
    Participant

    Awesome, Jason. Thanks for your help… I wish I understood all of this more, but I’ve got some learning to do!

Viewing 15 replies - 1 through 15 (of 30 total)