dongzhao3040 2015-07-07 15:32
浏览 22
已采纳

在wordpress中修改主题时,当我想删除主题内容时,最好删除CSS或PHP或BOTH

I am doing my website, with studiopress genesis framework and their theme child, now i want to remove some unneccesary header content. So I know which code to remove from CSS and which from PHP, is it enought if I only remove CSS and leave PHP, and vice versa, or do I need to remove them both?

Thank you on help!

  • 写回答

2条回答 默认 最新

  • douxiangui5011 2015-07-07 16:13
    关注

    Because your goal is to REMOVE the content, you have to remove the PHP code with its HTML counterpart. In fact, it's irrelevant whether you remove the CSS or not. You might use that styling for something else.

    Anders' solution will work well if your goal is to HIDE the content instead of removing it and as he said, you can later on put it back if you like.

    If you are absolutely sure that you won't need to use that ever again (heck, you can just copy it back from the original theme) and that you also won't need to use the styling, then go ahead and remove both the CSS and the PHP/HTML to keep everything clean. I would personally do that since I like my code to be looking good :)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler