Thumbnails and Lightbox

Thank you Jeremy Jared. I applied the following solution, based on yours ( Any good lightbox-like option that works in WP 3.2.1? ) First of all, now I call my thumbnail with the following code instead of trying to add the link myself: wp_get_attachment_link(get_post_thumbnail_id(), ‘thumbnail’); Then, I add your filter in function.php /************************* * Lightbox … Read more

pictures does not apeare in posts

The correct .htaccess for a multi-site setup looks like this: RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # uploaded files RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ – [L] RewriteRule . index.php [L] Note the rule for files: That’s how WordPress locates your images. You need also a … Read more

What is the right way to code links for WordPress pages?

For general links use home_url(). <a href=”https://wordpress.stackexchange.com/questions/55146/<?php echo esc_url( home_url(“/path/to/link’ ) );?>”>Anchor</a> To link to theme assets like images etc use get_stylesheet_directory_uri(). <img src=”https://wordpress.stackexchange.com/questions/55146/<?php echo get_stylesheet_directory_uri(); ?>/images/your_image.png” /> You could just as easily use relative links for navigation but I would stick with home_url() for consistency.

permalink and $_GET

Is the reason you are adding the post_id to the URL because you are you trying to access the post_id variable in the template? You can do so much more easily by accessing it in the Loop of your template file <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); // Two … Read more

How to Link to WP Pages Internally and Extenally

Use this to output correct link: <?php $page = get_page_by_title( ‘Store’ ); echo get_permalink( $page ); ?> Or if you know ID of your page (you can get ID from administration), you can use just (if ID is 2) <?php echo get_permalink( 2 ); ?> You can read more about get_permalink function here And I … Read more

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