Skip to content

Instantly share code, notes, and snippets.

View MrJSdev's full-sized avatar
🎯
Loading JS

Riyaz Khan MrJSdev

🎯
Loading JS
View GitHub Profile
@MrJSdev
MrJSdev / output.html
Last active May 10, 2017 11:18
The output results of splitting names into array. The full guide is available at the http://extracatchy.net/split-comma-delimited-string-into-array-php/
Array
(
[0] => Kavin
[1] => Arbaz
[2] => Salim
[3] => Neha
[4] => Nisha
)
@MrJSdev
MrJSdev / page.php
Last active April 17, 2017 05:26
The following code is the slider revolution functions of adding slide into your wordpress backend page. In simple terms adding slider without shortcode. This full guide are available at http://extracatchy.net/add-a-revolution-slider-without-using-a-shortcode-or-widget/
<!-- Load the slider with "slider-name" alias every time -->
<?php putRevSlider("slider-name") ?>
<!-- Load the slider with "slider-name" alias only on the homepage only -->
<?php putRevSlider("slider-name", "homepage") ?>
<!-- Load the slider with "slider-name" alias only on a specific page (page id should be entered) -->
<?php putRevSlider("slider-name", "2") ?>
<!-- Load the slider with "slider-name" alias only on a range of pages id -->
<?php
//* do not include the opening php tag. Just copy below code.
fundction ec_custom_post_navigation()
{
?>
<div class="prev_next">
<div class="nav_left">
<span class="prev">Previous Post</span> <?php previous_post_link('%link', '%title'); ?>
@MrJSdev
MrJSdev / styles.css
Last active April 17, 2017 19:48
The css styling to Next and Previous button of Genesis Theme. The full guide are available at http://extracatchy.net/add-next-previous-post-button-genesis-theme/
.prev_next
{
overflow: auto;
margin: 10px 0;
padding: 5px 0;
}
.prev_next span.next
{
border-bottom: 1px solid #f4f4f4;
font-weight:600;
<?php
$array = str_split("0123456789bcdfghjkmnpqrstvwxyz");
<?php
$array = str_split("aabbccdd", 2);
// $array[0] = aa
// $array[1] = bb
// $array[2] = cc etc ...
<?php
$string = "hello";
echo $string[1];
// outputs "e"
@MrJSdev
MrJSdev / split.php
Last active May 10, 2017 11:09
Remove genesis menu link http://extracatchy.net/blog/
<?php
//* Don't include the opening php tag.
//* Remove Genesis menu link
remove_theme_support( 'genesis-admin-menu' );
@MrJSdev
MrJSdev / functions.php
Last active May 6, 2017 02:53
The guide of using this code is pubblished at the link http://extracatchy.net/customize-read-more-link-genesis-theme/
<?php
// do not include the open tag. Just copy the below shown code
//* Modify the Genesis content limit read more link
add_filter( 'get_the_content_more_link', 'ec_read_more_link' );
function ec_read_more_link() {
return '... <a class="more-link" href="' . get_permalink() . '">[Continue Reading...]</a>';
}
@MrJSdev
MrJSdev / functions.php
Created May 7, 2017 14:34
This is the post word length code which guide I have posted at http://extracatchy.net
<?php
//*Do not include the open php tag.
//* Modify the length of post excerpts in WP Themes
add_filter( 'excerpt_length', 'ec_excerpt_length' );
function ec_excerpt_length( $length ) {
return 45; // pull first 45 words
}