How to create a simple wordpress theme options page

Using The Divi Theme OptionsDivi comes with theme options that are used to lớn phối up various parts of your site.

Bạn đang xem: How to create a simple wordpress theme options page


Divi comes fully loaded with its own custom theme options. This is where you can control things lượt thích your hình ảnh sản phẩm, navigation settings, & so much more. These options can be accessed in the WordPress Dashboard menu under Divi > Theme Options.

*

General Settings

*

Logo

This is where you can upload your own hình ảnh tệp tin khổng lồ appear in the header of every page of your website.

Fixed Navigation Bar

The fixed navigation bar refers lớn the navigation bar as it becomes fixed at the top of your screen when scrolling down the page. The thực đơn bar will also shrink slightly upon scrolling khổng lồ provide more readable screen space. By mặc định the navigation bar is enabled.

Enable Divi Gallery

The WordPress truyền thông uploader contains a Create Gallery feature which allows you to lớn add simple image galleries to lớn your pages or posts. Enable this option if you want lớn replace the mặc định WordPress gallery style with the Divi gallery style.

Color Pickers Default Palette

This is where you can change the mặc định color palette for all color pickers within the Divi Builder và Visual Builder. You can phối all the colors needed for customizing your theme here so that these same colors will be available throughout the building process.

Grab the first post image

By mặc định thumbnail images are created using custom fields. However, if you would rather use the images that are already in your post for your thumbnail (and bypass using custom fields) you can activate this option. Once activated, thumbnail images will be generated automatically using the first image in your post. The image must be hosted on your own server.

Blog Style Mode

By mặc định the theme truncates your posts on index/homepages automatically lớn create post preview. If you would rather show your posts in full on index pages lượt thích a traditional blog then you can activate this feature.

Shop Page & Category Page Layout for WooCommerce

If you will be using WooCommerce integration, you can define which layout you want your shop to use on sản phẩm and product category pages.

Google API Key

The Maps module uses the Google Maps API & requires a valid Google API Key khổng lồ function. Before using the maps module, please make sure you have sầu added your API key here. Learn more about how to create your Google API Key here.

Enqueue Google Maps Script

Disable this option to remove the Google Maps API script from your Divi Builder Pages. This may improve compatibility with third buổi tiệc ngọt plugins that also enqueue this script.

Please Note: Modules that rely on the Google Maps API in order to function properly, such as the Maps và Fullwidth Maps Modules, will still be available but will not function while this option is disabled (unless you manually add Google Maps API script).

Social Media Icons

Divi places your social truyền thông links inside of your footer. Here you can control which social media icons you wish to lớn display & where you would lượt thích them lớn link to lớn.

Number of Products displayed on WooCommerce archive pages

Here you can designate how many WooCommerce products are displayed on the archive page. This option works independently from the Settings > Reading options in wp-admin.

Numbers of posts per page

Define how many posts you would lượt thích to lớn be displayed when a user visits a Category Page, an Archive sầu Page, Search Results Page, or Tag Page.

Date Format

This option allows you khổng lồ change how your dates are displayed. For more information please refer khổng lồ the WordPress codex here: http://codex.wordpress.org/Formatting_Date_and_Time

Use excerpts when defined

This will enable the use of excerpts in posts or pages.

Responsive shortcodes

This option enables shortcodes to respond khổng lồ various screen sizes

Google Fonts subsets

This will enable Google Fonts for Non-English languages.

Bachồng To Top Button

This gives you the option khổng lồ display a Bachồng To Top Button (at the bottom right of your page) while scrolling.

Smooth Scrolling

This will enable the smooth scrolling with mouse wheel. Smooth Scrolling is also especially useful when using anchor links to liên kết to specific areas of the page.

Custom CSS

This is where you can enter any custom css to lớn customize your site. For extensive sầu CSS modifications we recommend that you always use a child theme.

Navigation > Pages

*

Exclude pages from the Navigation Bar

All of your existing pages will appear in this window. Every new page will appear in your navigation by default. You can unkiểm tra any page here if you wish khổng lồ not display a specific page or pages.

Show Dropdown Menus

If you would like to remove sầu the dropdown menus from the page’s navigation bar, disable this feature.

