Allow Access To Subfolder Of HTML For Logged In Visitors

Take a look at this thread here – it covers using .htaccess to protect a directory based on a WordPress logged in cookie. The .htaccess in case the thread goes missing – obviously you’ll need to change uploads/premium to your directory: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^.*uploads/premium/.* RewriteCond %{HTTP_COOKIE} … Read more

What file is the tag located in Genesis default theme?

In every good theme, the </body> tag is located in the footer.php file. However, unless you’re using a child theme, any modification will be lost on a theme update. That’s why it’s better to use the wp_footer filter hook like so: add_action( ‘wp_footer’, ‘wpse_76330_aweber_tracking_code’ ); function wpse_76330_aweber_tracking_code() { ?> %%%% insert tracking code here %%%% … Read more

Some images on WordPress site are suddenly gone

You are using relative URLs in some places. That is, you are using this– <img src=”https://wordpress.stackexchange.com/bruce_lipton1.jpg” />— instead of this– <img src=”http://www.pureplantessentials.com/bruce_lipton1.jpg” />. Don’t do that. Relative URLs are very unreliable in most of WordPress. It has to do with the way that WordPress rewrites URLs. Your theme, for example, is at wp-content/themes/theme-name/ but those … Read more

Insert a Featured Video

No, it is not possible as-written in core. the_post_thumbnail() uses the ID of the attachment post-type that has been selected as the featured image for the post, then outputs the image associated with that attachment post-type. You would have to filter the_post_thumbnail() in some manner, but your question specified “without a Plugin”.

Shortcode of a function

Build a string instead of directly outputting the contents. $str=””; foreach ($postslist as $post) : setup_postdata($post); $str .= ‘<div class=”events”>’; $str .= ‘<p><strong>’.get_the_date().'</strong></p>’; $str .= ‘<p><a href=”‘.get_permalink().'” title=”‘.esc_attr(get_the_title()).'”>’.get_the_title().'</a></p>’; $str .= ‘</div>’; endforeach;

Shortcode displaying at the top of the page [duplicate]

You use the function the_exerpt(), replace this with get_the_excerpt(). I don’t know for sure, but you might need to use apply_filters(‘the_excerpt’, get_the_excerpt()) to maintain the formatting in wich the_excerpt() is returned. Try to use get_comment_reply_link instead of comments_popup_link. both functions the_excerpt() and comment_popup_link() won’t return values, but print it, wich cause te content to be … Read more

WordPressUser Submission Form

When you get those “headers already sent” messages, it is usually one of several things: You are echoing something when you shouldn’t be, which is any time before get_header on the front end. I can’t remember exactly where the window is on the backend. You are doing something that is triggering a warning or notice … Read more