This refers to the default article type template (single.php,category.php)Application Scenarios:Default article default has 2 categories (news, game information)all sub-categories under news call " News list template , news content Template "all sub-categories under game profile call " game Data list template , game profile content Template "Article List page category.phpJudge in category.php.If the subcate
Help: WordPress In an article at the same time belong to two categories, you can make this article in different categories to call different templates?
If the article belongs to both category A and category B, there is a list of articles in the foreground category A and category B two pages, can be implemented from the Category A list click on the article to call
1. First introduces WordPress's two powerful plug-ins:
(1) Count per day is a very powerful number of visitors statistics plug-ins, can be counted daily, yesterday, weekly, monthly and so on the number of visitors (based on IP statistics), statistics online visitors, browsers, search terms, and so on, with a variety of call simple code, template tags and gadgets, Facilitate your own invocation and integration.(2) STATPRESSCN, real-time display blog a
1, directly disable the file type detection, in the wp-config.php file, add such a sentence code define (' Allow_unfiltered_uploads ', true);2, inside the functions.php, add the following code (the most important is the yellow background that 2 sentences)://Add a role that allows regional edits to be addedAdd_role ('Dq_edit','Area Editor', Array ('Level_3'=true, 'Read'=true, 'edit_posts'=true, 'edit_published_posts'=true, 'edit_others_posts'=true, 'publish_post
Whether we are adding tag to the site settings, or a blog that calls the tag aggregation related content in the side position becomes a collection. But in the user experience, depending on the template, the tags we display in the sidebar are sometimes not very good-looking. such as the size of the font, such as the number of calls more.In the template file we are really difficult to modify this kind of parameters, we need to use the WordPress program
Comments_templatethe Comments_template function is a function that invokes the comment template, which is simple to use, and is an include file class function, like Get_header (), for today's use.
DescribeAs already mentioned, it is a function that invokes the comment template.
Use
which
$file filename Default value to call:/comments.php$separate _comments whether to separate comments of type without comment Boolean default value: Fa
Register_nav_menus () (Register menu)Register_nav_menus () function is used to register a menu, the menu refers to the WordPress 3.0+ menu manager, after registering the user can be in the menu manager drag generated navigation menu.
Usage
Register_nav_menus ($locations);
Parameters
$locations
(array) (must) to register the menu, the key value is the menu ID, the key name is the menu name, you can create multiple.
Default value: None
In the corporate web site, it is a common requirement to click on the root category to display subcategories under the current root category. Most CMS can also achieve this function. If you use the WordPress architecture, can you?The answer is yes, WordPress can also achieve such a function.In fact, the main use of the Wp_list_categorys () function, the function of the child_of parameter is a number, showin
WordPress built-in function get_posts () is used to invoke the specified one or more articles, the function provides several parameters, you can set the invocation of the article of the specified classification, custom fields, article type, article status, display order and other conditions, the article is returned as an array, the output can be through the loop statement.Code structure:
1
Returns the variable of the a
This post was last edited by Zhenbiny on 2013-09-29 17:08:44
I installed PHP directly under Linux using the Yum install PHP method.Write the following code:Connid = Ftp_connect ("192.168.123.30"); successful execution.But WordPress under the tracking code, the same execution to Ftp_connect ("192.168.123.30") will failIf the code should not be the case,If you run WordPress directly using the integrated devel
A 360 intelligent summary is added to your website for easy indexing. one line is included. you need to call the abstract in the head tab of the article page. you can use either the get_the_excerpt or get_the_content functions. I don't know how to deal with it? {Code ...} A 360 intelligent summary is added to your website for easy indexing. one line is included. you need to call the abstract in the head tab
The following code is inserted into the function.php to enable the login user to view the article content, insert [members_only] [/menmbers_only] where each article needs to be viewed by the user.
But I use foogallery in the article after the short code, Foogallery can not display normally, ask how to solve?[Members_only][Foogallery id= "141"] article published here still shows [Foogallery id= "141"], did not call the short code.[/menmbers_only]
add_
It is best to call a system function, not a database, instead of a system function.
Reply content:
It is best to call system functions instead of databases.
I do not know this function. You need to write it yourself.You can
Wp-shortdes/comment. php
Add a funciton
Function get_first_approved_comment ($ post_id) {global $ wpdb; return $ wpdb-> get_results ($ wpdb-> prepare ("SELECT * FROM $ wpdb->
user registration information into the WordPress database and use the login link to display the information of the registration completed.
Then, put all the functions we created earlier into the global functioncustom_registration_function()之中
functionCustom_registration_function () {if(isset($_post[' Submit ']) {registration_validation ($_post[' username '], $_post[' Password '], $_post[' Email '], $_post[' website '], $_post[' fname '], $_post[' lna
/wp-content/themes/directory, and then into the management interface, in presentation (if you install the Chinese version, is "performance" Option to upload a good theme.
C, modify the theme: To modify the theme of the theme folder and the contents of the file should be changed to "777", in the FTP right click, using the chmod option to modify. Then in presentation (if you install the Chinese version, the "Performance" item) in the theme Editor (subject Edit) item can be directly modified.
5, i
Optimize the time display of articles and comments in WordPress, WordPress comment
Many blogs like to use comments published in "XXX minutes ago", the article published in "XXX minutes ago" to display the time of the article comments, improve the time display method not only can be very intuitive to tell readers this article or comment published how long it has been, but also to enhance the time sense of c
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.