Display Home Link

By mặc định the theme creates a trang chủ links that, when clicked, leads bachồng to lớn your blog’s homepage. If, however, you are using a static homepage & have already created a page called Home lớn use, this will result in a duplicate liên kết. In this case you should disable this feature khổng lồ remove the liên kết.

Sort Pages Links

Choose how page link should be sorted here.

Order Page Links by Ascending/Descending

Further, specify in which order your sorted page links should appear.

Number of dropdown tiers shown

This options allows you to control how many tiers your page’s dropdown thực đơn has. Increasing the number allows for additional thực đơn items to lớn be shown.

Navigation > Categories

*

Exclude Categories from the Navigation Bar

All of your existing categories will appear in this window. Every new category will appear in your navigation by default. You can uncheck any category page here if you wish lớn not display a specific category or categories.

Show Dropdown Menus

If you would lượt thích lớn remove the dropdown menus from the categories navigation bar disable this feature.

Hide Empty Categories

If a category has been made but is not being used by any posts, you can choose whether or not khổng lồ display it in your navigation. By default empty categories are hidden.

Number of Dropdown Tiers Shown

This options allows you to control how many tiers your page’s dropdown menu has. Increasing the number allows for additional menu items lớn be shown.

Sort Category Links

Choose how category liên kết should be sorted here.

Order Category Links by Ascending/Descending

Further specify in which order your sorted category link should appear.

Navigation > General

*

Disable top tier dropdown menu links

In some cases users will want to lớn create parent categories or liên kết as placeholders to lớn hold a list of child links or categories. In this case it is not desirable khổng lồ have the parent link lead anywhere, but instead merely serve an organizational function. Enabling this options will remove the link from all parent pages/categories so that they don’t lead anywhere when clicked.

Alternative scroll-to-anchor method

Sometimes when using the CSS ID of a section lớn link directly lớn it from another page, the page’s final scroll position can be inaccurate. Enable this option to use an alternative sầu method for scrolling khổng lồ anchors which can be more accurate than the default method in some cases.

Layout Settings

Single Post Layout

*

Choose Which Items to lớn display in the post info section

Here you can choose which items appear in the post info section on single post pages. This is the area, usually below the post title, which displays basic information about your post. The highlighted items shown below will appear.

Show Comments on posts

You can disable this option if you want to lớn remove sầu the comments and bình luận khung from single post pages.

Place Thumbs on Posts

By mặc định thumbnails are placed at the beginning of your post on single post pages. If you would lượt thích khổng lồ remove sầu this initial thumbnail image to avoid repetition simply disable this option.

Single Page Layout

*

Place Thumbs on Pages

By mặc định thumbnails are not placed on pages (they are only used on posts). However, if you want khổng lồ use thumbnails on posts you can! Just enable this option.

Xem thêm: Hát Karaoke Trên Máy Tính Chất Lượng, Những Phần Mềm Hát Karaoke Trên Laptop

Show Comments on Pages

By mặc định comments are not placed on pages, however, if you would lượt thích to lớn allow people to comment on your pages simply enable this option.

Layout General Settings

*

Post Info Section

Here you can choose which items appear in the postinfo section on pages. This is the area, usually below the post title, which displays basic information about your post. The highlighted items shown below will appear.

Show Thumbs on Index pages

Enable this option khổng lồ show thumbnails on Index Pages.

Ad Management

*

Enable Single Post 468×60 banner

Enabling this option will display a 468×60 banner ad on the bottom of your post pages below the single post nội dung. If enabled you must fill in the banner image và destination url below.

Input 468×60 advertisement banner image

Here you can provide 468×60 banner image url.

Input 468×60 advertisement destination url

Here you can provide 468×60 banner destination url.

Input 468×60 adsense code

Place your adsense code here.

SEO > Index Page SEO

*

Enable canonical URL’s

