Forum Replies Created
-
AuthorPosts
-
thank you,
günter
You are right, sorry!
August 13, 2013 at 11:29 pm in reply to: Can I use the navigation arrows for each category, not all? #127414Hi Nick,
now I have found an individual solution with the smarter-navigation-plugin: I added the code above into a renamed copy from loop-index.php, invoked only by single.php. Therby I used the same html-tags and -classes as the theme. Additionaly I add an extra class ‘anzeigen’ to the $output in the ‘function avia_post_nav($same_category = false)’ in functions-enfold.php. Into the code in the loop I add a style block, that determines the extra class ‘anzeigen’ as ‘display: none’
So the whole thing works now in every case. If I do not come from a category-Page, the code for ‘previous post in catetegory’ does obviously not work, or create any effect. In the other case, the standard-arrows are replaced by the smarter-navigation-arrows.
Regards,
Günter
Hi Ismael,
the code above, sets the category-browsing in every case. I mean that an user should stay in a category, only if he chooses that category before, not in general.
For Example: Someone starts in the main blog-page, where all posts are listed. Then he wants, that clicking at the next- or previous-arrows leads him through all posts. But if he selects before a specific category, he expected, that the arrows guide him only through the posts in the selected category. The plugin ‘smarter-navigation’ remembers, if someone comes from a category-archive or not, and from wich category he comes.
Regards,
Günter
I add this topic at the recommendation of Nick (thread “Can I use the navigation arrows for each category, not all?”)
If someone selects a category, and then clicks inside that category a single post, the prev/next-arrows do not navigate inside that category.
There exists a small (5 kb) plugin wich would solve this problem. But is hard to integrate this plugin into the theme.
It would be very helpful, if there would be any possibility to browse inside a category.
August 7, 2013 at 2:10 pm in reply to: Can I use the navigation arrows for each category, not all? #127412Hi,
I have found a nice small Plugin: smarter-navigation.1.3.2. This Plugin remembers, if an user comes from an archive- or category-page to a single post. Normally you have to replace only ‘previous_post_link(‘ and ‘next_post_link(‘ with ‘previous_post_smart(‘ and ‘next_post_smart(‘ and it should work.
But I did not found these expressions in the enfold theme. I inserted prev- next- links, that really display only, when you are coming from a category-Page. But in this case I have two pairs of links: the enfold arrows for the next post and the links inside the category. What can I do? The used code-lines:
<!-- previous post in catetegory -->
<?php
$prev_post_id = get_adjacent_id_smart( true );
if( $prev_post_id ) {
$args = array(
'posts_per_page' => 1,
'include' => $prev_post_id
);
$prevPost = get_posts( $args );
foreach ( $prevPost as $post ) {
setup_postdata( $post );
?>
<div class="post-previous">
<a>">«Previous Post</a>
<a>"><?php the_post_thumbnail('thumbnail'); ?></a>
<h4><a>"><?php the_title(); ?></a></h4>
</div>
<?php
wp_reset_postdata();
} //end foreach
} // end if
?>
<!-- next post in category with first line: $prev_post_id = get_adjacent_id_smart( ); -->Is it possible to include the link above into the enfold-arrows or at least to fade out the arrows, when needed? One idea is, to place the extra-links above the enfold-arrows in a div with higher z-index.
Regards,
Günter
Hi Ismael,
I had highlighted the word text as to see in the gif.
But the Problem is solved. It seems, the reason was the nextgen-gallery ver. 2.0. After downgrading next-gen everything works. But I am also still on wordpress 3.5.x.
For now I am happy, that everything works.
Regards,
Günter
Hi Nick,
I don’ know, how to include an image here. I loaded the screenshot up to http://www.schoefl.info/test/screen.gif
I hope, this is ok.
Regards,
Günter
August 2, 2013 at 10:00 am in reply to: Can I use the navigation arrows for each category, not all? #127410Hi Dude,
I have tried your proposal, but it don’t work. I do not know, if I had executed every option, because of the absent of know how. The only one that works, was ‘is_single()’ instead of ‘is_archive()’. But again, it operates for every post.
Regards,
Günter
Thank You,
it is not urgent. And Contact Form 7 would be a good solution.
Regards,
Günter
Hallo,
ja, ich habe dann bemerkt, dass die Vorschläge eh zufällig angeordnet werden. Ich habe hier sehr viele Posts mit vielen “Bildlücken”. (4 mit Bilder, dann 13 ohne, 30 mit usw..) Zuerst habe ich die Anzahl der Vorschläge auf 12 erhöht und den Überschuss über eine Zeilenlänge ausgeblendet. Die Reihenfolge der ausgeblendeten konnte ich gar nicht feststellen. Es schien nur so, als ob immer die gleichen erschienen sind. Nachdem ich die Anzahl entsprechend erhöht habe, wurde auch die Zufälligkeit offensichtlich.
Danke auf jeden Fall,
Günter
July 31, 2013 at 7:05 am in reply to: Can I use the navigation arrows for each category, not all? #127408Is ist possible to use both versions of navigation?
If someone starts from a specific (static) “category-page”, it would be appropriate to browse only inside the category. Otherwise – starting from the (static) “all-posts-page”, it would be usefull to see posts from all Categories in regular order by date.
It would be nice, to start the filter shown above not in general in the functions.php but in the specific posts-pages:
* Category-page: add category-filter
* All-posts-page: remove category-filter
Is that possible?
Regards,
Günter
Hi Dude,
thank You very much – the code is working really fine!
Günter
Sorry for the long time. As newbie in the forum I had my problems, to find my posting again.
The problems are solved.
Thank You,
Günter
I have found a way to exclude posts without thumbnails with CSS. But I still need help for sorting the related posts randomly.
Regards,
Günter
-
AuthorPosts