Search results in custom template

You need to declare the variable as global in resources-search.php: <?php global $YearList; // Rest of file… May I ask why you’re hardcoding the years, instead of… $YearList = range( 2000, 2013 ); $YearList = range( 2000, date( ‘Y’ ) ); // From 2000 to current year

Show uploaded images in full size

WordPress creates 3 different sizes as far as my research goes. Read this on WP image handling -> http://www.studiograsshopper.ch/web-development/wordpress-featured-images-add_image_size-resizing-and-cropping-demo/ You can easily customise the default Media sizes by changing the default sizes in Dashboard > Settings > Media. You can grab any of those sizes. See the codex @ http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail The function you want is: … Read more

Permalink / sub-template issue

It is hard to tell exactly what you’ve done, and it sounds a bit messy, but I think you’ve created “Pages” using the child templates as the “Template” under page attributes. That, or you are linking to them directly with wp-content/theme/themename/templatename.php. You never want to link directly like that, but if that were the case … Read more

changes to templates not showing on server

After many attempts, i had to make changes to the core template files in directory plugins/woocommerce and it worked, for safety i then copied the woocommerce/templates to mytheme/woocommerce/templates and surprisingly it worked! strange but at least it did.

Custom single page based on which custom page template is selected

Yes it is possible using get_template_part(); Assuming that you use a standard single.php: <?php /* * Template name: template-blog-left * */ get_header(); ?> <div id=”left-sidebar”> <!– Here your left sidebar –> </div> <div id=”content”> <?php //This function will look for single.php file in your theme folder get_template_part( ‘single’ ); ?> </div> <?php get_footer(); ?>

Storing postID in session variable to query database when visitor on custom template page

If your only need is convert a a permalink structure in a get variable use an endpoint. <?php /** * Plugin Name: Question 112350 Plugin * Author: G.M. */ /** * Add a new role cloning capabilities from editor and flush rewrite rules */ function install_q112350_plugin() { plugin_q112350_endpoint(); flush_rewrite_rules(); } /** * Remove the role … Read more

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