How to pick “full/thumbnail” images in the loop?

Try just using the traditional $i iterator (untested) but I can’t see why this wouldn’t work.. <?php $i = 0; while ( have_posts() ) : the_post(); $i++; if ( $i == 1 ): ?> <!– First Post –> <div id=”post”> <a class=”post_image” href=”https://wordpress.stackexchange.com/questions/165568/<?php the_permalink(); ?>” title=”<?php the_title(); ?>”> <?php if ( has_post_thumbnail() ): ?> <?php … Read more

display specific widget to a page

you can create new widget area. function header_widget_areas() { register_sidebar( array( ‘name’ => __( ‘header’, ‘header’ ), ‘id’ => ‘header’, ‘description’ => __( ‘Insert something for about us text.’, ‘header’ ), ‘before_widget’ => ‘<div class=”widget span3″>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<h4>’, ‘after_title’ => ‘</h4>’, ) ); } add_action(‘widgets_init’, ‘header_widget_areas’); Then place your widget in … Read more

writing an unique php function to be used on my website

You are returning the translation in your function, not printing it. Using <?php echo date_translation(); ?> should solve the problem. (given that functions.php is initiated at the time you use the function) Edit: In order to follow WordPress convention, you should call the function get_date_translation(). If you want the function to echo the result instead, … Read more

Creating customized php files in theme folder

Problem#1: You can create a customized php file for your page using a Page Template Page Templates WordPress looks for template files in the following order: Page Template — If the page has a custom template assigned, WordPress looks for that file and, if found, uses it. page-{slug}.php — If no custom template has been … Read more

limit number of post for achive page

You should use the pre_get_posts filter for this. For example, you could do this in your theme’s functions.php file: function limit_category_posts( $query ) { if ( $query->is_archive() ) { // Do not do this for the date or category archives. if ( $query->is_date() || $query->is_category() ) return $query; if ( $query->query_vars[‘cat’] == 8 ) { … Read more

Adding attribute to the post.php form tag in wp-admin

The form is generated in file wp-admin/edit-form-advanced.php. The relevant code starts at line 410 (WP version 4.0.1). Inside the <form> tag an action is fired: <?php do_action( ‘post_edit_form_tag’, $post ); ?> so it should be easy to use this action by hooking some small function to it from functions.php: function post_form_novaidate() { echo ‘ novalidate=”novalidate” … Read more

How to edit wordpress pages through cpanel? [closed]

your provided link there is mistake in your uploaded product images.There is no image in all post/product that’s why links are overlapping. For that whenever you add this all posts/product into wp-admin at that place please select or upload appropriate images or remove this tag from the specific file. file location is below. wp-content->themes->your-theme->content.php or … Read more