登录 | 注册 | FAQ
Anonymous

Wordpress Post order by date modified

+ 发表回复

3 篇帖子 分页: 1 / 1


Wordpress Post order by date modified

Abdomen » 周三 10月 01, 2014 4:59 pm

Hello everyone,

I have a premium wordpress.com account and i'm trying to solve a important issue, essential for my website idea.

I need to have my posts in the front page ordered by date modified. I have read that by falsifying the date, it can be achieved, but unfortunately, i can't apply it, as i need to use date accuracy in my posts.

I tried the sticky note method, but all the posts with sticky notes activated, were positioned by alphabetical order!!

So i wonder, what can i write in the CSS editor to obtain what i need?
Is there some code allowing to change the order of those sticky notes?

Thanks for the time and patience,

Regards,

Ricardo
头像

Abdomen

  • 帖子: 2
  • 注册: 周三 10月 01, 2014 4:56 pm

Re: Wordpress Post order by date modified

nanoverso » 周四 10月 02, 2014 2:20 am

In CSS no, the responsible for this ordering is PHP code of WP platform. Have you tried some ordering solution based on posts tags ?
头像

nanoverso

  • 帖子: 253
  • 注册: 周六 5月 10, 2014 12:08 am
  • 地址: Brazil
--
Free VST Plugins Download.

Re: Wordpress Post order by date modified

XainPro » 周六 10月 04, 2014 5:26 am

there is no css solution for this you need to use a plugin to order your post by date published if you do not have any clue about programming go check out plugin section there are some plugins for this kind of task.

but if you know programming you can open index.php or loop.php file in WordPress theme and before the main loop add this code

代码: 全选
// assign the variable as current category
$categoryvariable = $cat;

// concatenate the query
$args = 'cat=' . $categoryvariable . '&orderby=date&order=ASC';

// run the query
query_posts( $args )


but if you do not know programming i would not recommend you to do this because of this you can break your website
here is the official link for this option detail
http://codex.wordpress.org/Template_Tag ... Parameters

Or simple hire a programmer it will only for a few Dollars. :)
头像

XainPro

  • 帖子: 3933
  • 注册: 周五 2月 17, 2012 8:10 pm


+ 发表回复

分页: 1 / 1