Get the excerpt of post_content

I’m sure if you did some more research you would find this as it’s been asked many times before. If you just want all expert to return the value of 15 then you have to add something like this to your functions.php // Customize excerpt word count length function custom_excerpt_length() { return 15; } add_filter(‘excerpt_length’, … Read more

Own code on index.php wordpress theme file, help with the rewrite rules

Your rewrite rules must not start with the first slash, that is already stripped out. So the following code will add a rewrite rule that will set a query variable that we can later use: add_action( ‘init’, ‘wpse9016_init’ ); function wpse9016_init() { add_rewrite_rule( ‘currentpage/(\d+)/?’, ‘index.php?wpse9016_currentpage=$matches[1]’, ‘top’ ); } This query variable is ignored unless we … Read more

Creating content using wp-admin pages

I would suggest that you activate a default theme, such as Twenty Seventeen, to see how it works. You do need .php files to make WordPress work, but these are generally either “theme” files (which basically control the look and feel of the site) or “plugin” files (which add or change functionality, like contact forms). … Read more

How can I show some standard html code across any theme I install?

You want to create a new plugin for this. See: http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head Create a new file in /wp-content/plugins/ called headerstuff.php (or whatever) Drop the following code in it: <?php function header_code() { $output .= “”; //code segment echo $output; } add_action(‘wp_head’, ‘header_code’); ?> Add your code between the quotation marks on the line starting with “$output”. … Read more