Canonicalization helps to prevent the indexing of duplicate nội dung by tìm kiếm engines, và as a result, may help avoid duplicate content penalties & pagerank degradation. Some pages may have sầu different URL’s all leading to lớn the same place. For example tên miền.com, domain.com/index.html, and www.tên miền.com are all different URLs leading to your homepage. From a tìm kiếm engine’s perspective sầu these duplicate URLs, which also occur often due to custom permalinks, may be treaded individually instead of as a single destination. Defining a nội dung nguồn gốc tells the tìm kiếm engine which URL you would like to use officially. The theme bases its canonical URLs off your permaliên kết and the domain name name defined in the settings tab of wp-admin.

Enable meta descriptions

Cheông chồng this box if you want to lớn display meta descriptions on category/archive pages. The description is based off the category description you choose when creating/editing your category in wp-admin.

Choose title autogeneration method

Here you can choose how your titles on index pages are generated. You can change which order your blog name and index title are displayed, or you can remove the blog name from the title completely.

Define a character to separate BlogName và Post title

Here you can change which character separates your blog title and index page name when using autogenerated post titles. Comtháng values are | or –

SEO > Single Post Page SEO

*

Enable custom titles

By default the theme creates post titles based on the title of your post & your blog name. If you would like to lớn make your meta title different than your actual post title you can define a custom title for each post using custom fields. This option must be enabled for custom titles lớn work, & you must choose a custom field name for your title below.

Enable custom description

If you would lượt thích khổng lồ add a meta mô tả tìm kiếm to your post you can vị so using custom fields. This option must be enabled for descriptions lớn be displayed on post pages. You can add your meta mô tả tìm kiếm using custom fields based off the custom field name you define below.

Enable custom keywords

If you would lượt thích lớn add meta từ khoá lớn your post you can vị so using custom fields. This option must be enabled for keyword lớn be displayed on post pages. You can add your meta keywords using custom fields based off the custom field name you define below.

Enable canonical URL’s

Canonicalization helps to lớn prsự kiện the indexing of duplicate content by search engines, và as a result, may help avoid duplicate nội dung penalties & pagerank degradation. Some pages may have different URL’s all leading khổng lồ the same place. For example domain name.com, tên miền.com/index.html, và www.domain.com are all different URLs leading to your homepage. From a search engine’s perspective sầu these duplicate URLs, which also occur often due to lớn custom permalink, may be treated individually instead of as a single destination. Defining a canonical URL tells the search engine which URL you would lượt thích to lớn use officially. The theme bases its canonical URLs off your permalink and the domain name name defined in the settings tab of wp-admin.

Custom field Name to lớn be used for title

When you define your title using custom fields you should use this value for the custom field Name. The Value of your custom field should be the custom title you would like khổng lồ use.

Custom field Name khổng lồ be used for description

When you define your meta description using custom fields you should use this value for the custom field Name. The Value of your custom field should be the custom description you would like to use.

Custom field Name khổng lồ be used for keywords

When you define your keywords using custom fields you should use this value for the custom field Name. The Value of your custom field should be the meta keyword you would like lớn use, separated by commas.

If custom titles are disabled, choose autogeneration method

If you are not using custom post titles you can still have sầu control over how your titles are generated. Here you can choose which order you would lượt thích your post title & blog name khổng lồ be displayed, or you can remove the blog name from the title completely.

Define a character lớn separate BlogName and Post title

Here you can change which character separates your blog title và post name when using autogenerated post titles. Comtháng values are | or –

SEO > Homepage SEO

*

Enable custom title

By default the theme uses a combination of your blog name & your blog description, as defined when you created your blog, khổng lồ create your homepage titles. However if you want to create a custom title then simply enable this option and fill in the custom title field below.

Enable meta description

By mặc định the theme uses your blog mô tả tìm kiếm, as defined when you created your blog, to fill in the meta description field. If you would lượt thích to use a different description then enable this option và fill in the custom description field below.

Enable meta keywords

By mặc định the theme does not add từ khóa khổng lồ your header. Most search engines don’t use từ khoá lớn rank your site anymore, but some people define them anyway just in case. If you want to add meta từ khóa khổng lồ your header then enable this option và fill in the custom keyword field below.

Enable canonical URL’s

