Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Hur man Fixar Customize-fält som inte visas i WordPress (Enkel guide)

Anpassade fält är en avancerad funktion i WordPress som gör att du kan lägga till anpassat innehåll och metadata i dina inlägg och sidor.

Vi använder anpassade fält för att visa metadata i flera WPBeginner-områden. Vi märkte dock att många användare som ville replikera den funktionaliteten inte kunde hitta alternativet ”Anpassade fält”.

I den här artikeln visar vi dig hur du snabbt kan lösa problemet med att anpassade fält inte visas i WordPress.

Fixing custom fields not showing in WordPress issue

Fixa problem med att customize-fält inte visas i WordPress

Custom-fält är vanligtvis associerade med WordPress-poster, pages eller custom post types.

Ofta hittar du anpassade fält omnämnda i olika WordPress-handledningar runt om på nätet. Ändå kommer du sannolikt inte att se alternativet för anpassade fält på din webbplats, särskilt om du nyligen startade din WordPress-blogg.

Tidigare var customize-fält synliga som standard på vyn för efterredigering på alla WordPress-webbplatser.

Men WordPress core utvecklingsteam bestämde sig för att dölja det som standard för alla nya användare eftersom det är en avancerad funktion.

De gjorde det också enkelt för alla att göra de anpassade fälten synliga med bara några clicks inifrån post editor.

Skapa eller edit en befintlig post / page och klicka sedan på menyn med tre punkter i det övre högra hörnet av vyn.

Block editor preferences

Längst ner i menyn klickar du på alternativet ”Preferences”.

Detta kommer att visa block editor ’Preferences’ popup. Härifrån måste du växla till tabben ”Panels” och växla toggle bredvid alternativet ”Custom Fields”.

Show custom fields

Obs: Om du inte ser alternativet Anpassade fält på din webbplats, bläddra till felsökningsavsnittet nedan.

WordPress kommer då att berätta för dig att en page reload krävs för att aktivera Custom Fields.

Klicka bara på knappen ”Aktivera och ladda om” för att fortsätta.

Redigeringsskärmen laddas sedan om. Efter det kan du bläddra längst ner på sidan och hitta rutan ”Anpassade fält”.

Custom Fileds meta box now visible

WordPress kommer ihåg ditt visningsval och kommer att fortsätta att visa custom fields boxen när du editerar posts eller pages på din WordPress website.

Du kan nu använda boxen Custom Fields för att add, edit och delete custom fields och deras värden.

Vad är customize fält? Vad kan du göra med dem?

När du skriver ett nytt inlägg, en page eller en annan content type sparar WordPress det som standard i två olika areas. Den första delen är huvuddelen av ditt content som du addar till med hjälp av Block Editor.

Den andra delen är informationen om det specifika innehållet, till exempel titel, författarnamn, datum/tid med mera. Denna postinformation kallas metadata.

Förutom standard metadata för post, WordPress tillåter dig också att spara anpassade metadata genom att använda anpassade fält.

För att lära dig mer, se vår guide för nybörjare till WordPress custom fields med exempel, tips och tricks som du kan använda på din website.

WordPress utvecklare använder anpassade fält för att lagra custom post metadata för dina posts. Till exempel använder pluginet All in One SEO customize-fält för att lagra sökmotorsoptimering för dina posts.

AIOSEO custom fields

Utvecklare av plugins skapar dock vanligtvis anpassade meta boxes istället för att använda standard custom fields box. Detta gör det lättare för användare att mata in information.

Om du vill skapa en custom meta box för att enkelt mata in anpassade metadata, se vår guide om hur du lägger till custom meta boxes i WordPress.

Felsökning av Custom Fields i WordPress

Nyligen stötte en av våra läsare på ett problem där alternativet Custom Fields saknades i block editor-alternativen. Efter en del undersökningar hittade vi orsaken till issue.

Om din WordPress-webbplats inte har alternativet Anpassade fält under menyn ”Inställningar” måste du kontrollera om du har plugin-programmet Advanced Custom Fields (ACF) installerat och aktiverat .

ACF är ett populärt plugin för WordPress som utvecklare använder för att skapa customize meta boxes.

ACF version 5.5.13 add to en inställning för att remove standardinställningen WordPress custom field meta box. Detta påskyndar laddningstiderna på sidan för edit av post. Tanken är att du inte ska behöva standard Meta box eftersom du använder ACF.

Men om du vill aktivera standard WordPress custom field meta-boxen, måste du add to följande kod till ditt WordPress-tema med hjälp av functions.php-filen eller WPCode:

