Add custom content to nonexistent page

In your first example, you add the rewrite tag personal-development, but then you use the rewrite tag class_type inside your rewrite rule. That method would work if you fixed that error, and assuming 17318 is the page id of your personal-development page. You could then use get_query_var(‘personal_development’) in the template or a template hook, to … Read more

Content area is too small

You need to edit your theme’s CSS to do this. In style.css in your 2014 folder on line 1021: .site-content .entry-header, .site-content .entry-content, .site-content .entry-summary, .site-content .entry-meta, .page-content { margin: 0 auto; max-width: 474px; } change 474px to whatever you want your content width to go up to. Or set it to 100% to stay … Read more

If statement to check for post_content

The following line is wrong <?php echo get_post_meta($partner->ID, $a_description, true); ?> If you look closely, you are actually passing get_post_meta($partner->ID, “a_description”) to the $key parameter of get_post_meta as this is the value assigned to $a_description You should most probably change $a_description to just a_description EDIT This line <?php echo get_post_meta($partner->ID, $a_description, true); ?> should most … Read more

Show only picture from post_content in custom RSS file

you can use regular expression on your post content.Which could be done for example like this: for reference $content = get_the_content(); // we need a expression to match things $regex = ‘/src=”https://wordpress.stackexchange.com/questions/190375/([^”]*)”https://wordpress.stackexchange.com/”; // we want all matches preg_match_all( $regex, $content, $matches ); // reversing the matches array $matches = array_reverse($matches); echo ‘<pre>’; // we’ve reversed … Read more

SQL trigger failes with post_content

I’ve written a filter for you. It will filter the character before the post get saved in the database and it’s using the WordPress way. If you use this I think you’re not gonna be needed the trigger. Here it is- add_filter( ‘wp_insert_post_data’ , ‘the_dramatist_filter_content_before_insert’ , ’99’, 2 ); function the_dramatist_filter_content_before_insert( $data , $postarr ) … Read more

add css to only body text

On your CSS rule for the .single img, you are currently setting only the maximum width, and the padding you set applies to the image itself within the body’s box. Try setting the image to full width and pulling the sides out with negative margin: .single img { width:100%; margin: 0 -100px; }