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
<!-- ... --> | |
<ul> | |
<li ng-repeat="post in posts"> | |
<a href="blog/{{post.ID}}" ng-bind-html="post.title"></a> | |
<a href="blog/{{post.ID}}" ng-if="post.featured_image.attachment_meta.sizes.thumbnail.url"><img ng-src="{{post.featured_image.attachment_meta.sizes.thumbnail.url}}" alt="{{post.featured_image.title}}" /></a> | |
<div ng-bind-html="post.excerpt"></div> | |
</li> | |
</ul> |
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 | |
//... | |
function my_add_link_target( $html ) { | |
$html = preg_replace( '/(<a.*")>/', '$1 target="_self">', $html ); | |
return $html; | |
} | |
add_filter( 'image_send_to_editor', 'my_add_link_target', 10 ); |
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 | |
/** | |
* Load the template data from a file (file must be .html or .htm ) | |
*/ | |
//load from child theme or parent theme | |
$file = 'template.html'; | |
echo caldera_metaplate_from_file( $file, $post_id ); | |
//or use absolute patth | |
//$file = __FILE__ . '/template.html'; |
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
//... | |
//Main controller | |
app.controller('Main', ['$scope', '$http', function($scope, $http) { | |
$http.get('wp-json/posts/').success(function(res){ | |
$scope.posts = res; | |
document.querySelector('title').innerHTML = 'Home | AngularJS Demo Theme'; | |
}); | |
}]); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<base href="/jsonapi/"> | |
<title>AngularJS Demo Theme</title> | |
<?php wp_head(); ?> | |
</head> | |
<body> | |
<div id="page" ng-app="app"> | |
<header> |
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
<h1 ng-bind-html="post.title"></h1> | |
<div ng-bind-html="post.content"></div> |
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
<div class="entry-content clear"> | |
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'ryu' ) ); ?> | |
</div><!-- .entry-content --> |
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
<div class="entry-content clear"> | |
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'ryu' ) ); ?> | |
<?php | |
wp_link_pages( array( | |
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'ryu' ) . '</span>', | |
'after' => '</div>', | |
'link_before' => '<span>', | |
'link_after' => '</span>', | |
) ); | |
?> |
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
Find me 5 "freelance" web developers in [Location]: | |
1. the quality of their work should be equal or better than [a link to a website of one of my interviewees] | |
2. so they must have a website with their portfolio | |
3. can be web designers who can code (front-end development) | |
4. They must work solo, that means they'll use "About me" rather than "About us" on their websites. |
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 | |
function my_pre_get_posts( $query ) { | |
if ( ! is_user_logged_in() ) { | |
$query->set( 'post_type', '404' ); // Do something that you'll never get results | |
return; | |
} | |
} | |
add_action( 'pre_get_posts', 'my_pre_get_posts' ); |