Hot answers tagged

5

You can just remove the filter before calling the_excerpt and then add it back afterwards... remove_filter('excerpt_more','new_excerpt_more'); the_excerpt(); add_filter('excerpt_more', 'new_excerpt_more');


4

I ran your filter in my development area. It didn't work. Then I switched off the Yoast SEO plugin, which I knew was also messing with the page title. Then it worked. So my suggestion would be it is another plugin that is messing with it. In the case of Yoast, it was a filter call to pre_get_document_title that returned non empty. In that case ...


3

After some experimenting I came to the following suggestion: could it be, that the <title> tag is "hard coded" inside your parent theme's header.php? If that is the case, you could try to remove the <title> tag from your child theme's header.php (copy your parent's header.php into your child theme folder) and then add the theme support back ...


3

Having read your post from top to botom and bottom to top, you have in all probabilty a filter that is passing a title through the pre_get_document_title filter. The clue here the following statement: I've also tried pre_get_document_title, which does fire on page load, Looking at the soure code for wp_get_document_title(), we see the following code: ...


2

You need the !is_admin() check. This will return false on admin pages, failing your condition. On front end pages, that condition will return true, executing your conditional statement if ( !is_admin() ) { // Do something only on frontend }


2

If the parent theme does not declare support for title-tag you can do it like this in child theme /** * Theme support should be added on `after_setup_theme` */ function add_theme_support_child() { add_theme_support( 'title-tag' ); } add_action( 'after_setup_theme', 'add_theme_support_child', 11 ); Filter document_title_parts expected return type ...


2

I've tried the same thing and was able to hook into the pre_option_ filter by using all as filter. add_filter('all', 'pre_option_',1,3); function pre_option_($actionHook,$bool=false,$option_name) { if(strpos($actionHook,'pre_option_') === FALSE){ return $bool; } }


2

There's a filter for the output $job_listings_output = apply_filters( 'job_manager_job_listings_output', ob_get_clean() ); so, you should just do add_filter('job_manager_job_listings_output','my_job_manager_job_listings_output'); function my_job_manager_job_listings_output($output) { $adsense_code = ' My adsense code'; return $output . $...


1

image_send_to_editor hook will handle when the image is sent to the editor. The problem will be that your editor may not work correctly when you modify the URL -- use with caution. save_post will allow you to modify the $post content on save. update_(meta_type)_metadata could be used to intercept when the meta data is saved.


1

I have been looking around the core files searching for hooks, there were very few when it comes to hooking into edit_user() function which updates the user data in profile.php page, so I have finished with some workarounds: My workaround is to save the user's password in a custom option before the password was updated, and match later with this user's ...


1

You need to make a custom query to display these pending posts. Here is an example using get_posts(): $args = array( 'post_type' => 'post_type_name', 'post_status' => 'pending', // -1 shows all 'posts_per_page' => -1, ); $pending_posts = get_posts( $args ); foreach( $pending_posts as $pending_post ) { // post object properties ...



Only top voted, non community-wiki answers of a minimum length are eligible