Hot answers tagged

5

The Title field will be a part of every entry 90% of the time ('Singles' don't need a Title). To add a custom field in Craft: Settings > Fields > (create a field) To add the new field to a content type: Settings > Sections > (click the "Edit content-type" link to the right) > (drag your new field into the blue box) > hit Save. I like to create a separate ...


4

For Craft 2, You can write a plugin that listens to the onBeforeSaveAsset event, and changes the title from the asset parameter to whatever you want. Something like: if ($event->params['isNewAsset]) { $asset = $event->params['asset'] $asset->getContent()->title = 'My New Title'; } For Craft 3, you can write a plugin that listens to the ...


3

Metadata is an important part of a website. If you are getting poor scores from website graders and don't see any place on your site to add that information it likely wasn't implemented by the team that built your site. It's good you've noticed this and it's worth taking the time to set up a way to manage the metadata on your site. The best way to do this ...


2

So the problem was caused by a secret character, the character was not visible in code but it was noticed in the w3c validator for html. So after removing that character issue solved.


2

I would add custom fields to your category group, for META Descriptions. This would allow you to display meta data when on a 'category home page'. Then on a single entry page, the entry-type custom fields for meta data would be used. See this example/answer: How do I define an entry's META description?


2

You'll need to add more details about your current setup for a more specific answer. In general, adding a number to the Meta Title and Meta Description is probably not a good approach to solve your problem of duplicates. Search engines score your page based on how relevant your content is. Adding a number, unless it has some meaning (perhaps a date for an ...


2

Mike: yes you do. It sounds like you had your site built by another developer? Unlike other CMS, everything that displays on your website in Craft is custom built. The gist is you setup a bunch of fields on the backend (Craft's "control panel")—which is probably what you did. Think of the control panel as simply an interface to database. However, those ...


2

So this isn't a simple answer, because we don't know how the SEO has been implemented on your particular site. It could have been done manually, or they could have used my SEOmatic plugin or it could have been another plugin. You also don't mention what version of Craft CMS you're using. In any event, what that SEO tool is telling you is that the <meta ...


1

There's a plugin that allows you to connect to an external database, which will allow you to do a query within the template. Remember to cache the result though as it could slow things down otherwise. Another option is to sync the external data with Craft using feed me, so you can pull the data locally.


1

Could the Google account holder for the domain have set the listing to use a different value than what's in the title element? Craft doesn't do anything like this out of the box and the SEO plugins that would change the title value you'd see that in the DOM. Is there a meta tag in the head maybe that Google reads to override the title element? There's no ...


1

Maybe your programmer forgot to include it. Out of the box there are no settings for Meta or Seo information in Craft so if you have a section for it, someone has probably created it in order to include it in your templates (unless you did it yourself?) Did you install any plugins or did someone else create any plugins for that? Like I said maybe the team ...


1

Yes, you will most probably need a programmer if meta tags do not exist in generated html.


1

This should do the trick {% extends "_layout" %} {# do you use a custom routing or why do you repull the entry #} {# you know craft presents you the entry if you are in a entrypage #} {# so just using title = entry.title will be enough because the global entry variable already exists #} {% set entry = craft.entries({ slug: craft.request.getSegment(2) })....


1

Craft will not automatically create anything on the frontend for you. You could use something like the SEOmatic plugin, though.


1

So to update this question incase someone happens to stumble across it. With Sprout SEO you need to enable the Enable custom metadata variable option under 'Advanced' in the settings menu. From there I set a twig variable with the value of my metadata title, in this case {%- set metaTitle = entry.metadata.title -%} and attach it to my AJAX wrapper element ...


Only top voted, non community-wiki answers of a minimum length are eligible