Add footer.php to WordPress child theme

You have wrong argument for the filter. The first argument of the add_filter is the filter you are hooking up to. In your case it’s the mesmerize_get_footer_copyright. The second argument is the Call back function that would run the filter is called. So change your add_filter to this add_filter(‘mesmerize_get_footer_copyright’, ‘change_copyrightText’, 10,1) ;

write in functions.php

I’m not sure why you don’t just insert the code in the single.php, or use Denis’s solution, but if you want to hook into the_content you can do so by putting the following in your functions.php file: function append_the_content($content) { $content .= ‘PUT YOUR FUNCTION HERE’; return $content; } add_filter(‘the_content’, ‘append_the_content’); This will add directly … Read more

Problem with tag

You can display a shortcode by using two (or three) square brackets at the open and close, e.g. [[[pdf href=”http://www.constitution.org/usdeclar.pdf”]Declaration of Independence[/pdf]]] In my experience, a standalone shortcode just needs two whereas one that wraps needs three on each end, even though I’ve seen it said that it should work just two in either case.

WordPress is converting & to & inbetween [code] brackets

I tracked this solution down from the WordPress Trac ticket found here: http://core.trac.wordpress.org/ticket/6969 The solutions seems to be to add this to your functions.php file: <?php function foobar_run_shortcode( $content ) { global $shortcode_tags; // Backup current registered shortcodes and clear them all out $orig_shortcode_tags = $shortcode_tags; remove_all_shortcodes(); add_shortcode( ‘foobar’, ‘shortcode_foobar’ ); // Do the shortcode … Read more

How can I include PHP-Code to my post?

You can edit the single.php and/or content-single.php files in your theme. Then it depends what you mean by “some”. You could apply some conditions to your code (only certain categories, certain tags, certain specific post IDs only, etc.) You could also create a custom post type “myspecialposts” and create single-myspecialposts.php (codex)

Copyright info change in Theme Child PHP

You need to modify 2 functions not only 1 in your functions.php: /** * Function to display footer content. * * @since 1.1.24 * @access public */ //ADDED CHILD TO THE END OF THE NAME function hestia_the_footer_content_child() { /** * Array holding all registered footer widgets areas */ $hestia_footer_widgets_ids = array( ‘footer-one-widgets’, ‘footer-two-widgets’, ‘footer-three-widgets’ ); … Read more

Anchor Text code string is automatically modified by WordPress

Your problem is that you are using relative URLs– that is URLs, that include only part of the web address. What is taking on your URL is the browser, not WordPress. Browsers have long done this. Here is how it is supposed to work. If you provide an absolute URL nothing happens– for example, http://www.example.com. … Read more

API integration with WordPress

Something like this works: $url=”https://xxx”; $body = array( ‘auth_token’ => ‘xxxxxx’, ‘list_id’ => ‘xxxxx, ‘name’ => ‘Office’, ‘campaign_id’ => ‘xxxxx’, ); $response = wp_remote_post($url, array( ‘body’=>$body, ‘sslverify’ => false // this is needed if your server doesn’t have the latest CA certificate lists ) ); if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response … Read more

Has anyone tried putting PHP ActiveRecord on WordPress?

If you plan to use it just for your own code, and have it running alongside WordPress’ default database driver (wpdb), I see no real problems. It’s only if you plan on fully integrating/overriding WP’s driver that I see it being near-impossible; hard-coded SQL is prolific throughout core, and translating them to ActiveRecord method calls … Read more