[PRO] How to create a blog and a post layout

Hi,

I am creating a layout for my the posts and the blog page.

1. Blog page (example: https://mensandbeauty.com/blog/)

Why some posts are showing excerpt and others no? (I don´t use the manual excerpt, but it should get the post text, correct?)

How can I show those 3 elements in the same line? (all in a row, one under the other)

How can I show the category with the link (the user should be able to click on the category). Also, how do I show subcategories?

One more thing. How can I show a link to comment the post? (example, “leave a reply”). Also, how can I show “no comments” when there´s no comments in the post?

How can I fill that space with the featured image?

2. Posts (example: https://mensandbeauty.com/productos-mas-vendidos-aliexpress/)

Is it possible to create a slider with the related posts?

How can I translate those texts? I am using Loco Translate, and I don´t find them (the rest of the theme is translated)

The featured images I used for my posts are 750x412px, how can I make the box of that size?

Hi Ignacio,

Thanks for reaching out.

Blog page
1.) I suggest that you will do the common troubleshooting for your issue about some posts are not showing the excerpt.

2.) To make 3 elements the same in one line, you need to add a custom CSS to do this:

Or you can simply add all the code in one text element like this: {{dc:author:display_name}} | {{dc:archive:title}} | {{dc:post:comment_count}} comentarios

3.) Regarding how to link the category, I want you to watch these videos:

4.) To fit the featured image to the section, you need to remove the padding you set for your post element.

5.) Yes, it is possible to create a slider with the related posts but this will require customization. Regretfully, customization is outside the scope of our theme support. You may seek 3rd party developers to help you with your problems or you can avail One where we can answer questions outside of the features of our theme.

6.) Please check this doc about the translation, we highly advise you to use WPML because it is compatible with our theme.

7.) I am not quite sure what do you want with your featured image box, can you explain it further more so that we could better understand it.

Hope that helps.

Thank you.

Hi,

  1. I had desactivated all plugins and the problem persists.

  2. Where do I add the custom CSS? Here?

  1. I don´t any info about creating a link to the category

Also, I need to know how to show the subcategories.

  1. I mean hoy can I make the boxes more rectangular (so the featured image fits correctly)

  2. How can I show related post (of the same category as the post) in this section? Now I can only set recento posts.

One more thing.

  1. The breadcrumbs are not showing correctly in mobile

Hello Ignacio,

Please edit your layout and click your breadcrumb element. You may need to set the Maximum Width to 100%.

Kindly let us know how it goes.

What about the rest @ruenel?

Hi Ignacio,

Please find the answer to your queries below, a few of them need a little more clarifications too.

– Where do I add the custom CSS? Here?
You can add the layout specific CSS where you specify it in your screenshot. You can also add the CSS code as Global CSS into the Theme Options > CSS.

–Is it possible to create a slider with the related posts?
Regretfully, there is no such option to slides the related posts.

–How can I translate those texts? I am using Loco Translate, and I don´t find them
You need to translate them by other means including filtering gettext. Please add the following code into the functions.php of your child theme.

add_filter('gettext', 'translate_all_text');
add_filter('ngettext', 'translate_all_text');
function translate_all_text($translated_text, $untranslated_text, $domain) 
{
    if ( $untranslated_text == 'All' ) 
    {
        $translated_text = __( 'Translated Text of ALL','text_domain' );
    }
    return $translated_text;
}

Please remember that the above code will work if copied as it is and don’t conflict with any existing style.
Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We really do not provide support for custom codes that means we can’t fix it in case it conflicts with something on your site nor will we enhance it.

–I don´t any info about creating a link to the category
Can you please elaborate on this?

–I mean hoy can I make the boxes more rectangular
Can you please elaborate on this?

Thanks

Thanks, let me explain.

  1. How can I show related post (of the same category as the post) in this section of the custom layout for the posts? Now I can only set recent posts.

I am looking for a related post query, but I don´t find it

  • Links to category

