New answers tagged

1

You can use the_content with an high prioriety (lower number). add_filter( 'the_content', function( $content ) { return 'Hello World '.$content; }, 0); You can even use negative priority: add_filter( 'the_content', function( $content ) { return 'Hello World '.$content; }, -10); Note that this will apply everytime 'the_content' is used, no matter ...


1

There is no other global filter applied before the_content - you can use the $priority argument in your add_filter call to ensure your function runs before any others: function wpse_225625_to_the_top( $content ) { return "Hello World\n\n\$content"; } add_filter( 'the_content', 'wpse_225625_to_the_top', -1 /* Super important yo */ );


0

Your function is signup but you're hooking check_for_signup. You're also trying to apply the_content filters from within a function that's hooked to the_content: function wpse_225562_replace_for_signup( $content ) { if ( strcmp( 'signup_slug', get_post_field( 'post_name' ) ) === 1 ) { $content = 'Sign up, bitch.'; } return $content; } ...


0

You can use the cat_is_ancestor_of() function to check for child categories. http://codex.wordpress.org/Function_Reference/cat_is_ancestor_of


1

This is a shot in the dark because I can't see the site... Check the way your theme uses css to align your sidebar and see if the width that is being set to the div by the user is causing the post container to become too wide, pushing the sidebar down. You could use some css to control elements within the posts container such as: I would try to find the ...


0

<figure> <?php echo get_the_post_thumbnail( null, $size, $attr ); ?> <figcaption>here goes your caption</figcaption> </figure> for the_post_thumbnail check : https://developer.wordpress.org/reference/functions/the_post_thumbnail/



Top 50 recent answers are included