Insert data through a script directly in the db

Yes its possible but why go over the trouble when you can use the native functions like wp_insert_post that will take care of the interaction with the database. If you are still looking to do it directly by $wpdb then the post data is saved in the posts table, the meta data for posts is … Read more

Removing Line Break Tags from a Page

You can hide <br /> elements with CSS using display:none; ofcourse you might want to try going into your post editor and removing any blank lines. WordPress converts line breaks into tags for you automatically when the content is rendered using a function like the_content().

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

Automatically Marquee Code scrolling with recent post title?

As I told you in chat, you just need the recent posts and can add any markup you need: // functions.php function recent_inaccessible_posts() { if ( ! $recent = wp_get_recent_posts(array(), OBJECT ) ) return; $out=”<marquee><ul>”; foreach ( $recent as $r ) $out .= ‘<li><a href=”‘ . get_permalink($r->ID) . ‘”>’ . get_the_title($r->ID) . ‘</a>’; print “$out</ul></marquee>”; … Read more

Add Schema Image Designation Inside a WordPress Function?

What you are trying to do works for me. That is, this works when I try it: the_post_thumbnail(‘post-thumbnail’,array(‘itemprop’=> ‘articleSection’)); I get the itemprop attribute is my <img tag. If that isn’t working for you I can only guess at why. Possibly there is a filter causing problems. For a more global solution, the following will … Read more

Missing HTML comment tags

It seems that my ISP’s DNS was not refreshing and was caching some stuff. While waiting for them to fix it as a temporary solution I changed my DNS to Google’s public DNS as shown on this page developers.google.com/speed/public-dns/docs/using and everything seems fine.