This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<title>meteor_servercall</title> | |
</head> | |
<body> | |
{{> simple}} | |
{{> passData}} | |
</body> | |
<template name="simple"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Solution to order first by date, then by start time (both are meta values) | |
* http://wordpress.stackexchange.com/a/67391/5045 | |
* */ | |
add_action( 'pre_get_posts', 'pre_get_posts_programpunkter' ); | |
function pre_get_posts_programpunkter( $query ) { | |
if( !is_admin() && is_post_type_archive( 'programpunkt' ) && $query->is_main_query() ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
angular.module('wordpress', []) | |
.service( 'wpService', | |
function($http, $q){ | |
var url = 'http://allin.local/wp-json/'; | |
return({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Usage for a custom post type named 'movies': | |
* unregister_post_type( 'movies' ); | |
* | |
* Usage for the built in 'post' post type: | |
* unregister_post_type( 'post', 'edit.php' ); | |
*/ | |
function unregister_post_type( $post_type, $slug = '' ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'the_content', function( $content ) { | |
$response = wp_remote_get( 'http://ben.lobaugh.net/wp-json/posts' ); | |
if( '200' == wp_remote_retrieve_response_code( $response ) ) { | |
$posts = json_decode( wp_remote_retrieve_body( $response ) ); | |
foreach( $posts AS $p ) { | |
echo $p->title->rendered . "<br/>"; |
NewerOlder