最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Page titles for internal classification of landing pages

programmeradmin1浏览0评论

My wordpress install manages a business site, with landing pages. It's not a blog, and there are no posts (only pages).

The "pages" page (Pages > All Pages), which shows draft/published pages, shows each landing page's title. This is the value used in the <title> tag in the header, and is what the visitor sees.

But I want every landing page to have a title / type / classification / whatever that identifies it for me, rather than the visitor. For example:

"Shoes, Ladies, from Google Adwords, 20% Discount"

and

"Shoes, Kids, White, from Facebook Ads, 15% Discount, Branded"

That is what I want in the "pages" table. But then the visitor also sees them!

Can I do this somehow without manually editing each page's php source?

My wordpress install manages a business site, with landing pages. It's not a blog, and there are no posts (only pages).

The "pages" page (Pages > All Pages), which shows draft/published pages, shows each landing page's title. This is the value used in the <title> tag in the header, and is what the visitor sees.

But I want every landing page to have a title / type / classification / whatever that identifies it for me, rather than the visitor. For example:

"Shoes, Ladies, from Google Adwords, 20% Discount"

and

"Shoes, Kids, White, from Facebook Ads, 15% Discount, Branded"

That is what I want in the "pages" table. But then the visitor also sees them!

Can I do this somehow without manually editing each page's php source?

Share Improve this question edited Nov 19, 2019 at 17:12 lonix asked Nov 19, 2019 at 16:43 lonixlonix 3011 silver badge10 bronze badges 2
  • The internal titles should only appear on the back end, right? Where are you wanting to display them - in the post listing page (where you see all of your pages with links to edit or view them) and perhaps also in the editor? – WebElaine Commented Nov 19, 2019 at 16:54
  • @WebElaine Yeah I only want to see them on the backend - in the table on the Pages > All Pages page (where like you said I can edit, quick edit, bin, view, etc.) Not critical to see them on the editor page as well, though that would be nice if possible. – lonix Commented Nov 19, 2019 at 16:59
Add a comment  | 

1 Answer 1

Reset to default 1

The easiest way to do this without editing the page.php template in your theme is to add it as a custom field, then use a plugin (or code) to display that custom field in the control panel on your Pages list. The plugin I'd recommend is Admin Columns. It's free and highly-rated. Once that's installed, go through these steps:

First, edit any Page. Find the Custom Fields panel. If you can't find it, it might be hidden by default. To un-hide it, if you are using the Classic editor, go to the top-right where it says "Screen Options" and make sure the "Custom Fields" box is checked. If you are using the new Gutenberg / Block editor, go to the 3-dot menu at top right, scroll to the bottom and select Options, then check the box for Custom Fields. Click 'Enable and Reload'. Now the Custom Fields panel should appear below the page's content. (You'll only have to do that once.)

In the Custom Fields area that appears below the Page content, add a field with the Name admin_title (no spaces). In the Value area, put the name you'd like displayed in the control panel only. Save the Page.

Now go to Settings > Admin Columns and choose "Pages" from the dropdown if it's not already selected. All the current columns displayed on the Pages list page will appear here. You can delete the ones you don't need, drag-and-drop to rearrange. Click Add Column, then in the Type dropdown, choose "Custom Field". Change the Label to Admin Title (or whatever). In the Field dropdown, select your admin_title field. In the Field Type dropdown, choose Text. Set Inline Editing to Yes. Save.

Now back over to the Pages screen. You'll see your new field in one of the columns. Above the list of all Pages, there's a new small "Inline Edit" option. Turn that on, and little pencils will appear as options in the Admin Titles areas - this allows you to edit these custom fields directly from this page (if you want) instead of having to open each Page to add titles.

发布评论

评论列表(0)

  1. 暂无评论