Tag Info

New answers tagged

2

No need to reinvent the wheel - put your editor support back and tweak the settings: function wpse_199918_wp_editor_settings( $settings, $editor_id ) { if ( $editor_id === 'content' && get_current_screen()->post_type === 'custom_post_type' ) { $settings['tinymce'] = false; $settings['quicktags'] = false; ...


0

So I solve my problem by configuring the all content by default. However I did the same on another example and I came alive with zero configuration to be done, I still don't understand. The Answers a) There is no inconsistency with regard to versions used in place over the remote at that time; b) The use of Plugins did cause the behavior, but technically ...


0

You can use the the acf/save_post action to copy the content from your custom 'full_text' field over to the normal post content field, so it can automatically be accessed by toc+ and other plugins. add_action( 'acf/save_post', 'wpse199256', 20 ); function wpse199256( $post_ID ) { global $wpdb; $post = get_post( $post_ID ); $wpdb->update( ...


0

To me you code looks good, I would recommend adding priority as high as 9999 Heres how : add_filter('the_content', 'filter_ptags_on_images', '9999');


-1

Try this. Open your functions.php file and add the following PHP snippet remove_filter('the_content', 'wpautop');


0

This can get a bit demanding to get it right so this following snippet should provide the basic upon which you can research and build a more complete solution: add_action( 'template_redirect', function() { if ( is_category() ) { $term = get_queried_object(); if ( isset( $term->parent ) && $term->parent ) { ...


0

After Change config.php working fine. /** Database Charset to use in creating database tables. */ //define('DB_CHARSET', 'utf8mb4'); to define('DB_CHARSET', 'utf8'); Whats difference between utf8mb4 vs utf8 on wp.


0

You can assign a class with JavaScript to the paragraph tag if it has an img: jQuery: $(".entry-content p").each(function(){ if($(this).find("img").length > 0) $(this).addClass("has-img"); } then just add a css rule: p.has-img{ width: 100%; }


1

The new theme uses a theme builder called Waves Page Builder. Many premium themes use page builders to allow non-technical users to add complex items to pages, such as sliders, columns, etc. The new theme is likely overriding the content in the main post editor in favor of the page builder.


0

I knew it's old question but this answer should help the people still looking for it. This plugin works perfectly in any theme. https://wordpress.org/plugins/insert-post-ads You can choose first / second or whatever you like to display your ads.


0

The end of the_content() is a </p> tag. It sounds like you want to include your end mark before that last </p> tag. If so, you need a function that filters the_content(). Something like: function yang_end_mark( $content ) { $content = substr_replace($content, '<span>&#128282;</span></p>', strrpos($content, ...



Top 50 recent answers are included