wp_insert_post not inserting post

I recommend changing the form tag to: This will ensure that the form submits to the same page it is on. Also post_title and post_content are required, so the insert will fail if either of those values are blank or missing. (https://developer.wordpress.org/reference/functions/wp_insert_post/)

Change WordPress names duplicate titles (url)

For details please see this answer : Remove Dash/Hyphen From WordPress CustomPosttype Permalink In your functions.php : function no_dashes($title) { return str_replace(‘-‘, ”, $title); } add_filter(‘sanitize_title’, ‘no_dashes’ , 9999); For particular type of post : function no_dashes( $slug, $post_ID, $post_status, $post_type ) { if( $post_type == “page” ) { $slug = str_replace( ‘-‘, ”, $slug); … Read more

LinkedIn Share Post Button

Use this: <script type=”text/javascript” src=”http://platform.linkedin.com/in.js”></script><script type=”in/share” data-url=”<?php the_permalink(); ?>” data-counter=”right”></script>

show loop id post , only first id can read

You are getting the option “blog-featured-post”, which apparently returns two posts. Then, for each of these posts, you are making a query. Only the second one is actually used, since your if ( $q->have_posts() ) is outside of the loop. This query only has one post, since you use the post ID with the post__in … Read more

Checking if a post contains an html tag

You could try something like this if you are checking the content in the main loop. $content = get_the_content(); preg_match_all(‘/(<img .*?>)/’, $content, $img_tags); if (!empty($img_tags)) { // Post content contains images, do something! } // Check for links and do something if you have matches

How to prevent clicking on posts

This may help, add the following code to WordPress Dashboard > Appearance > Customize > Additional CSS : .portfolio_slide_loop.wow.fadeInUp { pointer-events: none; } If you need something more convenient, then use jQuery, add the following to in your footer.php just before the tag. : <script> jQuery(document).ready(function($){ $(‘.portfolio_slide_loop.wow.fadeInUp’).contents().unwrap(); }); </script> If you still have problem in … Read more

Enable HTML Tags in WordPress Post excerpt

Not sure if I understood your question correctly, but in the codex it reads: If adding the excerpt manually, you may use (some) HTML formatting and the tags will not be stripped. So if the only thing you want to do is make part of the text bigger, just add for instance: example text <span … Read more