Title: function to replace content in a div
Last modified: July 18, 2020

---

# function to replace content in a div

 *  [travelavenger](https://wordpress.org/support/users/travelavenger/)
 * (@travelavenger)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/function-to-replace-content-in-a-div/)
 * Hi all,
 * Is there a php function which I could include in the functions.php file and replace
   the contents of a div with a class?
 * Thanks you!

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [5 years, 10 months ago](https://wordpress.org/support/topic/function-to-replace-content-in-a-div/#post-13139485)
 * A class is not content, so what are you really trying to accomplish?
 *  Thread Starter [travelavenger](https://wordpress.org/support/users/travelavenger/)
 * (@travelavenger)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/function-to-replace-content-in-a-div/#post-13141433)
 * I would like to replace a div’s content with a function at the functions.php 
   file and the div has a class name lets say .divclass
 * Is it possible to do so?
 * Thank you!
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [5 years, 10 months ago](https://wordpress.org/support/topic/function-to-replace-content-in-a-div/#post-13141936)
 * How is that div created? You can’t change the content via CSS.
 *  Thread Starter [travelavenger](https://wordpress.org/support/users/travelavenger/)
 * (@travelavenger)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/function-to-replace-content-in-a-div/#post-13143795)
 * The div is the footer I would like to remove the credit without removing the 
   copyright statement etc. Therefore I need to replace the entire content. there
   are app remove footer credit but it does not work, and now I am seeking for solution
   to use PHP function to get the job done. Any idea?
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [5 years, 10 months ago](https://wordpress.org/support/topic/function-to-replace-content-in-a-div/#post-13145480)
 * The proper way, if your theme does not have an option to do so internally, is
   to create a [child theme](https://developer.wordpress.org/themes/advanced-topics/child-themes/)
   and replace/modify the PHP file(s) that output the statement.
 * What theme are you using?
 *  Thread Starter [travelavenger](https://wordpress.org/support/users/travelavenger/)
 * (@travelavenger)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/function-to-replace-content-in-a-div/#post-13158547)
 * I am using [https://wordpress.org/themes/calliope/](https://wordpress.org/themes/calliope/)
 * it is already a child theme of Colibri WP.
 * I would like to remove the footer credit but remain the copyright statement.
 * Any idea?
 * Thank you!
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [5 years, 10 months ago](https://wordpress.org/support/topic/function-to-replace-content-in-a-div/#post-13160356)
 * I recommend asking at [https://wordpress.org/support/theme/calliope#new-post](https://wordpress.org/support/theme/calliope#new-post)
   so the theme’s developers and support community can help you with this.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘function to replace content in a div’ is closed to new replies.

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/function-to-replace-content-in-a-div/#post-13160356)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
