Ben Lonsdale
  • Member for 5 years
  • Last seen this week
  • Preston, United Kingdom
Environment independent way to link to certain pages on frontend
0 votes

There are a few ways to do this: get_permalink( get_page_by_path( 'slug-goes-here' ) ) get_permalink( get_page_by_title( 'title-goes-here' ) ) home_url( '/slug-goes-here/' ) Any of the above will ...

View answer
Return only post(s) which have post_excerpt
Accepted answer
0 votes

Something along these lines should work, not tested for syntax errors though function random_post() { $args = array( 'post_type' => 'post', 'orderby' =&...

View answer
Building a Article Library within WP?
0 votes

This could be achieved with custom fields or a custom table in the wpdb. Using ACF (Advanced Custom fields) you could assign a checkbox, or some field to each article and you can allow logged in ...

View answer
Issues Adding a jQuery Image Slider
0 votes

Would add this as a comment but not high enough reputation. Try removing the $ from the function($), I have had this cause unexpected issues in wordpress before

View answer
remove/hide pages from users backend
0 votes

Edit: Sorry I think I got the wrong end of the stick on this question! This method is for removing menu page. I think a simpler method might be: add_action( 'admin_init', 'my_remove_menu_pages' ); ...

View answer