add_filter('acf/settings/remove_wp_meta_box', '__return_false');

För mer details, vänligen se vår guide om hur du enkelt kan lägga till custom code i WordPress.

Vi hoppas att den här artikeln hjälpte dig att hitta det saknade alternativet för anpassade fält på din WordPress-webbplats. Du kanske också vill se vår guide om att åtgärda vanliga WordPress-fel eller lära dig hur du ställer in felloggar i WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Avslöjande: Vårt innehåll stöds av våra läsare. Det innebär att om du klickar på några av våra länkar, kan vi tjäna en provision. Se hur WPBeginner finansieras, varför det är viktigt, och hur du kan stödja oss. Här är vår editoriala process.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Den ultimata WordPress-verktygslådan

Få GRATIS tillgång till vår verktygslåda - en samling WordPress-relaterade produkter och resurser som varje professionell användare bör ha!

Reader Interactions

46 kommentarerLämna ett svar

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Ralph says

    If this is in additional section is it really worth it to put information there? Does this benefit SEO in any important way? Or is it more for us? I don’t really understand the benefit here.

    • WPBeginner Support says

      It would depend on what custom fields weren’t showing for you. Sometimes the section for a plugin would disappear and following this guide would have the section reappear for you.

      Administratör

  3. Keith Stanfield says

    Custom fields are not showing under product data with this plugin, I added the function code and enable the custom fields checkbox but nothing shows up.

    • WPBeginner Support says

      If you are using the block editor, we would recommend checking under preferences to ensure the custom fields are not hidden based on those settings. :)

      Administratör

  4. Dalia Sued says

    Custom fields disappear from WordPress 6.1, since the new WordPress update, all plugins that have custom fields have disappeared from all posts type, including posts and pages.

    • WPBeginner Support says

      Custom fields are still available, you may have them disabled in your editor. If you go to the top-right and click the three dots, then go to preferences you should find the option to enable custom fields.

      Administratör

  5. will says

    i have ACFs that dont display on my home page. i know the ACF pro plug in needs to be updated. Would this result in why my fields aren’t displaying on my homepage?

    • WPBeginner Support says

      That could be part of the issue. If you reach out to the plugin’s support they should be able to assist.

      Administratör

  6. Cedric Shaw says

    So we have ACF running and have the ”fix” in our functions.php file. The issue we are having is that the drop down field is only showing 148 entries and not displaying all of the custom fields. Is there something that is preventing them from not displaying all of the custom fields?

    • WPBeginner Support says

      For that, you would want to reach out to ACF’s support to see possible reasons for this issue.

      Administratör

  7. Poul says

    I spend a couple hours to solve this problem (find out why i don’t see that option in ”Screen Options” menu).

    Thanks! :)

  8. Luke says

    Hello,

    Thanks for your tip.
    I’ve installed ACF, however still don’t see custom field checkbox.
    When I tried to paste the code I got following error message: syntax error, unexpected ’add_filter’ (T_STRING)
    Could you please advise?

    Many Thanks!

  9. SK says

    Hi. I have re-instated the custom fields. I can add new, but original fields are not showing in the back end (still displayed on website) so I cannot edit my content. Any ideas? Thanks

  10. Serge says

    Super. We were looking for the setting that was hiding the custom fields. We knew it was a setting but could find where. Thanks also for the bit of code, could come handy eventually.
    merci,
    Serge.

  11. Dave Combs says

    Sadly, the add_filter code for the functions.php file did not work, so I’m off to find to try to solve the problem.

    • WPBeginner Support says

      Thank you for letting us know, we’ll certainly keep an eye out for other solutions to recommend.

      Administratör

  12. David says

    I lost a day of work trying to figure out why my custom metabox wasn’t showing. Then I checked the source code and it was there with the ’hide’ class suffix. Thanks a lot ACF :(

    Thank you for the fix :)

  13. Robbie says

    Just wanted to say thanks for the add_filter() trick in the troubleshooting section. A new client needed me to fix something on a site I’d never seen and this was what I finally needed.

  14. Julia Moss says

    Thank you so much – this problem has been driving me mad! Your code for the functions file worked.

Lämna ett svar

Tack för att du väljer att lämna en kommentar. Tänk på att alla kommentarer modereras enligt våra policy för kommentarer, och din e-postadress kommer INTE att publiceras. Vänligen använd INTE nyckelord i namnfältet. Låt oss ha en personlig och meningsfull konversation.