I want to edit footer copyright section. How to know where is the file if the footer.php file doesn't contain full coding?
My theme footer.php file contains such do_action. Please explain me.
do_action( 'linten_action_footer' ); ?>
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
Open your Linten WordPress theme in a text editor or IDE then open
hook is directory/folder. Then find this function
linten_footer_copyright and do whatever you want to do. Here's the file link from WP theme repo -
How I found the right file
Let me explain how I found your file.
You gave me this
do_action( 'linten_action_footer' ); and it's an important clue for me to figure the right file. From my 3 years experience, I know that WordPress recommend prefixing almost everything and prefix with theme-slug (in your case the slug is
linten). So, I googled with the theme name and found that theme on WordPress theme repository and then downloaded the theme on my computer. Then opened the theme on my code editor and searched for
'linten_action_footer'. From my experience, I also know that
do_action() executes an action hook and
add_action() registers an action hook. So, I've to find something like this
add_action( 'linten_action_footer' and I found that. That's it!
If you're interested to learn more about action hooks then following links might help you.
https://www.smashingmagazine.com/2016/01/get-started-with-hooks-wordpress/ https://wpshout.com/wordpress-hooks-actions-filters-work/ https://developer.wordpress.org/reference/functions/do_action/ https://developer.wordpress.org/reference/functions/add_action/
You can use this plugin https://wordpress.org/plugins/find-function/ that use the reflection api of php to give the file that use a function.
PS: it is my plugin (I will bump the versions to avoid the annoying banner)