Skip Navigation

[Resolved] my layout doesn't display as I want

This support ticket is created 7 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 0.41 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 12 replies, has 2 voices.

Last updated by Christian Cox 7 years ago.

Assisted by: Christian Cox.

Author
Posts
#578286

Hello Toolset support,

I've just started with Toolset few hours ago but I need advice before becoming crazy 🙂

I'm trying to make a layout for an interior design agengy to display their projects. Well I think Toolset is the perfect tool for it, but I can't handle it right for the moment.

So following your starting guide, I made this page : hidden link but there is many that doesn't goes as I want.

1- I would like to remove the sidebar > I saw different things in the forum and I don't know if I have to create a layout/template or copy the single-post.php page in my child theme and remove the code for the sidebar ???

2- I would like to add a galerie of different picture on each projet of the agency like before and after. When I add a picture into the CPT it doesn't goes into the gallerie that I set before in the layout as you can see on the website.

3- I would like the taxonomy of my post appear in under the title, how can I do that ?

4- Last thing, fo each project I would like to add square meter. I saw a field Number but is it possible to add m2 after ?

This is a lot of question.
Hope everything is clear and sorry my english is not perfect
I ready to learn 🙂

Thanks a lot
Adrien

#578312
field.png
description.png
gallery.png
sidebar.png

Hi, I'll try to help. In the future, we ask that you please create separate tickets for each question or topic. This helps us keep the forum organized and provide more focused assistance to each ticket. But please don't feel discouraged - create as many tickets as you need to get the information you need and we will try to help 🙂

1- I would like to remove the sidebar > I saw different things in the forum and I don't know if I have to create a layout/template or copy the single-post.php page in my child theme and remove the code for the sidebar ???
It depends on whether you are using the Divi Builder or the Default Editor. In some cases, you can use the "Divi Post Settings" panel in wp-admin to select "Full Width". See sidebar.png This will remove the sidebar if you are not using the Divi Builder. If you are using Divi Builder, then you must create a PHP file to be used as a single page full width template. I can help you with this if you are using the Divi Builder, but different child themes handle this in different ways. I'll need to access your wp-admin area and create a site clone. Please provide login credentials in the private reply fields below in this case.

2- I would like to add a galerie of different picture on each projet of the agency like before and after. When I add a picture into the CPT it doesn't goes into the gallerie that I set before in the layout as you can see on the website.
Can you share some more information about how your gallery is set up in wp-admin? I assume this is a Divi gallery module. If so, can you share a screenshot showing what happens when you click "Update Gallery" in the gallery module? The button is shown in gallery.png. You should be shown a Media Library window with several images present. Please take a screenshot and show me this screen.

3- I would like the taxonomy of my post appear in under the title, how can I do that ?
You can use the wpv-post-taxonomy shortcode to insert the taxonomy inside the post content. For instance, you can place a Text module at the top of the Divi Builder design, and click the "Fields and Views" button. This will allow you to select your taxonomy and specify some display options. It will insert a shortcode something like this:

[wpv-post-taxonomy type="layout_category"]

4- Last thing, fo each project I would like to add square meter. I saw a field Number but is it possible to add m2 after ?
If you use a Number field, you can store a number value. Then, on the front-end of the site, you can add "m2" after the value like this:

This project is [types field="square-meters-slug"][/types]m2

If you want to show the "m2" text in wp-admin, where the field is managed, the best thing to do is add it to the Field Description in the custom field editor. This will show up above the custom field input area in wp-admin. Please see description.png and field.png.

Let me know if you have additional questions about these responses.

#579115

1- I'm using Divi as a Theme but the Divi Post Settings doesn't appear on my custom page for "Realisation". So I guess I have to create a new single.php for my child theme. I've downloaded the single.php and its kind of greek to me actually. I've gave you the code of my website below.
You can add the following code to your child theme's functions.php file to enable the Divi Page Settings for any custom post type:

function my_et_builder_post_types( $post_types ) {
    $post_types[] = 'realisation-slug';
    $post_types[] = 'other-post-type-slug';
     
    return $post_types;
}
add_filter( 'et_builder_post_types', 'my_et_builder_post_types' );

Replace 'realisation-slug' with the actual slug of the post type, and copy + paste the line as many times as you need to for all custom post type slugs.

2- I don't want to use the Divi Gallery. My goal is to have my client using only the CPT to make easy the use of the website. So if possible I would like to have the gallery include in the CPT.
Okay, so it sounds like you want to include Projects as a CPT, and Projects will be children of Realisation posts. Then in each Project, you would like to include a custom field that will store a single image in a custom field. All the single images from the child Project posts will be used in an image gallery on the Realisation post. Is that accurate? If so, then you can use a Slider View that queries for Project posts, filtered by Post Relationship, where each post is a child of the current post. In the Loop Output of this View, you will include the custom image field. We have more information about setting up Slider Views here:
https://toolset.com/documentation/user-guides/creating-sliders-with-types-and-views/

