Currently Empty: ₨ 0
GeneratePress Designs
GeneratePress Custom Homepage [Design 1]
Home Page Gutenberg Blocks (GenerateBlocks)
1. Hero Banner
<!-- wp:generateblocks/container {"uniqueId":"e0625093","backgroundColor":"#262a2d","textColor":"var(\u002d\u002dbase-3)","isDynamic":true,"blockVersion":4,"spacing":{"marginBottom":"25px"}} -->
<!-- wp:generateblocks/container {"uniqueId":"dd64126f","isDynamic":true,"blockVersion":4,"useGlobalMaxWidth":true,"typography":{"textAlign":"center"},"spacing":{"marginRight":"auto","marginLeft":"auto","paddingTop":"40px","paddingLeft":"20px","paddingRight":"20px","paddingBottom":"40px"}} -->
<!-- wp:generateblocks/headline {"uniqueId":"6a2dc030","element":"h1","blockVersion":3} -->
<h1 class="gb-headline gb-headline-6a2dc030 gb-headline-text">Hi! I'm Mubashir Hassan</h1>
<!-- /wp:generateblocks/headline -->
<!-- wp:generateblocks/headline {"uniqueId":"8cfe4c28","blockVersion":3,"typography":{"fontSize":"30px"}} -->
<h2 class="gb-headline gb-headline-8cfe4c28 gb-headline-text">Learn how to start your successful affiliate marketing journey!</h2>
<!-- /wp:generateblocks/headline -->
<!-- wp:generateblocks/button {"uniqueId":"a8e14927","hasUrl":true,"blockVersion":4,"display":"inline-flex","typography":{"textTransform":"uppercase","letterSpacing":"1px","fontWeight":"900"},"spacing":{"paddingTop":"15px","paddingRight":"20px","paddingBottom":"15px","paddingLeft":"20px"},"borders":{"borderTopWidth":"1px","borderRightWidth":"1px","borderBottomWidth":"1px","borderLeftWidth":"1px","borderTopStyle":"solid","borderRightStyle":"solid","borderBottomStyle":"solid","borderLeftStyle":"solid","borderTopColor":"var(\u002d\u002dbase-3)","borderRightColor":"var(\u002d\u002dbase-3)","borderBottomColor":"var(\u002d\u002dbase-3)","borderLeftColor":"var(\u002d\u002dbase-3)","borderTopColorHover":"var(\u002d\u002dbase-3)","borderRightColorHover":"var(\u002d\u002dbase-3)","borderBottomColorHover":"var(\u002d\u002dbase-3)","borderLeftColorHover":"var(\u002d\u002dbase-3)"},"backgroundColor":"var(\u002d\u002dbase-4)","backgroundColorHover":"#222222","textColor":"#ffffff","textColorHover":"#ffffff"} -->
<a class="gb-button gb-button-a8e14927 gb-button-text" href="https://www.sekhlo.pk/contact-us/">Contact Us</a>
<!-- /wp:generateblocks/button -->
<!-- /wp:generateblocks/container -->
<!-- /wp:generateblocks/container -->
2. Display Featured Post
<!-- wp:generateblocks/container {"uniqueId":"a2567772","isDynamic":true,"blockVersion":4} --> <!-- wp:generateblocks/container {"uniqueId":"3af2ff42","isDynamic":true,"blockVersion":4,"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto","paddingTop":"20px","paddingLeft":"20px","paddingRight":"20px","paddingBottom":"20px"}} --> <!-- wp:generateblocks/headline {"uniqueId":"5b09b8f7","blockVersion":3,"typography":{"textAlign":"center"},"className":"custom-title"} --> <h2 class="gb-headline gb-headline-5b09b8f7 gb-headline-text custom-title">Featured Posts</h2> <!-- /wp:generateblocks/headline --> <!-- wp:generateblocks/grid {"uniqueId":"1a19a716","columns":2,"isDynamic":true,"blockVersion":3} --> <!-- wp:generateblocks/container {"uniqueId":"f4ef07c7","isGrid":true,"gridId":"1a19a716","isDynamic":true,"blockVersion":4,"sizing":{"width":"45%","widthMobile":"100%"}} --> <!-- wp:generateblocks/query-loop {"uniqueId":"f49c0fa7","query":{"post_type":"post","per_page":"1","tax_query":[{"taxonomy":"post_tag","terms":[5],"rest":"tags"}]}} --> <!-- wp:generateblocks/grid {"uniqueId":"d18548b5","columns":1,"horizontalGap":20,"verticalGap":20,"isDynamic":true,"blockVersion":3,"isQueryLoop":true,"lock":{"remove":true}} --> <!-- wp:generateblocks/container {"uniqueId":"9dbe0642","isGrid":true,"isQueryLoopItem":true,"gridId":"d18548b5","isDynamic":true,"blockVersion":4,"sizing":{"width":"100%","widthMobile":"100%","widthTablet":""},"spacing":{"paddingTop":"20px","paddingRight":"20px","paddingBottom":"20px","paddingLeft":"20px","paddingTopMobile":"0px","paddingLeftMobile":"0px","paddingRightMobile":"0px","paddingBottomMobile":"0px"},"lock":{"remove":true,"move":true}} --> <!-- wp:generateblocks/image {"uniqueId":"9c307332","sizeSlug":"large","blockVersion":2,"spacing":{"marginBottom":"20px"},"borders":{"borderTopLeftRadius":"5px","borderTopRightRadius":"5px","borderBottomRightRadius":"5px","borderBottomLeftRadius":"5px"},"useDynamicData":true,"dynamicContentType":"featured-image","dynamicLinkType":"single-post"} /--> <!-- wp:generateblocks/headline {"uniqueId":"1bbfb951","element":"div","blockVersion":3,"typography":{"fontSize":"13px","lineHeight":"","fontWeight":"bold","textTransform":"uppercase","letterSpacing":"0.06em"},"spacing":{"marginBottom":"5px"},"linkColor":"var(\u002d\u002daccent)","linkColorHover":"var(\u002d\u002dcontrast)","useDynamicData":true,"dynamicContentType":"terms","dynamicLinkType":"term-archives","termTaxonomy":"category"} --> <div class="gb-headline gb-headline-1bbfb951 gb-headline-text"></div> <!-- /wp:generateblocks/headline --> <!-- wp:generateblocks/headline {"uniqueId":"13aa874d","element":"h1","blockVersion":3,"typography":{"fontSize":"23px","lineHeight":"1.5em","fontWeight":"bold","fontSizeTablet":"20px","fontSizeMobile":"18px"},"spacing":{"marginBottom":"5px"},"linkColor":"var(\u002d\u002dcontrast)","linkColorHover":"var(\u002d\u002daccent)","useDynamicData":true,"dynamicContentType":"post-title","dynamicLinkType":"single-post"} --> <h1 class="gb-headline gb-headline-13aa874d gb-headline-text"></h1> <!-- /wp:generateblocks/headline --> <!-- wp:generateblocks/container {"uniqueId":"299c4a07","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row"} --> <!-- wp:generateblocks/headline {"uniqueId":"8bb8d87b","element":"div","blockVersion":3,"typography":{"fontSize":"15px"},"spacing":{"marginRight":"5px"},"textColor":"var(\u002d\u002dcontrast-2)"} --> <div class="gb-headline gb-headline-8bb8d87b gb-headline-text">Written by: </div> <!-- /wp:generateblocks/headline --> <!-- wp:generateblocks/headline {"uniqueId":"f29f2c81","element":"div","blockVersion":3,"flexDirection":"row","alignItems":"flex-end","typography":{"fontSize":"15px","fontWeight":"bold"},"spacing":{"marginBottom":"0px","paddingRight":"10px"},"textColor":"var(\u002d\u002dcontrast-2)","useDynamicData":true,"dynamicContentType":"author-name"} --> <div class="gb-headline gb-headline-f29f2c81 gb-headline-text"></div> <!-- /wp:generateblocks/headline --> <!-- wp:generateblocks/headline {"uniqueId":"16f4f349","element":"div","blockVersion":3,"typography":{"fontSize":"15px"},"spacing":{"marginRight":"5px"},"textColor":"var(\u002d\u002dcontrast-2)"} --> <div class="gb-headline gb-headline-16f4f349 gb-headline-text">/</div> <!-- /wp:generateblocks/headline --> <!-- wp:generateblocks/headline {"uniqueId":"13ca27e8","element":"div","blockVersion":3,"typography":{"fontSize":"14px"},"spacing":{"marginBottom":"0px","paddingTop":"1px"},"textColor":"var(\u002d\u002dcontrast-2)","useDynamicData":true,"dynamicContentType":"post-date"} --> <div class="gb-headline gb-headline-13ca27e8 gb-headline-text"></div> <!-- /wp:generateblocks/headline --> <!-- /wp:generateblocks/container --> <!-- wp:generateblocks/headline {"uniqueId":"79696213","element":"p","blockVersion":3,"typography":{"fontSize":"18px","lineHeight":"1.5em","fontWeight":"normal","fontSizeTablet":"20px","fontSizeMobile":"18px"},"spacing":{"marginBottom":"5px","marginTop":"15px"},"linkColor":"var(\u002d\u002dcontrast)","linkColorHover":"var(\u002d\u002daccent)","useDynamicData":true,"dynamicContentType":"post-excerpt","dynamicLinkType":"single-post","useDefaultMoreLink":false,"excerptLength":30} --> <p class="gb-headline gb-headline-79696213 gb-headline-text"></p> <!-- /wp:generateblocks/headline --> <!-- /wp:generateblocks/container --> <!-- /wp:generateblocks/grid --> <!-- /wp:generateblocks/query-loop --> <!-- /wp:generateblocks/container --> <!-- wp:generateblocks/container {"uniqueId":"a0c7225c","isGrid":true,"gridId":"1a19a716","isDynamic":true,"blockVersion":4,"sizing":{"width":"55%","widthMobile":"100%"},"spacing":{"paddingTop":"10px"}} --> <!-- wp:generateblocks/query-loop {"uniqueId":"9ec15509","query":{"post_type":"post","per_page":"4","offset":"1","tax_query":[{"taxonomy":"post_tag","terms":[5],"rest":"tags"}]}} --> <!-- wp:generateblocks/grid {"uniqueId":"f47e0be5","columns":1,"isDynamic":true,"blockVersion":3,"isQueryLoop":true,"lock":{"remove":true}} --> <!-- wp:generateblocks/container {"uniqueId":"cd2629b5","isGrid":true,"isQueryLoopItem":true,"gridId":"f47e0be5","isDynamic":true,"blockVersion":4,"sizing":{"width":"50%","widthMobile":"100%","widthTablet":"50%"},"spacing":{"paddingTop":"10px","paddingRight":"10px","paddingBottom":"10px","paddingLeft":"10px","paddingTopMobile":"0px","paddingLeftMobile":"0px","paddingRightMobile":"0px","paddingBottomMobile":"0px"},"lock":{"remove":true,"move":true}} --> <!-- wp:generateblocks/image {"uniqueId":"7c421484","sizeSlug":"large","blockVersion":2,"spacing":{"marginBottom":"10px"},"borders":{"borderTopLeftRadius":"5px","borderTopRightRadius":"5px","borderBottomRightRadius":"5px","borderBottomLeftRadius":"5px"},"useDynamicData":true,"dynamicContentType":"featured-image","dynamicLinkType":"single-post"} /--> <!-- wp:generateblocks/headline {"uniqueId":"14ccee3d","element":"div","blockVersion":3,"typography":{"fontSize":"13px","lineHeight":"","fontWeight":"bold","textTransform":"uppercase","letterSpacing":"0.06em"},"spacing":{"marginBottom":"5px"},"linkColor":"var(\u002d\u002daccent)","linkColorHover":"var(\u002d\u002dcontrast)","useDynamicData":true,"dynamicContentType":"terms","dynamicLinkType":"term-archives","termTaxonomy":"category"} --> <div class="gb-headline gb-headline-14ccee3d gb-headline-text"></div> <!-- /wp:generateblocks/headline --> <!-- wp:generateblocks/headline {"uniqueId":"db821f62","blockVersion":3,"typography":{"fontSize":"20px","lineHeight":"1.5em","fontWeight":"bold","fontSizeTablet":"20px","fontSizeMobile":"18px"},"spacing":{"marginBottom":"5px"},"linkColor":"var(\u002d\u002dcontrast)","linkColorHover":"var(\u002d\u002daccent)","useDynamicData":true,"dynamicContentType":"post-title","dynamicLinkType":"single-post"} --> <h2 class="gb-headline gb-headline-db821f62 gb-headline-text"></h2> <!-- /wp:generateblocks/headline --> <!-- wp:generateblocks/container {"uniqueId":"d618269b","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row","flexWrap":"nowrap","spacing":{"marginBottom":"","marginBottomMobile":"20px"}} --> <!-- wp:generateblocks/headline {"uniqueId":"9bf10bc7","element":"div","blockVersion":3,"typography":{"fontSize":"15px"},"spacing":{"marginRight":"5px"},"textColor":"var(\u002d\u002dcontrast-2)"} --> <div class="gb-headline gb-headline-9bf10bc7 gb-headline-text">Written by: </div> <!-- /wp:generateblocks/headline --> <!-- wp:generateblocks/headline {"uniqueId":"1b3b2da8","element":"div","blockVersion":3,"flexDirection":"row","alignItems":"flex-end","typography":{"fontSize":"15px","fontWeight":"bold"},"spacing":{"marginBottom":"0px","paddingRight":"10px"},"textColor":"var(\u002d\u002dcontrast-2)","useDynamicData":true,"dynamicContentType":"author-name"} --> <div class="gb-headline gb-headline-1b3b2da8 gb-headline-text"></div> <!-- /wp:generateblocks/headline --> <!-- wp:generateblocks/headline {"uniqueId":"2f1f7c52","element":"div","blockVersion":3,"typography":{"fontSize":"15px"},"spacing":{"marginRight":"5px"},"textColor":"var(\u002d\u002dcontrast-2)","className":"hide-on-tablet"} --> <div class="gb-headline gb-headline-2f1f7c52 gb-headline-text hide-on-tablet">/</div> <!-- /wp:generateblocks/headline --> <!-- wp:generateblocks/headline {"uniqueId":"2ac2a878","element":"div","blockVersion":3,"typography":{"fontSize":"14px"},"spacing":{"marginBottom":"0px","paddingTop":"1px"},"textColor":"var(\u002d\u002dcontrast-2)","useDynamicData":true,"dynamicContentType":"post-date","className":"hide-on-tablet"} --> <div class="gb-headline gb-headline-2ac2a878 gb-headline-text hide-on-tablet"></div> <!-- /wp:generateblocks/headline --> <!-- /wp:generateblocks/container --> <!-- /wp:generateblocks/container --> <!-- /wp:generateblocks/grid --> <!-- /wp:generateblocks/query-loop --> <!-- /wp:generateblocks/container --> <!-- /wp:generateblocks/grid --> <!-- /wp:generateblocks/container --> <!-- /wp:generateblocks/container -->
3. Display Latest Posts
<!-- wp:generateblocks/container {"uniqueId":"9366a1a5","isDynamic":true,"blockVersion":4} -->
<!-- wp:generateblocks/container {"uniqueId":"dcb56b32","isDynamic":true,"blockVersion":4,"useGlobalMaxWidth":true,"spacing":{"marginRight":"auto","marginLeft":"auto","paddingTop":"40px","paddingBottom":"40px","paddingLeft":"20px","paddingRight":"20px"}} -->
<!-- wp:generateblocks/headline {"uniqueId":"a626cd8b","blockVersion":3,"typography":{"textAlign":"center"},"className":"custom-title"} -->
<h2 class="gb-headline gb-headline-a626cd8b gb-headline-text custom-title">Latest Posts</h2>
<!-- /wp:generateblocks/headline -->
<!-- wp:generateblocks/query-loop {"uniqueId":"3058bb33","query":{"post_type":"post","per_page":"9","offset":"1"}} -->
<!-- wp:generateblocks/grid {"uniqueId":"ae47745b","columns":1,"horizontalGap":20,"verticalGap":20,"isDynamic":true,"blockVersion":3,"isQueryLoop":true,"lock":{"remove":true}} -->
<!-- wp:generateblocks/container {"uniqueId":"e7d1bb09","isGrid":true,"isQueryLoopItem":true,"gridId":"ae47745b","isDynamic":true,"blockVersion":4,"sizing":{"width":"33.33%","widthMobile":"100%","widthTablet":"50%"},"spacing":{"paddingTop":"20px","paddingRight":"20px","paddingBottom":"20px","paddingLeft":"20px","paddingTopMobile":"0px","paddingLeftMobile":"0px","paddingRightMobile":"0px","paddingBottomMobile":"0px"},"lock":{"remove":true,"move":true}} -->
<!-- wp:generateblocks/image {"uniqueId":"bc4f91ad","sizeSlug":"large","blockVersion":2,"spacing":{"marginBottom":"30px"},"borders":{"borderTopLeftRadius":"5px","borderTopRightRadius":"5px","borderBottomRightRadius":"5px","borderBottomLeftRadius":"5px"},"useDynamicData":true,"dynamicContentType":"featured-image","dynamicLinkType":"single-post"} /-->
<!-- wp:generateblocks/headline {"uniqueId":"8f8c6158","element":"div","blockVersion":3,"typography":{"fontSize":"13px","lineHeight":"","fontWeight":"bold","textTransform":"uppercase","letterSpacing":"0.06em"},"spacing":{"marginBottom":"5px"},"linkColor":"var(\u002d\u002daccent)","linkColorHover":"var(\u002d\u002dcontrast)","useDynamicData":true,"dynamicContentType":"terms","dynamicLinkType":"term-archives","termTaxonomy":"category"} -->
<div class="gb-headline gb-headline-8f8c6158 gb-headline-text"></div>
<!-- /wp:generateblocks/headline -->
<!-- wp:generateblocks/headline {"uniqueId":"c7a6a5fe","blockVersion":3,"typography":{"fontSize":"23px","lineHeight":"1.5em","fontWeight":"bold","fontSizeTablet":"20px","fontSizeMobile":"18px"},"spacing":{"marginBottom":"5px"},"linkColor":"var(\u002d\u002dcontrast)","linkColorHover":"var(\u002d\u002daccent)","useDynamicData":true,"dynamicContentType":"post-title","dynamicLinkType":"single-post"} -->
<h2 class="gb-headline gb-headline-c7a6a5fe gb-headline-text"></h2>
<!-- /wp:generateblocks/headline -->
<!-- wp:generateblocks/container {"uniqueId":"0662bc2b","isDynamic":true,"blockVersion":4,"display":"flex","flexDirection":"row"} -->
<!-- wp:generateblocks/headline {"uniqueId":"17b484d7","element":"div","blockVersion":3,"typography":{"fontSize":"15px"},"spacing":{"marginRight":"5px"},"textColor":"var(\u002d\u002dcontrast-2)"} -->
<div class="gb-headline gb-headline-17b484d7 gb-headline-text">Written by: </div>
<!-- /wp:generateblocks/headline -->
<!-- wp:generateblocks/headline {"uniqueId":"9e471081","element":"div","blockVersion":3,"flexDirection":"row","alignItems":"flex-end","typography":{"fontSize":"15px","fontWeight":"bold"},"spacing":{"marginBottom":"0px","paddingRight":"10px"},"textColor":"var(\u002d\u002dcontrast-2)","useDynamicData":true,"dynamicContentType":"author-name"} -->
<div class="gb-headline gb-headline-9e471081 gb-headline-text"></div>
<!-- /wp:generateblocks/headline -->
<!-- wp:generateblocks/headline {"uniqueId":"582883c5","element":"div","blockVersion":3,"typography":{"fontSize":"15px"},"spacing":{"marginRight":"5px"},"textColor":"var(\u002d\u002dcontrast-2)"} -->
<div class="gb-headline gb-headline-582883c5 gb-headline-text">/</div>
<!-- /wp:generateblocks/headline -->
<!-- wp:generateblocks/headline {"uniqueId":"62c68c89","element":"div","blockVersion":3,"typography":{"fontSize":"14px"},"spacing":{"marginBottom":"0px","paddingTop":"2px"},"textColor":"var(\u002d\u002dcontrast-2)","useDynamicData":true,"dynamicContentType":"post-date"} -->
<div class="gb-headline gb-headline-62c68c89 gb-headline-text"></div>
<!-- /wp:generateblocks/headline -->
<!-- /wp:generateblocks/container -->
<!-- /wp:generateblocks/container -->
<!-- /wp:generateblocks/grid -->
<!-- /wp:generateblocks/query-loop -->
<!-- wp:generateblocks/container {"uniqueId":"34ff37b7","isDynamic":true,"blockVersion":4,"typography":{"textAlign":"center"}} -->
<!-- wp:generateblocks/button {"uniqueId":"43c91a80","hasUrl":true,"blockVersion":4,"display":"inline-flex","alignItems":"center","columnGap":"0.5em","typography":{"textTransform":"uppercase","fontWeight":"900","letterSpacing":"1px"},"spacing":{"paddingTop":"10px","paddingRight":"20px","paddingBottom":"10px","paddingLeft":"20px","marginTop":"15px"},"borders":{"borderTopWidth":"","borderTopStyle":"","borderRightWidth":"","borderRightStyle":"","borderBottomWidth":"","borderBottomStyle":"","borderLeftWidth":"","borderLeftStyle":"","borderTopColor":"var(\u002d\u002daccent)","borderTopColorHover":"var(\u002d\u002dcontrast-3)","borderRightColor":"var(\u002d\u002daccent)","borderBottomColor":"var(\u002d\u002daccent)","borderLeftColor":"var(\u002d\u002daccent)","borderLeftColorHover":"var(\u002d\u002dcontrast-3)","borderRightColorHover":"var(\u002d\u002dcontrast-3)","borderBottomColorHover":"var(\u002d\u002dcontrast-3)","borderTopLeftRadius":"5px","borderBottomRightRadius":"5px","borderTopRightRadius":"5px","borderBottomLeftRadius":"5px","borderRightLeftRadius":"5px","borderLeftLeftRadius":"5px","borderRightRightRadius":"5px","borderLeftRightRadius":"5px"},"backgroundColor":"var(\u002d\u002dbase-4)","backgroundColorHover":"var(\u002d\u002daccent)","textColor":"var(\u002d\u002dbase-3)","textColorHover":"var(\u002d\u002dbase-3)","gradientDirection":90,"gradientColorOne":"var(\u002d\u002daccent)","gradientColorTwo":"rgba(0, 0, 0, 0.30)","iconLocation":"right","iconPaddingRight":"","iconPaddingLeft":"0.5","iconStyles":{"height":"1.8em","width":"1.8em"},"dynamicLinkType":"single-post"} -->
<a class="gb-button gb-button-43c91a80 gb-button-text" href="https://www.sekhlo.pk/blog/">Read All Article</a>
<!-- /wp:generateblocks/button -->
<!-- /wp:generateblocks/container -->
<!-- /wp:generateblocks/container -->
<!-- /wp:generateblocks/container -->
Custom CSS Code
.custom-title::after {
background-color: var(--contrast);
content: '';
display: block;
height: 3px;
margin: 30px auto 40px;
width: 60px;
}
.wpf-popup-contact-form input,
.wpf-popup-contact-form textarea {
width: 100%;
}
.wpf-popup-contact-form {
width: 500px;
}
.single-featured-image {
margin-top: 25px;
}
.gp-custom-tag-section {
margin-top: 20px;
}
.button.tag {
font-size: 15px;
padding: 7px 15px;
border-radius: 8px;
margin-right: 5px;
}
PHP Code Snippets
Site Customization Code
add_action( 'generate_after_content','wpf_gp_custom_display_tags' );
if( !function_exists('wpf_gp_custom_display_tags')) {
function wpf_gp_custom_display_tags() {
if(is_single()) {
$post_tags = get_the_tags( get_the_ID() );
$tags_content = '<div class="gp-custom-tag-section">';
if( $post_tags ) {
foreach($post_tags as $tag) {
$tag_link = get_tag_link( $tag->term_id );
$tags_content = $tags_content . '<a class="button tag" href="'. $tag_link .'">' . $tag->name . '</a>';
}
}
$tags_content = $tags_content . '</div>';
echo $tags_content;
}
}
}
add_action( 'generate_after_entry_header','wpf_gp_custom_thumbnail_image' );
if( !function_exists('wpf_gp_custom_thumbnail_image')) {
function wpf_gp_custom_thumbnail_image() {
if(is_single()) {
$feat_image = wp_get_attachment_url( get_post_thumbnail_id(get_the_ID()) );
echo '<img class="single-featured-image" src="'.$feat_image.'"></img>';
}
}
}
if( !function_exists('wpf_gp_custom_before_title')) {
function wpf_gp_custom_before_title() {
$post_categories = wp_get_post_categories(get_the_ID(), [ 'fields' => 'all' ]);
$category_content = 'Category: ';
if( $post_categories ) {
foreach($post_categories as $c) {
$category_link = get_category_link( $c->term_id );
$category_content = $category_content . '<a href="'. $category_link .'">' . $c->name . '</a>' . ' / ';
}
$category_content = rtrim($category_content, ' / ');
}
return $category_content;
}
}
add_filter( 'generate_post_date_output','wpf_gp_custom_add_to_post_date' );
if( !function_exists('wpf_gp_custom_add_to_post_date')) {
function wpf_gp_custom_add_to_post_date( $output ) {
return '<div class="gp-post-date-author">' . $output;
}
}
add_filter( 'generate_post_author_output','wpf_gp_custom_add_to_post_author' );
if( !function_exists('wpf_gp_custom_add_to_post_author')) {
function wpf_gp_custom_add_to_post_author( $output ) {
$output = $output . wpf_gp_custom_before_title();
return $output . '</div>';
}
}
add_filter( 'generate_leave_comment','wpf_gp_custom_remove_comment_link' );
if( !function_exists('wpf_gp_custom_remove_comment_link')) {
function wpf_gp_custom_remove_comment_link() {
return false;
}
}
add_filter( 'generate_show_comments', '__return_false' );
add_filter( 'generate_show_tags', '__return_false' );
add_filter( 'generate_show_categories', '__return_false' );
add_filter( 'generate_excerpt_more_output', 'wpf_gp_custom_read_more' );
if( !function_exists('wpf_gp_custom_read_more')) {
function wpf_gp_custom_read_more() {
return '<div class="read-more-section"><a class="custom-readmore-button" href="'.get_permalink(get_the_ID()).'">Continue Reading →</a></div>';
}
}
add_action( 'after_setup_theme','wpf_gp_remove_featured_image' );
if( !function_exists('wpf_gp_remove_featured_image')) {
function wpf_gp_remove_featured_image() {
remove_action( 'generate_before_content', 'generate_featured_page_header_inside_single', 10 );
}
}
GeneratePress Custom Copyright Text
add_filter( 'generate_copyright','wpframer_gp_custom_copyright' );
if (!function_exists('wpframer_gp_custom_copyright')) {
function wpframer_gp_custom_copyright() {
$year = date("Y");
?>
© <?php echo $year ?> Sekhlo.pk | Mubashir Hassan • All Rights Reserved!
<?php
}
}