wp_title() empty on a static front page
wp_title() is for the html title tags in your websites head section. It’s not for outputting a title. Use the_title(), or get_the_title(),
wp_title() is for the html title tags in your websites head section. It’s not for outputting a title. Use the_title(), or get_the_title(),
When WordPress displays post content, it’s not running do_shortcode() on the post content, it’s running apply_filters( ‘the_content’, $content ). Shortcode filters are applied on the_content filter, which is why you have to add extra filters to get them to work in widgets or the footer or elsewhere.
You don’t have to declare the constructor public, just the action hook function. Example: <?php /* Plugin Name: Singleton Action */ class Singleton_Demo { /** * @static $instance Objekt * @access private; */ private static $_instance = NULL; protected function __construct() {} private final function __clone() {} public static function getInstance() { if ( self::$_instance … Read more
Even if a wp_list_categories filter exists, it passes (and so you have to return) the html markup generated by wp_list_categories() function. This means that if you want use that filter you have to alter the DOM with php, and even if it’s possible (hopefully using external php libraries), sure it’s not the best solution for … Read more
I am not sure I understand your issue right, but my guess is your conundrum – how to get to the title that is unchanged by your filter, if you are filtering it everywhere? You can use get_post_field() function to get a raw copy of it from the post object. However instead of messing with … Read more
This github repo has bdn.getPosts extended XML-RPC function to get category. Get 10 most recently modified posts in the sports category ($category can be either a slug or an ID) `array( 1, $username, $password, ‘post’, ‘sports’, 10, array( ‘orderby’ => ‘modified’ ) );`
Since version 4.9 visual composer added shortcode lazy loading. To use VC shortcodes on AJAX content use this function before printing the content WPBMap::addAllMappedShortcodes();. So below code may help you, function get_page_content(){ $id = $_REQUEST[‘id’]; $page_data = get_page($id); WPBMap::addAllMappedShortcodes(); echo apply_filters(‘the_content’, $page_data->post_content); wp_die(); } add_action( ‘wp_ajax_nopriv_get_page_content’, ‘get_page_content’ ); add_action( ‘wp_ajax_get_page_content’, ‘get_page_content’ );
If you are using WordPress 4.0+ you can do this using the wp_editor_settings and the global $pagenow to determine if you are on the comments page. add_filter( ‘wp_editor_settings’, ‘remove_editor_quicktags’, 10, 2 ); function remove_editor_quicktags( $settings, $id ){ global $pagenow; if ( $id == ‘content’ && $pagenow === ‘comment.php’ ){ $settings[‘quicktags’] = false; $settings[‘tinymce’] = true; … Read more
I think this will do what you are looking to accomplish. Basically, this way you hook in before the HTML is generated to add your menu items. I haven’t had a chance to test this, but it should work. EDIT: Since you want to have it underneath a dropdown, you need to set the menu_item_parent. … Read more
Basically it line 480 in sharing-service.php where it says: return $text.$sharing_content; and it should be return $sharing_content.$text; now changing that file won’t keep your changes on updates so you can copy that function (sharing_display) to your functions.php and rename it to something different say my_sharing_display and make the change there. Next you need to remove … Read more