Looking for a good way to include php code in posts, but using special include markup rather than direct php code
Have a look at the Shortcodes API http://codex.wordpress.org/Shortcode_API
Have a look at the Shortcodes API http://codex.wordpress.org/Shortcode_API
Filter the get_theme_mod() function (wp-includes/theme.php): add_filter( ‘theme_mod_header_image’, ‘localized_header’ ); function localized_header( $img ) { // Do something awesome with the $img path. return $img; }
This is very basic. Invest some time in a PHP tutorial. It’s fun! 🙂 Anyway … <?php $meta = get_post_meta( get_the_ID(), ‘rw_agentPhone’, TRUE ); // get_post_meta() returns an empty string if it doesn’t find anything. // We just test for this. If the string is not empty, we print it out. ” != $meta and … Read more
Those messages have nothing to do with your plugins or WordPress. Those are from you PHP.ini file trying to load extensions that are either not there or in the wrong directory. Usually caused when you upgrade version of PHP and don’t change the extension directory. If you have shell access run $ php -V to … Read more
You could use this filter which can be found in the default WordPress themes functions.php file (twentyten). This will limit the post to 300 characters, so theres no need to hide it. function twentyten_excerpt_length( $length ) { return 300; } add_filter( ‘excerpt_length’, ‘twentyten_excerpt_length’ ); There are other means to achieve the same thing, but stick … Read more
I think the problem comes from the rewrite rules that had been saved when you developed the site locally. To fix it, you should go to Settings -> Permalinks and set the permalink structure again. Note that, you may just click on the save button, that will flush the rewrite rules for you.
Using the FTP client of your choice, go to wp-content\plugins\, and delete (or move) the wordpress-related-posts directory. By the way: what version of WordPress are you using? And is this a local install or a live site?
Try the Search and Replace plugin: http://wordpress.org/extend/plugins/search-and-replace/ This searches for strings and will allow you to search for every instance of video-x-player, using a regex for the number. If you don’t want to use regex searching on video- will bring up every instance that is already in your database. If you intend to keep using … Read more
Sure, if you want it by ID (which might or might not be good idea, depending on how likely ID will stay same for a long time – no migrations, etc) that would be something like: if( !is_page(135) ) { // code goes here } See Conditional Tags > Page in Codex for more. Alternative … Read more
Simply add the following on top of your code: if ( ! current_user_can( ‘manage_options’ ) ); return;