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

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

Including Angle Brackets In Pre Sections

If you’re just trying to display them in a page or a post, you could try using their character entities. In the Text view in the editor, type &lt; instead of < and &gt; instead of >. So, for instance, in your editor’s Text view (not the Visual mode), you’d type: <pre> private HashMap&lt;String, HashMap&lt;String, … Read more

How do i structure my theme folder to avoid one huge list of files

Not a full answer, but I can at least answer this question: Also custom post template files can not be in sub directories. Everything, that you can load via get_template_part(), can reside in a subfolder: get_template_part( ‘subdir/part’, ‘suffix’ ); It’s as easy as that. Now you’ve your part inside ~/wp-content/themes/theme_folder/subdir/part-suffix.php Slightly off topic. Then there’re … Read more