Tagged: gunter
-
AuthorPosts
-
April 13, 2015 at 3:21 pm #427519
Hello, I’d like to replicate pagination at the top of the blog loop (using avia builder “Blog Posts”) so that it appears both top and bottom, is there a way to do this?
Thanks!
April 13, 2015 at 9:22 pm #427807Hey jimbatchelder!
Open up /enfold/includes/loop-index.php and around line 12 you should see this.
if (have_posts()) :
Add this beneath it.
if(empty($avia_config['remove_pagination'] )) { echo "<div class='{$blog_style}'>".avia_pagination('', 'nav')."</div>"; }
Regards,
Elliott- This reply was modified 9 years, 8 months ago by Elliott.
April 13, 2015 at 9:32 pm #427814I added the code but something isn’t quite right, no change on the page. The page I’m working on is at http://resteasyhosting.com/col2015/education/ . Here is the code after I added your suggestion:
<?php
global $avia_config, $post_loop_count;
if(empty($post_loop_count)) $post_loop_count = 1;
$blog_style = !empty($avia_config[‘blog_style’]) ? $avia_config[‘blog_style’] : avia_get_option(‘blog_style’,’multi-big’);
if(is_single()) $blog_style = avia_get_option(‘single_post_style’,’single-big’);
$initial_id = avia_get_the_ID();
// check if we got posts to display:
if (have_posts()) :
`if(empty($avia_config[‘remove_pagination’] ))
{
echo “<div class='{$blog_style}’>”.avia_pagination(”, ‘nav’).”</div>”;
}`
while (have_posts()) : the_post();
/*April 14, 2015 at 5:42 pm #428361Hey!
I don’t see it. Did you remove it?
Best regards,
ElliottApril 14, 2015 at 6:44 pm #428395no, the page is still there and the code you sent is still in loop-index.php.
April 15, 2015 at 5:32 pm #429086Hi!
Send us a WordPress login.
Regards,
ElliottApril 15, 2015 at 5:41 pm #429093This reply has been marked as private.April 16, 2015 at 1:51 pm #429586Hi!
Thank you for your feedback.
I cannot access http://www.resteasyhosting.com/wp-admin
Can you give us the link to your login page, pls.Just for a try – replace the code above with:
echo '<p> ----------------- </p>'; echo "<div class='{$blog_style}'>".avia_pagination('', 'nav')."</div>";
This should produce an output in any case.
Best regards,
GünterApril 16, 2015 at 4:42 pm #429729This reply has been marked as private.April 17, 2015 at 4:26 pm #430373Hi!
Thanks for the feedback.
The code above does not work, because you use a grid layout. I removed the code already.
You have to modify an ALB element.
In functions.php of the child theme put the following:
/** * Add filter to add or replace Enfold ALB shortcodes with new folder contents * * Note that the shortcodes must be in the same format as those in * enfold/config-templatebuilder/avia-shortcodes * * @link http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/ */ add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1); function avia_include_shortcode_template($paths) { $template_url = get_stylesheet_directory(); array_unshift($paths, $template_url.'/shortcodes/'); return $paths; }
Create a subfolder shortcodes in the child theme directory and copy
enfold\config-templatebuilder\avia-shortcodes\postslider.php
Open the copied file, goto line 282 and locate:
$output .= "<div class='avia-content-slider-inner'>";
Before this line insert:
if($use_main_query_pagination == 'yes' && $paginate == "yes") { global $wp_query; $avia_pagination = avia_pagination($wp_query->max_num_pages, 'nav'); } else if($paginate == "yes") { $avia_pagination = avia_pagination($this->entries->max_num_pages, 'nav'); } if(!empty($avia_pagination)) $output .= "<div class='pagination-wrap pagination-slider'>{$avia_pagination}</div>";
Be aware that < or > are not changed !!!
If you have troubles, create the directory, copy the file and we will insert the code for you.
Regards,
Günter -
AuthorPosts
- You must be logged in to reply to this topic.