WordPress 3.3.1 single post template

For page templates, click on screen options in the top right corner and check the Page Attributes box. If your theme has no page templates to choose from then the template drop down will not be shown. Posts and other post types do not use or support page templates and never have. Only pages support … Read more

how can I add a “read more” tag directly in the template?

The code would probably be something like this: echo ‘<a href=”‘ . get_permalink() . “#more-{$post->ID}\” class=\”more-link\”>”.__( ‘Read more &gt;’, ‘your-theme’ ). ‘</a>’; Check out the source on how WordPress does it: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/post-template.php#L219 This has to be inside the loop to work and the $post global has to be visible in the current scope.

Archive template limiting to 4 entries?

This has nothing to do with the loop in the template file. Check Settings>>Reading>>”Blog pages show at most…” That setting is the default setting for Archives, too, as well as Search results, etc. Use WordPress › Custom Post Limits « WordPress Plugins to vary posts limits in categories, archives, etc.

Use a separate template for the home page only

I assume that template-blog-full-width.php is a page template and that you’d like to use this page template as the template to be used on the homepage. What you can do is to create a copy of the template-blog-full-width.php template and name the copy front-page.php. That’s about it. WordPress will always use front-page.php template when on … Read more

Load custom script on a single template

Multiple issues, fixing one or more of which should resolve the issue: If it’s not already, that code should go in functions.php and not a template file. Registering the scripts does not actually load them. For that you need wp_enqueue_script. If you change your wp_register_scripts to wp_enqueue_scripts, that should work. If you need jquery, you … Read more

If Posted After Date

There are many ways of comparing dates. the following is perhaps the simplest (untested): if ( in_category( ‘photographer-interviews’ ) && strtotime( get_the_date( ‘c’ ) ) > 1376524800 ) { get_template_part( ‘content’, ‘interview’ ); } else { get_template_part( ‘content’, ‘blog’ ); } 1376524800 is the Unix timestamp for 00:00 (GMT) on August 15 – that is, … Read more

Genesis – Adding custom hooks to display secondary navigation

Yes. you can do that. function my_custom_footer() { ?> <div class=”site-footer-logo”> <img src=”https://wordpress.stackexchange.com/questions/179519/<?=get_stylesheet_directory_uri();?>/images/my-logo-small.png” alt=”My Logo Small” /> </div> <?php do_action(‘my_own_hook’); ?> <p>Copyright &copy; <?=date(‘Y’);?>, my-url.com.</p> <?php } add_action( ‘my_own_hook’, ‘genesis_do_subnav’ ); function genesis_do_subnav(){ wp_nav_menu( array( ‘theme_location’ => ‘secondary-menu’ ) ); } You also can directly add: </div> <?php wp_nav_menu( array( ‘theme_location’ => ‘secondary-menu’ ) ); … Read more

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