Theme Dev | Convert Template to Theme

If you mean you want a widget to control content dynamically from the admin panel, then you can use the Advanced Custom Fields plugin by Elliot Condon to create custom dynamic content and retrieve it every place all over the website. After installing the plugin, simply create fields in the plugin page and get the … Read more

Creating page-templates directory breaks everything!

When a page is assigned to a template, this template selection is saved in the post meta table under the key _wp_page_template. These template values are as follow default if no page template in explicitely set {$template}.php for templates in root subfolder/{$template}.php for templates in a subfolder where subfolder should be the name of the … Read more

WP plugin calls for custom pages

You don’t have to “include” plugins. Plugins operate, or should operate, by means of the extensive “hook” system built into WordPress core. Once activated, a plugin should not require much else (with a few exceptions for very complicated plugins). What you need to do is make sure that you are using the appropriate Core functions … Read more

Alternative layout the loop

For those interested, i’ve solved my problem using sizeof($wp-query->posts) The end-result is this content-news.php template <?php //echo sizeof($wp_query->posts); //var_dump($wp_query);die(); if(sizeof($wp_query->posts) == 4) : ?> <?php if( $wp_query->current_post == 0 ) : ?> <h3><?php the_title(); ?></h3> <div class=”row”> <div class=”col-md-12″> <p><?php the_excerpt(); ?></p> <p><a href=”https://wordpress.stackexchange.com/questions/216989/<?php the_permalink(); ?>” class=”btn btn-primary btn-sm”>Lees Meer</a></p> </div> </div> <div class=”fh5co-spacer fh5co-spacer-sm”></div> … Read more

Create a variable with string, array or multiple values

the last $file takes priority over the previous That’s because you assign the new value to the $file variable at every line. The only way I see you can do it by using the array: <?php // define directory list $directories = array( ‘home’, ‘pages’, ‘blog’, ‘single-posts’, ‘products’, ‘templates’, ‘products’ ); // run through directories … Read more

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