Skip Navigation

[Resolved] Aligning Post Titles with the Content Area

This thread is resolved. Here is a description of the problem and solution.

Problem:
The issue here is that the user wanted to remove the post title that was being used by his theme because he wanted to add the title with Layouts.

Solution:
The solution is to Hide the title using some css like this

.post-title:first-child{
  display:none;
}

Then use the following shortcode to display the title where you want it.
[wpv-post-title]

This support ticket is created 6 years, 11 months 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 14 replies, has 3 voices.

Last updated by adamR-11 6 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#598635
LAYOUT 1.png
BAD 2.png
BAD 1.png
GOOD.png

Tell us what you are trying to do?

Hello,
Could you please help me resolve the issues bellow:
I'm trying to make the Custom Posts Titles display in line with the Content Area and the sidebar right next to it.

(please see my screen shot attached called "Layout 1.png")

Using the "Grid of Cells", I think I was able to kind of set it the proper way but the Style of the Title is not displaying and it's being displayed twice.

Once by the theme, with Wrong Full Width but correct style.
Once by the Layout Short Code, seems the Correct aligment but has the wrong style.

(please see my screen shot attached called "BAD 1.png")

Another problem is that the sidebar I place with the cell layout, is not having the appropriate space under the logo.

(please see my screen shot attached called "BAD 2.png")

Is there any documentation that you are following?

For days I tried following the bellow but I haven't been successful:
https://toolset.com/documentation/user-guides/how-to-create-sidebars-in-layouts/
https://toolset.com/documentation/user-guides/layouts-theme-integration/

Is there a similar example that we can see?
Yes, please see my screen shot attached called "GOOD.png"
I just need both this layouts to look like that.
(The reason I need to use the layouts is because I need to use different sidebars when Viewing VS when Editing the Custom posts. As you can see when Viewing, there's an ability to "send an invite" but NOT when editing.)

What is the link to your site?
It's a private site but I would be happy to give you access.
hidden link
I have spent so much time on this, I would appreciate all the help you can provide.
I'm really not knowledge in any programing language either.

Thank you.

#598695

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thank you for contacting our support forum.

Actually it won't be possible to do this because Layouts only has control over the content area of your post.

Your Post title is being displayed by your Post Template PHP file.

In order to get it in the same line you will need to remove the title from the PHP file and then add it using the title back using your Layout.

If you would like me to assist you with this you can provide me with admin access and I can have a look for you.

Thanks,
Shane

#598998

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thank you for the access.

You can remove it with CSS but we need to add a class to the template so it doesn't remove the second title as well, because I was able to replicate the title here.
hidden link

Just scroll to the bottom. So we can add a css class to the php template file for the page and then target that class with css to remove the title and use our subsitute title.

Please let me know if this helps.
Thanks,
Shane

#599035

Thank you Shane, that sounds like the best solution indeed.

I can see the additional title you made.
It's displaying right above the comments in the VIEW mode on all the Custom Posts.

Please excuse my ignorance, I don't code in CSS either,
but I should go to: Appearance > Customize > Additional CSS
and enter what exactly?

#599080

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

No worries i'm here to help.

It seems that your theme can hide the titles but it doesnt seem to be working for the custom post types.
hidden link

What you can do tho is to contact the theme's support on this one as they may have a solution for this function to work with custom post types.

Thanks,
Shane

#599084

Yes, that would be correct.
I wouldn't want to hide the Titles for the Regular WordPress Posts.

The only titles that would be hidden would be the Custom Posts Project's.
Of course those would not be found on the Ultra Theme's Settings because the Custom Posts Projects where made with WP-Types.

I believe your CSS Solution would be the easiest way to go.
Could you please provide me with the correct coding to target the Titles of this Custom Posts?

I know it should be something like:

.SOMETHING {
    display: none !important;
}

But even after that I would still need your help to display the title that you made, inside the Content Area.
What is the code you used to create that second Title above the Comments?

I can simply copy and paste that inside my Layouts Template.

Please let me know.
Thank you.

#599098

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Css would be a good solution but the issue is that it will remove both titles. So it will still need be atleast checked by your theme support to see if they have a better way of doing this.

The appropriate css would be.

.post-title:first-child{
  display:none;
}

Thanks,
Shane

#599110

Ok, thank you for the pice of code.

Could you please also share with me:
"What is the code you used to create that second Title above the Comments?"

I could copy and paste it my Layouts Template for the Custom Posts Projects.

#599298

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi,

Its actually in the layout for projects.

However this is the exact code that is being used.

<h1 class="post-title entry-title fancy-heading">
			<span class="maketable">
				<span class="addBorder"></span>
				<span class="fork-icon"></span>
              <span class="addBorder"></span>
			</span><a href="<em><u>hidden link</u></em>">[wpv-post-title]</a><span class="bottomBorder"></span></h1>

Thanks,
Shane

#599454
Screen Shot 2017-12-15 at 6.42.10 PM.png

Thank you Shane.
I had to change the URL with the [wpv-post-url] Short code so it could link properly per custom post.

<h1 class="post-title entry-title fancy-heading">
			<span class="maketable"><br />
				<span class="addBorder"></span><br />
				<span class="fork-icon"></span><br />
              <span class="addBorder"></span><br />
			</span><a href="[wpv-post-url]">[wpv-post-title]</a><span class="bottomBorder"></span></h1>

I inserted it at the very top of the VIEWS and CRED layouts.
Now the tittle it's displaying properly next to the sidebar.

I also used:

.post-title:first-child{
  display:none;
}

But as you said, it removed both titles not just the top one.

Back to your solution about hiding the 100% width title:
"...we need to add a class to the template so it doesn't remove the second title as well"

Could you please tell me, how would I go about doing that?

#599948

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

I took another look at the theme files to see how we could remove the title but I was unsuccessful in doing so.

Maybe the theme's support would know how to remove this because I removed the title files but still no luck. Could you contact them and let me know if they are able to help.

Thanks,
Shane

#600348

Ok, well thank you for taking a look Shane.
I appreciate it.

#600527

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

If there are no further issues then we can mark this one as resolved.

Thanks,
Shane

#600873

Here is the resolution:

#1 Navigate to > wp-admin/admin.php?page=dd_layout_CSS_JS

#2 Paste the code below in the CSS tab:

.post-content-inner h1{
	display:none;
}
.entry-content h1{
	display:block;
}

Thank you

#1168571

Hi, I'm trying this solution myself.

Question:

If I cause my .post-title not to display, will this harm my SEO?

Thanks.