1

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' ); ?>

closed as unclear what you're asking by Jacob Peattie, Nathan Johnson, EAMann Feb 15 '18 at 15:23

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • do you wanna edit the section of : created with wordpress ? – Gilberto Feb 14 '18 at 6:50
  • 1
    Open your theme in your favorite code editor and then find this text 'linten_action_footer' on the theme directory. Hopefully, you'll get what you wanted. – obiPlabon Feb 14 '18 at 7:10
2

Open your Linten WordPress theme in a text editor or IDE then open inc/hook/custom.php file, inc and 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 - https://themes.trac.wordpress.org/browser/linten/1.0.6/inc/hook/custom.php#L112

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/

  • Your answer helped me to find the right page to edit, but I still need to know how did you determine or understand the right file? In this case always should be hook folder or can be a different folder name? I'll make this comment as correct answer. Please tell me the fundamentals of calling such shortcode. Thanks – MOHSINWORLD Feb 14 '18 at 11:27
  • 1
    I've added in details info of how I found your file. Please check – obiPlabon Feb 14 '18 at 11:54
  • 2
    Note that changing theme code will cause problems if the theme ever gets updated. Better to make a Child Theme, then modify code in the Child Theme. – Rick Hellewell Feb 14 '18 at 23:18
1

Open your theme folder in any texteditor (Sublime text) and search for keyword linten_action_footer. You will find result pages containing the keyword. So from that you can choose the required

  • Thank for your comment, I know that technique, but want to know the core functionality of WordPress, the basic fundamentals of WP Themes development. Thanks – MOHSINWORLD Feb 14 '18 at 11:28
  • By searching as described above you will be able to find how footer page is completely structured. Regards :) – melvin Feb 14 '18 at 11:34
0

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)

  • Your plugin's idea is excellent for not developer WP user. But, unfortunately it's not worked for me! I used staying in wp dashboard, theme edits, even in the footer.php but the same result couldn't find the path. Did I miss anything? See screenshot: imgur.com/uPMtYtO – MOHSINWORLD Feb 14 '18 at 17:37
  • The api doesn't support to find a function with parameters :-/ I will add a warning about it – Mte90 Feb 16 '18 at 18:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.