Provide zblog template_zblog them_wordpress template download and customization

Zblog gets the title/link/ID and other attributes of the current page

Tianxing Studio 2023-02-02 20:08 Zblogphp Tutorial eight hundred and seventy-three 0 Comments


Today, I'm struggling Zblog topic With TDK function, you don't want to Template Write tags in the file to make a function call more convenient. After some problems are solved, they are shared, hoping to help those with the same needs zblog Users.

zblogphp One global variable is "$zbp". In the function, "global $zbp;" can be used to obtain some attributes of the current page.

The tag to get the link address of the current page is: $zbp ->currenturl;

Get the current page title: $zbp ->template ->GetTags ('title');

To obtain the current page ID, you need to use type to determine the page type.

For the category page, use "$zbp ->template ->GetTags ('category ') ->ID" to obtain the ID of the current category. "$zbp ->template ->GetTags ('category')" also has other attribute values of the current category;

For the article page, use "$zbp ->template ->GetTags ('article ') ->ID" to obtain the ID of the current article. Similarly, "$zbp ->template ->GetTags ('article')" has other attribute values of the current article;

Other types of pages can be obtained with "$zbp ->template ->GetTags ($type)".

Other tags available on the current page can open the "zb_system function c_system_route.php" file to view details.


Can't find a tutorial that can solve your problem?

You can try to search or ask questions directly online. We also provide charging technical support. If you need it, you can contact us online.

Online questions Online Service

welcome you Comment: Cancel Reply

 Please fill in the verification code
  • Latest articles
  • Hot article ranking
  • Most Comments
Label aggregation
  • Sign in
  • Registered account Forgot your password?
  • register
  • Already have an account? Direct login Forgot your password?
  • Social account login