douchun1859 2018-07-21 02:14
浏览 111
已采纳

访问Wordpress functions.php

So the title is pretty self-explanatory. I need to access functions.php in wordpress because Wordpress is adding random p and br tags and it's messing up my code. Searched for over an hour and nothing worked:

What I have tried:
1) Connecting via FTP (which isn't viable, long story)
2) Going to Appearance > Editor, which isn't showing. I have searched this issue up as well, and the only solution seems to be deactivating plugins, which I have tried.
3) deleting all my code, then pasting it all in
4) Ctrl + f5
5) deleting some of my code, then pasting it again

Websites I've looked at:
https://www.converticacommerce.com/support-maintenance/how-to-edit-functions-php-in-wordpress/
https://www.webnots.com/how-to-edit-functions-php-file-and-add-new-functions-in-wordpress/
https://www.nosegraze.com/edit-functions-php/

All these websites suggest the first two things in the What I have tried list.

If there is another way to stop the p tags, please tell me

  • 写回答

1条回答 默认 最新

  • dtyw10299 2018-07-21 06:04
    关注

    I understand that you are having issues in accessing your theme's functions.php and not with the code. Write a new plugin (code below) and upload to 'wp-content/plugins' directory and activate it. That's it!

    <?php
    /*
    Plugin Name: Implement wpautop
    Version: 1.0.0
    Description: Implement wpautop function.
    */
    
    remove_filter( 'the_content', 'wpautop' );
    remove_filter( 'the_excerpt', 'wpautop' );
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥20 为什么我写出来的绘图程序是这样的,有没有lao哥改一下
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥200 关于#c++#的问题,请各位专家解答!网站的邀请码
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号