$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>wordpress hooks|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

wordpress hooks

matteradmin10PV0评论

I am currently using a woocommerce theme, Hotel (/).

I just recently created a home page and a blog page the way way it is explained in this site: /

Now what I want to do is: Create a home page with some fixed element that never change (i.e.: photos) and then add some dynamic elements (like post, from my blog page)… Assuming I have a blog, I would like to include the latest post at the end of the home page…

I enquired this with Woocommerce, and they said: “This is possible yes, but it requires some custom coding to adjust the home page.This can be done using hooks, are you familiar with using hooks? If not, I’d recommend having a look at that document: /

Also, I’d recommend having a look at the functions.php file that contains all hook for the Hotel theme: wp-content/themes/hotel/inc/class-hotel-template.php”

Now.. I started reading this but at some point got lost…

I also realised that there is a place in my dashboard where I can create some hook and installed them in my theme…

Would anyone have a hook that can help me to customise the home page the way I want?

anyone can assist with this?

I am currently using a woocommerce theme, Hotel (https://woocommerce/products/hotel/).

I just recently created a home page and a blog page the way way it is explained in this site: https://www.wpbeginner/wp-tutorials/how-to-create-a-separate-page-for-blog-posts-in-wordpress/

Now what I want to do is: Create a home page with some fixed element that never change (i.e.: photos) and then add some dynamic elements (like post, from my blog page)… Assuming I have a blog, I would like to include the latest post at the end of the home page…

I enquired this with Woocommerce, and they said: “This is possible yes, but it requires some custom coding to adjust the home page.This can be done using hooks, are you familiar with using hooks? If not, I’d recommend having a look at that document: https://docs.woocommerce/document/introduction-to-hooks-actions-and-filters/

Also, I’d recommend having a look at the functions.php file that contains all hook for the Hotel theme: wp-content/themes/hotel/inc/class-hotel-template.php”

Now.. I started reading this but at some point got lost…

I also realised that there is a place in my dashboard where I can create some hook and installed them in my theme…

Would anyone have a hook that can help me to customise the home page the way I want?

anyone can assist with this?

Share Improve this question asked Mar 10, 2019 at 10:51 Edgar MedinaEdgar Medina 1
Add a comment  | 

1 Answer 1

Reset to default 0

I think I know what you are asking. The theme you are using is a fixed layout for each page and want to modify this layout for the home page.

If this is true, most likely your theme is using templates and does not allow additional features, via plugins, to be used.

Assuming the above, you would need to find the theme's template, a php file used to layout the look and function, for the particular page. It is usually stored under the theme folder. If you know PHP, then this should be no problem to modify with the features you desire. It will be a lot of work, but do-able.

In your case, that template is: wp-content/themes/hotel/inc/class-hotel-template.php

A secondary option, and you may shutter to think of it, is don't use that theme. Copy the look and feel, but by using a theme with a builder (such as themify) you can add any features you want, including the look. What they are showing is not remarkable.

https://themify.me/themes (note, I do not work for the company, I just use them for a ton of websites)

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far