Canonicalization helps to lớn prevent the indexing of duplicate nội dung by tìm kiếm engines, & as a result, may help avoid duplicate content penalties và pagerank degradation. Some pages may have different URLs all leading khổng lồ the same place. For example domain.com, domain.com/index.html, and www.tên miền.com are all different URLs leading to your homepage. From a tìm kiếm engine’s perspective sầu these duplicate URLs, which also occur often due khổng lồ custom permalinks, may be treated individually instead of as a single destination. Defining a canonical URL tells the tìm kiếm engine which URL you would lượt thích to lớn use officially. The theme bases its canonical URLs off your permalinks & the tên miền name defined in the settings tab of wp-admin.

Homepage custom title (if enabled)

If you have sầu enabled custom titles you can add your custom title here. Whatever you type here will be placed between the tags in header.php.

Homepage meta mô tả tìm kiếm (if enabled)

If you have enabled meta descriptions you can add your custom description here.

Homepage meta từ khóa (if enabled)

If you have sầu enabled meta từ khóa you can add your custom keywords here. Keywords should be separated by commas. For example: wordpress,themes,templates,elegant.

If custom titles are disabled, choose autogeneration method

If you are not using custom post titles you can still have control over how your titles are generated. Here you can choose which order you would lượt thích your post title & blog name khổng lồ be displayed, or you can remove the blog name from the title completely.

Define a character to separate BlogName và Post title

Here you can change which character separates your blog title & post name when using autogenerated post titles. Common values are | or –

Integration

*

The integrate tab is great for adding third buổi tiệc ngọt code lớn certain areas of the theme. Code can be added to lớn your websites head & body toàn thân, as well as before và after each post. For example, if you need lớn add a tracking code to lớn your website (such as google analytics), but are unsure which PHP tệp tin khổng lồ edit in order lớn add the code to lớn the of your trang web, you can simply đầu vào this code inlớn the “body” field of the Integration tab.

For more information on getting the most out of the Integration Tab, see our blog post onWays To Use The Integration Tab In Our ePanel Theme Options.

Enable header code

Disabling this option will remove the header code below from your blog. This allows you to lớn remove the code while saving it for later use.

Enable body toàn thân code

Disabling this option will remove the toàn thân code below from your blog. This allows you lớn remove sầu the code while saving it for later use.

Enable single top code

Disabling this option will remove sầu the single top code below from your blog. This allows you to lớn remove the code while saving it for later use.

Enable single bottom code

Disabling this option will remove the single bottom code below from your blog. This allows you to lớn remove the code while saving it for later use.

Add code to the of your blog

Any code you place here will appear in the head section of every page of your blog. This is useful when you need lớn add javascript or css lớn all pages.

Add code to lớn the (good for tracking codes such as google analytics)

Any code you place here will appear in body toàn thân section of all pages of your blog. This is useful if you need to lớn input a tracking px for a state counter such as Google Analytics.

Add code to lớn the top of your posts

Any code you place here will be placed at the top of all single posts. This is useful if you are looking to lớn integrating things such as social bookmarking link.

Add code to lớn the bottom of your posts, before the comments

Any code you place here will be placed at the top of all single posts. This is useful if you are looking to lớn integrating things such as social bookmarking link.

Updates

*

Before you can receive sầu sản phẩm updates, you must first authenticate your Elegant Themes subscription. To vày this, you need khổng lồ enter both your Elegant Themes Username and your Elegant Themes API Key. Your username is the same username you use when logging in khổng lồ ElegnatThemes.com

Import / Export

*

You can easily export or import your Divi Theme Settings by clicking the “Import / Export” inhỏ khổng lồ open the portability options. To export a tệp tin, select the Export tab, enter your export file name, and clichồng the “Export Theme Options” button. A .json tệp tin will be saved to your computer to lớn be saved as a backup, used for new client builds, or shared with your peers. To import a Theme Options file, simply select the Import tab, choose your .json tệp tin, và cliông chồng the “Import Divi Theme Options” button. There is also a convenient option lớn backup your current Theme Options before importing.

Xem thêm: Cách Theo Dõi Zalo Người Khác Bằng Điện Thoại, Xem Trộm Tin Nhắn Zalo

Restore Defaults

*

Simply click the “Restore lớn Defaults” inhỏ to lớn restore the default settings for the Divi Theme Options.


Chuyên mục: Theme wordpress