Get Video Attachment to post

Video from video clud, like youtube.com, vimeo? If true – use text field or textarea field. User fill youtube share code in this field and you will add this to post_content. Or create custom iframe and tell users insert video link.

Assign a link of a post to that contains that post?

This should help you: <?php if ( !is_singular() ) : echo ‘<a href=”‘ . esc_url( get_permalink() ) . ‘” rel=”bookmark”>’; endif;?> Here is your existing <article></article> codes <?php if ( !is_singular() ) : echo ‘</a>’; endif;?>

the_content() not displaying the full post

Step 1 Disable all plugins and try enabling plugins, one by one, while you refresh the problematic page after each plugin enabled, until you find the source of problem. If no plugin was the cause, go to step 2. Step 2 Edit your current theme’s functions.php file and comment all occurrences of add_action(); add_filter(); function … Read more

Assign custom class to post content images

As you are using bootstrap you can add img-fluid helper class to images like this. function example_add_img_class( $class ) { return $class . ‘ img-fluid’; } add_filter( ‘get_image_tag_class’, ‘example_add_img_class’ ); get_image_tag_class filter allows to add custom css class along side WordPress default classes. Read more about the filter here

Simple method to generate posts from files

One way is to have the posts in a Json format, and use wp_insert_post(); to automatically create the posts. documentation: https://developer.wordpress.org/reference/functions/wp_insert_post/

How do I add /blog/ on my permalink without affecting the portfolio project types permalink?

You can use the “post_link” filter with a conditional to check the post type to modify the single posts. For example: add_filter( ‘post_link’, function($post_link, $id){ $post = get_post( $id ); if( is_object( $post ) && ‘post’ === $post->post_type ) { return home_url( ‘/blog/’ . $post->post_name ); } return $post_link; }, 10, 2 ); You would … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)