code suddenly appearing from my tempate second loop

Are you absolutely certain that you don’t accidentally have a closing php tag where you shouldn’t? – yes – turned out to be that I had <? rather than <?php – probably the new server was set differently – as per https://stackoverflow.com/questions/2185320/how-to-enable-php-short-tags

Problem when linking out to separate file within foreach loop

As far I’ve known get_template_part() function does not work with foreach loop. So we need to use locate_template() function to this case. This is your customized category template code. Put it there – <?php /** * Category Template: Custom */ get_header(); ?> <div id=”content” class=”site-content container <?php echo codilight_lite_sidebar_position(); ?>”> <div class=”content-inside”> <div id=”primary” class=”content-area”> … Read more

Retrieve tags data in post body

There are two ways to approach this: modify the existing the_tags function or build your own. the_tags ultimately relies on get_the_term_list, which returns a list of hyperlinked tags. You would have to use regular expressions to add classes and styles to that using a filter. That would be quite cumbersome. So, my preferred approach would … Read more

Can Page Templates be Applied to Archive and Post Templates?

If you would like all Post Types to have template selection functionality, please update to WordPress version 4.7. Quoted from the codex page linked above: Page Templates for Post Types Add support for post type templates. Add support for post type templates. By opening up the page template functionality to all post types, theme developers … Read more

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