maricelo
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: WordPress integration to an already existing websiteoh, ok. Sounds good. Although I have one more question. In case I have a multi language website. Is it possible to synchronize the language switch of the main page with the switch and language itself on the WordPress? For example a user switches language to german and then clicks on the blog section. And blog section is opened in german (example.com/de/blog). It’s also not a problem?
Forum: Developing with WordPress
In reply to: WordPress integration to an already existing websiteOk, so basically on the example.com/blog everything will be from wordpress. Meaning that the layout for navbar, footer, etc., will be coded in the WordPress theme, right?
Forum: Developing with WordPress
In reply to: WordPress integration to an already existing websiteOk, but how will the existing navbar and footer blend in? Or do I have to create that from scratch on the wordpress side? Or can the wordpress be somehow embedded?
And is it possible to use a specific theme and edit it as per needs?
Forum: Themes and Templates
In reply to: [GeneratePress] Incorrect thumbnails (next/prev post)Ok, so in this case could you simply please tell me how to wrap image in link? I guess it is done in the php code posted above.
Forum: Themes and Templates
In reply to: [GeneratePress] Incorrect thumbnails (next/prev post)Could you please help me with one more question? I would like to make the thumbnail in the post navigation to occupy all the width and height of the nav-next class. And “Next post > Post title” (they are in the post-title-wrap class) is on the image in the right bottom corner. I can do that with the css but didn’t manage to change the link to be an image. I would like so that the whole image is clickable but I’m having troubles with nesting it in the link.
So just to sum up: Image the whole width of the nav-next class. “Next post > Post title” in the right bottom corner but just a simple text.
The code was taken from: https://generatepress.com/forums/topic/post-navigation-with-clickable-thumbnails/#nav-below, .nav-previous, .nav-next, .post-title-wrap { display: flex; width: 100%; } #nav-below { justify-content: space-between; } #nav-below img { max-width: 100px; max-height: 100px; object-fit: cover; } .nav-previous, .nav-next { width: 49%; margin: 10px 0; position: relative; box-sizing: border-box; } .post-title-wrap { padding: 10px; width: 100%; flex-direction: column; border: 1px solid #efefef; } .nav-previous .post-title-wrap { text-align: right; } #nav-below a:before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; } .title-label { font-size: 12px; } .nav-previous:hover .post-title-wrap, .nav-next:hover .post-title-wrap { border: 1px solid #ccc; } @media(max-width: 758px) { #nav-below { flex-direction: column; } .nav-previous, .nav-next { width: 100%; } }Forum: Themes and Templates
In reply to: [GeneratePress] Incorrect thumbnails (next/prev post)Ok, nvm. Found it. Now just have to adjust the css which is not the easiest for me.
Forum: Themes and Templates
In reply to: [GeneratePress] Incorrect thumbnails (next/prev post)The issue seems that WordPress is generating a 150×150 pixel thumbnail. And if I try to stretch it then this looks bad. Any ideas on how to adjust the thumbnail size?
Forum: Themes and Templates
In reply to: [GeneratePress] Incorrect thumbnails (next/prev post)It seems that it helped. Now everything works as expected. Thank you!
One more thing that I would like to ask. How to place the image in the background of the next/prev navigation? As currently there are 2 divs – one for the name of the article and the second for the picture. Can I somehow combine those in one div so that the picture is in the background across the full width?
Forum: Themes and Templates
In reply to: [GeneratePress] Incorrect thumbnails (next/prev post)Unfortunately I can’t share my website URL, however, the code that I am using is below.
The code is in the functions.php:add_filter( 'generate_post_navigation_args', function( $args ) { if ( is_single() ) { $prevPost = get_previous_post(); $prevThumbnail = isset( $prevPost ) ? get_the_post_thumbnail( $prevPost->ID, 'thumbnail' ) : ''; $nextPost = get_next_post(); $nextThumbnail = isset( $nextPost ) ? get_the_post_thumbnail( $nextPost->ID, 'thumbnail' ) : ''; $args['previous_format'] = '<div class="nav-previous">' . $prevThumbnail . '<div class="post-title-wrap"><span class="title-label">Previous Post</span><span class="prev" title="' . esc_attr__( 'Previous', 'generatepress' ) . '">' . generate_get_svg_icon( 'arrow-left' ) .'%link</span></div></div>'; $args['next_format'] = '<div class="nav-next"><div class="post-title-wrap"><span class="title-label">Next Post</span><span class="next" title="' . esc_attr__( 'Next', 'generatepress' ) . '">%link ' . generate_get_svg_icon( 'arrow-right' ) . '</span></div>' . $nextThumbnail . '</div>'; } return $args; } ); add_filter( 'generate_category_post_navigation', '__return_true' );Forum: Themes and Templates
In reply to: [GeneratePress] Incorrect thumbnails (next/prev post)Yes, it works for 90% of the posts that I have. I accidentally saw that yesterday.
Well, for example, I have 3 posts – A, B, C. All of these posts have different featured image set.
At the end of the post A there is a next/previous post navigation to the post B and C with a thumbnail. And the issue is that for the post B it shows thumbnail from another post on the website. The link to the post is correct but the image is not.
I checked the same issue in the post D (which has also a link to the post B in the next/prev section) but in this post, the thumbnail is correct and shows the featured image in the post B.Hopefully, it is more clear now.
Forum: Themes and Templates
In reply to: [GeneratePress] Incorrect thumbnails (next/prev post)Yes, however, I found the solution regarding the thumbnails here – https://generatepress.com/forums/topic/post-navigation-with-clickable-thumbnails/#post-1523670
Forum: Everything else WordPress
In reply to: Custom affiliate link in main menuThank you for your reply.
In the first post I mentioned that I’ve tried pretty links, however, the question is how to create that link for the main header menu. Because if I simply enter the custom created link (created in pretty links) it doesn’t work.Forum: Themes and Templates
In reply to: [GeneratePress] Next/Prev post thumbnailThank you!
That helped. Just one more question – is there a possibility to show the first image of the post and not the featured one?Yes, I’m having the same problem and it seems that the latest Yoast update caused it.