Let me know your thoughts.

#579217

Hello Christian,

Thanks for your help.

1- I've added the code that you gave me to functions.php in my child theme but nothing happened. I still don't have the Divi Post Setting. I've tried with "realisation-slug" and "realisation" but it doesn't work.

2- Yes it sound good how you describe Project into Realisation as a child CPT. But is it possible to add pictures, text, surface... in the same CPT of my realisation or I have to create each project cpt separatly and add it after into the realisation cpt ?

No all the images will not be used into a gallery. For each project, I need to have a gallery where I can add multiple images. Images that I add to a projects gallery belong only to this project.

Hope it's clear.

#579371

Hello Christian,

2- I'm sorry, it's not a gallery it's a slider that I would like to display.

So here is my last <p> with gallery replace by slider and hope it make more sense : All images (of all my realisations) will not be used into a slider. For each project, I need to have a slider where I can add multiple images. Images that I add to a projects slider belong only to this project.

#579568

Hi, if the code isn't working for you, I'll need to take a look in your wp-admin area. If that's okay with you, please provide updated login credentials in the private reply fields here - the login credentials you provided earlier no longer work for me.

#579632
Screen Shot 2017-10-17 at 12.27.15 PM.png

Hi, it looks like my User role doesn't have access to much in the Dashboard, can you take a look? It would be best to grant me admin permissions.

#579642

Hi,

Sorry. This is good now.
Cheers

#579671
Screen Shot 2017-10-17 at 2.45.27 PM.png

Hi, I was able to log in using the FTP credentials you provided, but /public_html/wp-content/themes does not seem include your child theme files, only the parent Divi theme. I'm also not given the ability to see the theme editor here: /wp-admin/theme-editor.php, so I'm not able to make manual modifications through the admin.

Am I misunderstanding where the files are stored on your FTP server? Typically I would expect to find the child theme in the same folder as the parent theme.

#579703
Screen Shot 2017-10-17 at 22.26.27.png

Hi Christian,

Yes, the child theme is in the same folder ! I'm using a subdomain to devellop the website so you can find it in the folder pop.agenceamdc.fr as you can see in the printscreen.

#579706

Okay it looks like there's some additional code required for this version of Divi that isn't required in the version I'm using. I've added that code in functions.php, and here it is for your reference:

function my_et_builder_post_types( $post_types ) {
    $post_types[] = 'realisation';
    return $post_types;
}

add_filter( 'et_builder_post_types', 'my_et_builder_post_types');
add_filter( 'et_fb_post_types', 'my_et_builder_post_types');

add_action('add_meta_boxes', 'divicolt_add_meta_box');
function divicolt_add_meta_box()
{
    foreach (get_post_types() as $post_type) {
        if (post_type_supports($post_type, 'editor') and function_exists('et_single_settings_meta_box')) {
            $obj= get_post_type_object( $post_type );
            add_meta_box('et_settings_meta_box', sprintf(__('Divi %s Settings', 'Divi'), $obj->labels->singular_name), 'et_single_settings_meta_box', $post_type, 'side', 'high');
        }
    }
}

add_action('admin_head', 'divicolt_admin_js');
function divicolt_admin_js()
{
    $s = get_current_screen();
    if (!empty($s->post_type) and $s->post_type != 'page' and $s->post_type != 'post') {
        ?>
        <script>
            jQuery(function ($) {
                $('#et_pb_layout').insertAfter($('#et_pb_main_editor_wrap'));
            });
        </script>
        <?php
    }
}

I selected "Fullwidth" for this post, and it looks like the layout updated on the front-end of the site. Can you take a look? If you have stored a local copy of your child theme's functions.php file, you should download the one from the server to import the updates.

#579848

Thanks Christian, I have the Divi Post Setting in my CPT and the post is fullwidth. It works good. There is still some changes that I would like to do.

1- This CPT "Realisation" is more like a page than an article. So I would like to remove the author and the date.

2- Also I don't how the slider is working. I have put a custom field 'Image" for the CPT Realisation with the possibility to adding multiple. I was expected that theses images will be into the slider that I've put in my layout but it doesn't work.

Can you help about that ?
Cheers

#579984

1- This CPT "Realisation" is more like a page than an article. So I would like to remove the author and the date.
Unfortunately this part of the design is managed by your theme. To remove it completely, you must supply a new single-realisation.php template file in your child theme, according to the WordPress Template Hierarchy:
https://developer.wordpress.org/themes/basics/template-hierarchy/

Or you can hide it by adding the following code to Layouts CSS and JS:

.single-realisation .post-meta {
  display: none;
}

This won't remove it from the page source, but will hide it from view.

2- Also I don't how the slider is working. I have put a custom field 'Image" for the CPT Realisation with the possibility to adding multiple. I was expected that theses images will be into the slider that I've put in my layout but it doesn't work.
It would be best to address this in a separate ticket, since it's quite different from the Layout issue. Please create a ticket as we can take a closer look at this.