Do I really need the div class entry?

No specific markup is required in a theme. The only exception are themes published on wordpress.org, they have to follow the guidelines. And even there, <div class=”entry”> is not required. The only parts you have to use are these: while ( have_posts() ) { the_post(); print ‘<h2>’ . get_the_title() . ‘</h2>’; the_content(); wp_link_pages(); }

How to mark an option as selected

What you are looking for is the selected() function. Your updated option should look like this: <option value=”<?php echo $category->cat_ID; ?>” <?php selected($option, $category->cat_ID); ?>> <?php echo $category->cat_name; ?> </option> // EDIT Oh, and BTW, in your particular case you might want to use the wp_dropdown_categories function, I guess. That would be: wp_dropdown_categories( array( ‘selected’ … Read more

Image Attachment Url Rewrite

Ok so I found the answer. I used the code as per https://wordpress.stackexchange.com/a/56426/37472 and changed all references of ‘series’ to ‘gallery’. That added the required rewritre rule to parse a link like domain.com/landscapes/gallery/123/ to index.php?attachment_id=123. My assumption was that wordpress would display the default permalink that is generated by get_permalink() in the domain.com/landscapes/gallery/123/ format. It … Read more

Widgets not showing in my custom theme

You’re using the widget name and not i.d which is why it isn’t working. Change this: if (is_active_sidebar( ‘My_Widgtet_Area’ ) ) : ?> <div id=”widget-sidebar”> <ul> <?php dynamic_sidebar( ‘My_Widgtet_Area’ ); ?> </ul> To this: if (is_active_sidebar( ‘partner-slide’ ) ) : ?> <div id=”widget-sidebar”> <ul> <?php dynamic_sidebar( ‘partner-slide’ ); ?> </ul> The i.d in the template … Read more

WordPress AJAX in header.php

There are tons of questions about using Ajax, so your question could be easily marked as duplicated but I see so BIG mistakes that I can’t say to you that the question is duplicated without explaining your mistakes. The Ajax in WordPress is handled in admin-ajax.php file, wehre you correctly sent the ajax request (see … Read more