最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Install functionality for push notifications but WP-Theme has oddly-named, hidden source files

programmeradmin1浏览0评论
Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 5 years ago.

Improve this question

So, first off, I'm certainly a beginner to this, so if this question is off-topic, I apologize. This question in a way does pertain to a 3rd party theme, but I haven't found anything online so far.

In order to gain access to these files, I've used an FTP client (in this case, Filezilla). I've included several images.

In my experience with other WP themes, all sources files are readily available through the WP dashboard and named in a way that corresponds with most internet and YouTube tutorials.

In this specific situation, I need to add <link rel="manifest" href="/manifest.json"/> to the <head> section of the site, but I cannot find any .html files, much less, an index.html file. Additionally, I'll need to add a JS snippet to capture click metrics and some .json files for Google Firebase integration, but I'm unable to find the most basic of files within the theme.

I'm not sure if there's a know conversion from HTML to PHP or if the HTML is hidden on purpose, etc.

Any help or insight would be greatly appreciated. Thanks in advance!

P.S. The theme being used seems to be fairly well-known and used, but it even overwrites basic WP functions like cron events as well.

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 5 years ago.

Improve this question

So, first off, I'm certainly a beginner to this, so if this question is off-topic, I apologize. This question in a way does pertain to a 3rd party theme, but I haven't found anything online so far.

In order to gain access to these files, I've used an FTP client (in this case, Filezilla). I've included several images.

In my experience with other WP themes, all sources files are readily available through the WP dashboard and named in a way that corresponds with most internet and YouTube tutorials.

In this specific situation, I need to add <link rel="manifest" href="/manifest.json"/> to the <head> section of the site, but I cannot find any .html files, much less, an index.html file. Additionally, I'll need to add a JS snippet to capture click metrics and some .json files for Google Firebase integration, but I'm unable to find the most basic of files within the theme.

I'm not sure if there's a know conversion from HTML to PHP or if the HTML is hidden on purpose, etc.

Any help or insight would be greatly appreciated. Thanks in advance!

P.S. The theme being used seems to be fairly well-known and used, but it even overwrites basic WP functions like cron events as well.

Share Improve this question asked Mar 24, 2020 at 19:18 andrew.bourgeois.96andrew.bourgeois.96 31 bronze badge 1
  • There are no .html files other than readme.html which is unrelated. The PHP is code that when ran, produces HTML – Tom J Nowell Commented Mar 24, 2020 at 19:56
Add a comment  | 

1 Answer 1

Reset to default 0

Nothing in your screenshots is unusual or hidden. Those are perfectly normal files for a WordPress site and WordPress theme. The HTML of your pages is generated by that code. The developer documentation for WordPress is available here, if you want to learn about how themes and plugins are made, but you'll want to have a basic knowledge of PHP first.

To add HTML to the <head> section of your site can be done in many ways, such as:

  • Edit your theme's header.php file, and place the code between the <head> tags. This is not the recommended solution, unless your theme is custom developed entirely by you. This is because any changes made to a theme's files will be lost of the theme is ever updated.
  • Create a child theme. Then copy your parent theme's header.php file to the child theme and edit that file to add the code between the <head> tags.
  • Use a plugin like Header and Footer Scripts or Tracking Script Manager. These plugins give you an area in the WordPress admin where you can add code like this to your site's <head>.
  • Add the following PHP code inside a custom plugin, or a Code Snippets plugin snippet:

add_action(
    'wp_head',
    function() {
        echo '<link rel="manifest" href="/manifest.json"/>';
    }
);
发布评论

评论列表(0)

  1. 暂无评论