bloginfo(‘template_directory’) img src

You cannot use bloginfo() while your are outputting using echo because bloginfo it self also out puts string using echo. Below will work for you, you also have extra double quote which i have removed…. <?php $attch_id_1 = pn_get_attachment_id_from_url(get_post_meta($post->ID, ‘img1’, true)); $image_attributes_1 = wp_get_attachment_image_src( $attch_id_1, ‘full’); $attch_id_2 = pn_get_attachment_id_from_url(get_post_meta($post->ID, ‘img2’, true)); $image_attributes_2 = wp_get_attachment_image_src( $attch_id_2, … Read more

Blank space at beginning of tag?

It looks like your site’s title is empty. Fill it out or try for example: add_filter( ‘wp_title’, function( $title ) { return trim( $title ); } ); to remove the blank space in front. For your setup, the following part of wp_title() is responsible for the blank space: $title = $prefix . implode( ” $sep … Read more

New template, where to place CSS?

Include CSS and JavaScipt in the functions.php. Create an empty PHP file, call it header.php, and yes wp_head() goes just before </head> not before <body> tag. <!DOCTYPE html> <html> <head> <title>Website</title> <link href=”https://wordpress.stackexchange.com/questions/222452/style.css” rel=”stylesheet” type=”text/css” /> <?php wp_head(); ?> </head> Create an empty PHP file, call it footer.php and place your footer there: <footer> <!– … Read more

How can I force custom post type to use a specific template?

If your newsletters are a custom post type you can create a template dedicated for it using the template hierarchy. Template for a single page would be.. single-{custom-post-type-name}.php Template for an archive page would be.. archive-{custom-post-type-name}.php These templates get automatically selected you don’t need to add them to a page template attribute in the editor.

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