Tag Info

New answers tagged

1

If you want to get the month of the current archive page you'll have to use single_month_title. The following code will output " August 2014" (notice the space before the month) <?php single_month_title(' ') ?> Without a space before the month: <?php echo trim(single_month_title(' ',false)) ?> Read more: ...


0

Here is a strip down of something similar I've done a while ago. Here is what the code basically does is: First, it retrieves the date of the first post on the block. Secondly, the current date is retrieved. These two values are fed into a range() function to get all years in between A foreach loop get each year separately and that is returned into a ...


0

You might want to check out this post, as your post is linked to that question. That should explain most of your question. As for your code, move that outside the the loop. You were nearly there with your code. Check out get_terms in the codex to see which objects you can use that is returned by the function. You can use $term->description instead of ...


1

The most important factor missing from your list is who is the user. We can discuss technical pros and cons but for most sites once the site development is done the user is left to manage the site by himself, and each user has a different knowledge of wordpress and different preferred workflow. If you are developing a costume theme then the answer is easy, ...


2

I'm posting my comment to @MarkKaplun as part of my answer. My point is this, every end user experience a certain thing in a certain way based on his/her own knowledge, experience, usability and personal preference. There can never be a wrong or right answer here. Option one might suite you best, option two might suite me better. I like the way the OP ...


1

To properly understand the difference, you have to dig into the Wordpress Core is_archive() (defined in wp-includes/query.php#L140) checks any type of archive page. These archive pages is defined in the WP_Query class in wp-includes/query.php#L1615 lines 1615 and line 1616 1615 if ( $this->is_post_type_archive || $this->is_date || ...


0

To expand on @AmirMasoud's answer, when you're on your news feed, it is not actually displaying a category, tag, author, etc specific set of posts. Also in your options there is a place you can define home. That page may be outside of using index.php and will be the only page that returns 1 as is_home(). Archive can be set a lot of different ways. Look up ...


1

if you have home.php/index.php on your theme it's your first page and function is_home() return true in this page. but when you are on archive.php function is_archive() will return true. archive.php is for displaying posts of a year or a month or a day. you can test archive functionality with adding it's widget to your site.


0

This seems to be what you are looking for Take into account that you probably will have to add a new file to your theme's directory. The rest is easy, just create a page and select the right template.


0

Can you go to Settings/Permalinks and click Save Changes. That will flush the permalinks. You could look at the 'Debug wp_redirect' plugin. Edit: Another idea is to determine what template file is in use. I have a small function plugin that adds debug comments to the header and footer for logged in Editors or Admins. I have uploaded it to pastebin.com. ...


0

thanks for ur code Strik3r ..this helped me a lot..I finally got sorting by custom field to work...in functions.php function sort_meta_query( $query ) { if ( $query->is_archive || $query->is_category || $query->is_home ){ $query->query_vars["meta_key"] = 'fastest_speed_experienced'; $query->query_vars["orderby"] = 'meta_value_num'; } ...


1

It is not possible by default. Your only possible way out of this is to create custom page templates which you can modify to display something like an index or any custom content When you create a new page in the back-end, choose this custom template, and make sure that your page slugs is named accordingly so that when you visit domain.com/category/ ...



Top 50 recent answers are included