Gustav
Forum Replies Created
-
Forum: Plugins
In reply to: [Profile Extra Fields by BestWebSoft] Display authors custom field in a post?Thanks!
Forum: Everything else WordPress
In reply to: Bump a post if new commentNo im not ussing bbpress or buddypress. Just customised default wordpress without any social plugins. Need a function wich will work on default wordpress.
But yes it should work like any other forum if new reply bump post to the top.
- This reply was modified 3 years, 9 months ago by Gustav.
Forum: Plugins
In reply to: [Profile Extra Fields by BestWebSoft] Display authors custom field in a post?But i think it can be done already.
The text information in those fields are already saved somewhere.
So basicly i just need.
get user id -> get field -> get field info -> print it.
I think this is already possible with php
Where is the field information saved?
Forum: Plugins
In reply to: [Profile Extra Fields by BestWebSoft] Display authors custom field in a post?I meam post authors custom fields.
Forum: Fixing WordPress
In reply to: Many custom fields in user dashboardForum: Fixing WordPress
In reply to: PLUGIN Give points to users?@a2hostingrj i have found that plugin before but it doesn’t do what i want.
Forum: Developing with WordPress
In reply to: Allow comments after x hoursWhat do you mean by this?
– do a time compare between the server and the post
If a post is published 14:00 its published 14:00 not 15:00 or what am i missing?
Forum: Developing with WordPress
In reply to: Allow comments after x hours@corrinarusso yes im googling right now and trying what i can with those skills i got.
Wierd that this not exists. Close comments exists but not open.
Forum: Developing with WordPress
In reply to: Allow comments after x hoursOk i saw that it didnt bump now i know.
But there is a function which closes comments after x days built in wordpress and exists in settings.
In what file can i find that function? So i can see the code and maybe learn something.
Forum: Developing with WordPress
In reply to: Allow comments after x hoursBump!
Forum: Developing with WordPress
In reply to: Random order blog postsWell the problem is “/category/name”
Well hope someone else can help you.
Forum: Developing with WordPress
In reply to: Random order blog postsFirst code worked but the problem is that the link you want to change is:
https://makerstars.org/category/mit-strom/
Instead of
https://makerstars.org/Try this.
function wpse83754_filter_pre_get_posts( $query ) { if ( $query->is_main_query() && is_page( $id ) ) { $query->set( 'post_type', array( 'mit-strom' ) ); } } add_action( 'pre_get_posts', 'wpse83754_filter_pre_get_posts' );
Or try this.
function wpse83754_filter_pre_get_posts( $query ) { if ( $query->is_main_query() && is_page( $id ) ) { $query->set( 'post_type', array( 'category/mit-strom' ) ); } } add_action( 'pre_get_posts', 'wpse83754_filter_pre_get_posts' );
- This reply was modified 3 years, 10 months ago by Gustav.
Forum: Developing with WordPress
In reply to: Random order blog postsAha ok i know what the problem is wait i will answer soon.
- This reply was modified 3 years, 10 months ago by Gustav.
Forum: Developing with WordPress
In reply to: Random order blog posts1. Are those posts or pages?
2. Try to search for all functions.php and place code there.
3. Go to settings click reading check latest post instead of a static page.
- This reply was modified 3 years, 10 months ago by Gustav.
Forum: Developing with WordPress
In reply to: Random order blog postsThis code worked for me. Place it in functions.php
add_action('pre_get_posts','alter_query'); function alter_query($query){ if ($query->is_main_query() && is_home()) $query->set('orderby', 'rand'); //Set the order to random }