-
AuthorPosts
-
June 4, 2019 at 3:36 pm #1107143
Hi!
We have to put the avia-post-prev and avia-post-next navigation-buttons centered, under the individual posts, not beside it. How can we achieve this?
Our problem is, that on wide screens the buttons are out of sight for many users ’cause it’s hocked the edge of the browser-window.Thaks a lot!
Tobi- This topic was modified 5 years, 5 months ago by check-t.
June 5, 2019 at 12:51 pm #1107511Hey check-t,
Could you please attach a mockup of what you’re trying to achieve?
Best regards,
VictoriaJune 5, 2019 at 1:06 pm #1107527Hi Victoria,
of course, you find the link in the private content.
Thanks again,
Tobi- This reply was modified 5 years, 5 months ago by check-t.
June 10, 2019 at 1:40 pm #1108818Hi Victoria,
we are urgently asked to solve this issue – can you help, please?
Kind regards
TobiJune 10, 2019 at 11:56 pm #1108915the fuctionality is that these buttons slide out on hovering – so how do you think they would react if you got them at the bottom of the screen.
And what do you mean by “the buttons are out of sight” – if you have the browser on fullscreen, the buttons are at the edge of the screen.
The edges are only not visible if you force the browser left and right wider than the screen width.
In this case, however, content and possibly the navigation and logo should already be outside too.Can you post here a link to that site?
June 11, 2019 at 12:53 am #1108950Hi,
thanks for your thoughts which i share, but what counts is what our customer wants. So we just look for a solution to move those buttons.
I can‘t share the project with a public link for contractors reasons. Regards!June 11, 2019 at 10:06 am #1109066Hi,
You should be able to move the post nav by editing the single.php file. Look for this code around line 42:
$blog_disabled = ( avia_get_option('disable_blog') == 'disable_blog' ) ? true : false;
Below, add this code:
echo "<div class='custom-post-nav'>"; echo avia_post_nav(); echo "</div>";
And then use this css code to change the style of the navigation:
#top .custom-post-nav { clear: both; } #top .avia-post-nav { position: relative; height: 110px; } #top .avia-post-nav .entry-info-wrap { width: auto; }
After that, edit the footer.php file and remove this code around line 239 to disable the default navigation:
echo $avia_post_nav;
Best regards,
IsmaelJune 11, 2019 at 10:27 am #1109069Thanks a lot Ismael,
i just added your code except removing the default nav in the footer because until now the new nav doesn’t work. Just nothing seems to change. We saved the changes, deactivated the cache. Is there another file i would have to edit? We are using a child theme, can this be a problem?
best regards
TobiJune 11, 2019 at 10:52 am #1109075Update: Even if I
edit the footer.php file and remove this code around line 239 to disable the default navigation:
echo $avia_post_nav;
the old nav doesn’t disappear. The linked blog template doesn’t seem to use footer.php to display the nav…? I’m feeling a bit stupid now.
Ideas?- This reply was modified 5 years, 5 months ago by check-t.
June 11, 2019 at 11:01 am #1109080on enfold (child) – Blog Layout – you got this: “Single Post Navigation”
if you only want to remove it :
Select to disable or enable the post navigation that links to the next/previous post on single entries. Setting is also used for portfolio. Use filter avf_post_nav_settings to customize.
June 11, 2019 at 12:02 pm #1109098First – these posts/portfolio had to build with standard editor! ??
If i use alb the navigation is gone – by that method!see here in action: https://webers-testseite.de/elegant/2019/06/11/neuer-post/
i changed a bit ismaels css code to only:
#top .custom-post-nav { clear: both; margin-bottom: 140px; } #top .avia-post-nav { position: absolute; margin-top: 60px; }
the rest comes from default settings.
footer.php: https://pastebin.com/dl/NRAyDTZH
single.php: https://pastebin.com/dl/FiAHHdsS
single-portfolio.php: https://pastebin.com/dl/dLjvqBgthow to have post-navigation on alb posts/portfolios?
June 11, 2019 at 12:44 pm #1109107Select to disable or enable the post navigation that links to the next/previous post on single entries. Setting is also used for portfolio. Use filter avf_post_nav_settings to customize.
No, we really don’t just want to remove it. Setting this would disable the Nav globally. We just want to move that navigation below the posts.
- This reply was modified 5 years, 5 months ago by check-t.
June 11, 2019 at 12:54 pm #1109110Hi Günni,
we, have to be built with the standard editor, reasons are workflow and permissions of the company website.
It’s all a bit hard to explain because i cannot show you the private data / links. But thanks again for your efforts!
@Moderators – any ideas?- This reply was modified 5 years, 5 months ago by check-t.
June 11, 2019 at 5:59 pm #1109230i did that from ismael – you can download the files ( portfolio-single too) from pastebin. Just upload those files to your child-theme folder.
Add the css to your quick css and it will look like this here : https://webers-testseite.de/elegant/2019/06/11/neuer-post/
June 11, 2019 at 6:17 pm #1109237Hi Günni, hi all
i already tried that, but no success. The only change i see, is that the NAV disappears on a timeline-post-types we use on that website. See link for that in private content. But the new NAV Position by
echo “<div class=’custom-post-nav’>”;
echo avia_post_nav();
echo “</div>”;
is ignored.Is it possible, that the post_nav class first have to be introduced before echo?
kind regards, have a nice eveningJune 11, 2019 at 9:10 pm #1109285did you download my files?
because i inserted:$avia_post_nav = avia_post_nav(); echo "<div class='custom-post-nav'>"; echo avia_post_nav(); echo "</div>";
and did you see my comment on that post and portfolio had to be created by default editor – not alb !
and dear mods – i do not know why this happens. the post nav did work on alb generated portfolio and posts too ?June 12, 2019 at 12:16 pm #1109456Hi Günni,
and did you see my comment on that post and portfolio had to be created by default editor – not alb !
– I misunderstood that, yes, all posts are created with the dafault editor.
I downloaded your files and use them in the child theme. But still no success at all, as you can see in the current state.
I’ve got the feeling, that avia-post-nav is not called by the footer.php for blog posts but only for portfolio posts. Because commenting out “echo $avia_post_nav;” only makes it disappear in portfolio posts like the timeline but not the jobs.
I just don’t know what’s wrong here…
June 12, 2019 at 1:44 pm #1109487Allright,
i sorted it out and it seems to work. Problem was, that a custom Post-template was used by a colleague with no documentation. Thats why all changes didn’t showed up. Big Sorry!!
Just two more CSS things
– The two Buttons for prev and next post are positioned below each other under the post, relative to the post-content. i would like to show them beside of each other at this position with 50% / 50% width – how can i do this?
– only on a display with of below 768px i have the buttons below the post, as the customer wishes – on wider screens the buttons are still floating ta the edge of the screen. How can we manage to have it always below the post?The actual CSS for Styling is this:
#top .custom-post-nav { clear: both; } #top .avia-post-nav { position: relative; height: 110px; margin: 10px 50px 10px 50px; background-color:rgba(0, 0, 0, 0.5); } #top .avia-post-nav .entry-info-wrap { width: auto; }
Thanks again!
- This reply was modified 5 years, 5 months ago by check-t.
June 12, 2019 at 3:49 pm #1109516you can see my css here: https://kriesi.at/support/topic/change-position-of-post-nav-buttons-below-post/#post-1109098
the absolute positioning is for me the better way – the buttons are positoned left and right with no additonal css. And hovering effect etc. works as before.June 12, 2019 at 3:58 pm #1109518Yes, of course i tested your CSS but the customer REALLY wants the buttons below the text, positioned RELATIVE to it. Unfortunately my or your taste in Layout and Design doesn’t count here. Sorry for my misunderstand-able writing.
Regards
Tobi- This reply was modified 5 years, 5 months ago by check-t.
June 13, 2019 at 5:47 am #1109700Hi,
Thanks for the update.
The modification that we originally suggested should position the post navigation between the sharing and comments section, right below the post content. Did you override any templates in your child theme aside from those suggested here?
Please post the WP and FTP details in the private field so that we can check it.
Best regards,
IsmaelJune 13, 2019 at 9:35 am #1109803Hi,
i would love to give you access, unfortunately i cannot because of company restrictions.
This is our single.php based on your post:
<?php if ( !defined('ABSPATH') ){ die(); } global $avia_config; /* * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory. */ get_header(); $title = __('Blog - Latest News', 'avia_framework'); //default blog title $t_link = home_url('/'); $t_sub = ""; if(avia_get_option('frontpage') && $new = avia_get_option('blogpage')) { $title = get_the_title($new); //if the blog is attached to a page use this title $t_link = get_permalink($new); $t_sub = avia_post_meta($new, 'subtitle'); } if( get_post_meta(get_the_ID(), 'header', true) != 'no') echo avia_title(array('heading'=>'strong', 'title' => $title, 'link' => $t_link, 'subtitle' => $t_sub)); do_action( 'ava_after_main_title' ); ?> <div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'> <div class='container template-blog template-single-blog '> <main class='content units <?php avia_layout_class( 'content' ); ?> <?php echo avia_blog_class_string(); ?>' <?php avia_markup_helper(array('context' => 'content','post_type'=>'post'));?>> <?php /* Run the loop to output the posts. * If you want to overload this in a child theme then include a file * called loop-index.php and that will be used instead. * */ get_template_part( 'includes/loop', 'index' ); $blog_disabled = ( avia_get_option('disable_blog') == 'disable_blog' ) ? true : false; echo "<div class='custom-post-nav'>"; echo avia_post_nav(); echo "</div>"; if(!$blog_disabled) { //show related posts based on tags if there are any get_template_part( 'includes/related-posts'); //wordpress function that loads the comments template "comments.php" comments_template(); } ?> <!--end content--> </main> <?php $avia_config['currently_viewing'] = "blog"; //get the sidebar get_sidebar(); ?> </div><!--end container--> </div><!-- close default .container_wrap element --> <?php get_footer();
This still leads to the problems i described in my former post. We need a css just like in the mockup in the private content:
– The two Buttons for prev and next post are positioned below each other directly under the post, relative to the post-content. i would like to show the buttons them beside of each other at this position with 50% / 50% width
– in the current state only on a display with of below 768px i have the buttons below the post, as the customer wishes – on wider screens the buttons are still floating ta the edge of the screen. How can we manage to have it always below the post?
Kind regards!
June 14, 2019 at 3:54 am #1110169Hi,
That is where the post navigation should be with that modification. Did you try the original css code?
#top .custom-post-nav { clear: both; } #top .custom-post-nav .avia-post-nav { position: relative; height: 110px; } #top .custom-post-nav .avia-post-nav .entry-info-wrap { width: auto; }
Don’t forget to disable the Performance > File Compression temporarily.
Unfortunately, we won’t be able to help you further without having access to the site. Please let us know once the site is live.
Best regards,
IsmaelJune 20, 2019 at 5:27 pm #1112003Hi Ismael,
sorry for my late response, was travelling. Yes, of course i add your CSS, but no success. I created a copy of the project where I’m able to provide admin login credentials for you. I hope this helps to solve the problem easier.
Kind regards, thanks again
Tobi- This reply was modified 5 years, 5 months ago by check-t.
June 24, 2019 at 2:40 am #1112796Hi,
Thanks for the update.
There was an extra curly brace in one of the css media queries. We removed it to fix the css code.
// https://imgur.com/a/1wyQxXR
Best regards,
IsmaelAugust 22, 2019 at 12:22 pm #1129965You are the greatest- :) Even if i can’t believe a my editior didn’t see that. Thanks!!
August 22, 2019 at 4:40 pm #1130031Hi check-t,
Glad we could help :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.