In the default design of the blog, the theme shows the categories with links

In the custom blog layout I want to do the same, show the categories and subcategories with the link.

Now I had only achieved the show the principal category (without the link).

  • Translation

I had added the code to the functions.php and it breaks the page

  • Blog layout set up

I had activated the custom layout for the blog

But I still see the default design.

  • Blog posts comments

Is it possible to eliminate that section? Ii don´t see the option to do it.

Hey Ignacio,

#7. Instead of Recent Post, set the Looper Provider Type to Current Post Terms

image

#Links to category

Based on your setup using a Text element, you need to use HTML anchor like the following code composing the archive URL and title:

<a href="{{dc:archive:url}}">{{dc:archive:title}}</a>

image

#Translation

In the Comments element, enable Messages.
image

Then, edit the messages.
image

#Blog layout setup

You’re currently using the AND condition. Use the OR like in the following screenshot.

image

#Blog posts comments

There’s no option to remove it. You will need to add the following code in Theme Options > CSS.

#reply-title {
    display: none;
}

If the code won’t work on your end, that means there’s something conflicting with it. To fix this, you will need to consult with a developer.

Hope that helps.

Thanks.

Few things:

#7 I had set the Looper Provider Type to Current Post Terms, but look at this post (https://mensandbeauty.com/maquinillas-cuchillas-de-afeitar/), the related posts are duplicated

#Links to category

Ok, now it works, but because is a link (and I have the default hover to black), when I hover the category text I can´t see it

How do I solve this?

Other thing is that I want also to show, apart from the main category, all of the categories.

One last thing, there are posts not showing the excerpt. I had tried to disable all plugins and changing to another theme and I don´t achieve to see the excerpt of some posts.

The weird thing is there are posts that work perfectly.

Hey Ignacio,

#7 I haven’t taken into account multiple categories. There’s currently no option to exclude the current post so it will be duplicated if you’ve assigned multiple categories. I’ll post this as a feature request but for now, you need to find a related post 3rd party plugin.

#Links to category
You need to change the Site Links Interaction color in Theme Options > Typography
image

There’s currently no option to show all categories but it will be available maybe in one of the succeeding updates.

Please stay tuned for updates.

Thanks.

Thanks.

#7 The related posts, i had set what you told me, but look at this post: https://mensandbeauty.com/maquinillas-cuchillas-de-afeitar/

The info that shows is the same post repeated 3 times. What am I doing wrong?

Also, what about the excerpt issue? Why some posts are showing excerpt and others not?

Hi Ignacio,

My colleague already created a feature request about the related posts and for the meantime he advises you to find an alternative way to show the related posts. On the other hand, regarding your issue about your excerpt when I was about to check the website again, I can’t access the wp-admin anymore, please fix it so that we can check it properly.

Thank you.

You are right @marc_a,

The issue comes from the Litespeed plugin. If you reload the web page 1 or 2 times, you will be able to see the admin.

Hi Ignacio,

I have tried to access the wp-admin but it shows the 503 error, unfortunately, it does not resolve even after refreshing the page multiple times. I would suggest you deactivate the said plugin temporarily, to access the wp-admin without any issue.

Thanks

You can try now.

Hello Ignacio,

I am already seeing this:

No duplicate posts so it seems that this issue is resolved. By the way, please make sure to update to the latest release which is the Pro 4.1.4. You can check out the changelog and notes here:

Best Regards.

Hi,

No, it is because I had changed it to “Recento Posts” while I wiat until you take a look.

I had changed it again to “Current Post Terms” and the problem persists.

Hello Ignacio,

It seems that you are using the “Current Post Terms” incorrectly. The “Current Post Terms” Looper Provider can be nested inside an existing Looper provider and used to display all categories or tags for each of your posts. Kindly check out the documentation here:

Best Regards.

Thanks.

I had been trying, but it seems I don´t have the knowledge to achieve it. Is it possible for you to set me up the related posts section (by category), so I can see how you do it?