After the local installation of an old WP website I can see the homepage but I can’t access to the articles, why?

Depending on if permalinks worked on your local server before the import or not you ether need to update the .htaccess in your wordpress root, or you need to enable rewrites all together in Apache. What operation system do you use? This is a good guide if you use linus: https://www.digitalocean.com/community/articles/how-to-set-up-mod_rewrite

Post dynamic fields and style

Just use a custom field. On post or page edit page click Screen Options in the top right corner anb select Custom Fields. Add a Name and Value pair for example: price (for the name) and 9$ (for the value). Then in your single.php or whatever template use this code to display it: <?php echo … Read more

Display Video as Post Thumbnail

From looking at the source code of the theme the “Montreal By Winter” post (Which I assume is what you’re trying to replicate) has the “Video” post format. I’d image selecting that when creating a post will enable you to add a video embed code.

How do I fix the url when clicking on portfolio item?

You could do it with jQuery: jQuery(document).ready(function($) { $(‘a[href*=#]’).on(‘click’, function(event){ event.preventDefault(); }); }); Save that to a file (something.js) and upload it to your server. Then add the following to your functions.php (remember to set up a child theme if you aren’t using one): add_action( ‘wp_enqueue_scripts’, ‘prefix_load_scripts’ ); function prefix_load_scripts() { wp_register_script( ‘something’, get_stylesheet_directory_uri() . … Read more

How to create categories out of a list of words?

Assuming you have a nice list of your Words, you could easily create an array with them, doing a little data manipulation. Afterwards you can loop throug your $array and insert the Term accordingly: $yourcities = file($filename, FILE_IGNORE_NEW_LINES); // all your valuesfrom the .txt file foreach( $yourcities as $thiscity ) { wp_insert_term( $thiscity, // the … Read more

reusing code in function and running it with loop

You would need to set up the function like this in your functions.php function my_function(){ //your function in here include(TEMPLATEPATH . ‘[variable][1].php’); } And then in your loop you would call it like so: $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 4, ); $featured_query = new WP_Query($args); if ($featured_query->have_posts()) { while ($featured_query->have_posts()) { $featured_query->the_post(); … Read more