Skip to content

Instantly share code, notes, and snippets.

View feliciaceballos's full-sized avatar

Felicia Ceballos-Marroquin feliciaceballos

View GitHub Profile
@feliciaceballos
feliciaceballos / custom_login_page.php
Last active March 12, 2019 07:08
Removes the "Back to" Link from WordPress Login Page
<?php
//Here's my custom CSS that removes the back link in a function
function my_login_page_remove_back_to_link() { ?>
<style type="text/css">
body.login div#login p#backtoblog {
display: none;
}
</style>
<?php }
@feliciaceballos
feliciaceballos / style-login.css
Last active March 12, 2019 07:08
Change Login Page Button Color
body.login div#login form#loginform p.submit input#wp-submit {
background-color:#17a8e3 !important;
}
@feliciaceballos
feliciaceballos / login-style.css
Last active March 12, 2019 07:07
Customize the login label
body.login div#login form#loginform input {
font-size: 15px;
color: #555555;
}
@feliciaceballos
feliciaceballos / style-login.css
Last active March 12, 2019 07:07
Customize WordPress Login Page Button
body.login div#login form#loginform p.submit input#wp-submit {
background-color:#17a8e3 !important;
color: #ffffff;
border: 1px solid #0d9ed9;
margin: 10px 10px 10px 10px;
}
@feliciaceballos
feliciaceballos / functions.php
Created February 28, 2019 23:35
Get posts from multiple blogs
<?php
//* Display posts from other blogs with WordPress REST API
function fc_display_posts_from_other_blogs() {
// trying to get value from the cache
if( false == $allposts = get_transient( 'misha_remote_cache' ) ) {
// it will be the array with all posts
$allposts = array();
// get the first website latest posts
@feliciaceballos
feliciaceballos / functions.php
Last active February 28, 2019 23:28
List of Posts with clickable title
<?php
// print posts
foreach( $allposts as $remote_post ) {
$timestamp = strtotime( $remote_post->date_gmt );
$date = gmdate("m/d/y",$timestamp);
echo '<p><a href="' .$remote_post->link.'">'.$remote_post->title->rendered.'</a> ' . $date . '</p>';
}
@feliciaceballos
feliciaceballos / page_writing_index.php
Created February 28, 2019 23:20
Genesis Page Index
<?php
/*
Template Name: Writing Index
*/
//* Adds a CSS class to the body element
add_filter( 'body_class', 'bbs_index_body_class' );
function bbs_index_body_class( $classes ) {
@feliciaceballos
feliciaceballos / wpmu-dev-forminator-submissions-dashboard-widget-06.php
Last active November 7, 2018 19:31
Create the WPMU DEV Forminator Recent Submissions Dashboard Widget, Verifying User Permissions
<?php
/**
* Setup permissions here if needed
*
* @return bool
*/
public function user_allowed() {
return true;
}
@feliciaceballos
feliciaceballos / wpmu-dev-forminator-submissions-dashboard-widget-02.php
Last active October 29, 2018 21:44
Create the WPMU DEV Forminator Recent Submissions Dashboard Widget, Creating the Widget
<?php
function forminator_dash_widget() {
// Widget should be added after `wp_dashboard_setup` hook called.
add_action( 'wp_dashboard_setup', 'add_forminator_dash_widget' );
}
function add_forminator_dash_widget() {
// Instantiate Forminator_Submissions_Dash_Widget class.
$widget = Forminator_Submissions_Dash_Widget::get_instance();
$widget->register_widget();
@feliciaceballos
feliciaceballos / wpmu-dev-forminator-submissions-dashboard-widget-03.php
Last active October 29, 2018 21:44
Create the WPMU DEV Forminator Recent Submissions Dashboard Widget, Creating the Class
<?php
/**
* Class Forminator_Submissions_Dash_Widget.
*
*/
class Forminator_Submissions_Dash_Widget {
/**
* Class instance
*