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 | |
/* | |
* Check if the current pae is a direct child of another page. | |
* Accept's page ID, page slug or page title as parameters to identify the parent. | |
*/ | |
/* Add the following code in the theme's functions.php */ | |
function is_child( $parent = '' ) { | |
global $post; |
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 | |
/* | |
* Unified variables | |
*/ | |
$charset = 'UTF-8'; | |
$collate = ''; | |
/* | |
* Set variables conditianlly based on current environment |
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
# Your keymap | |
# | |
# Atom keymaps work similarly to style sheets. Just as style sheets use | |
# selectors to apply styles to elements, Atom keymaps use selectors to associate | |
# keystrokes with events in specific contexts. Unlike style sheets however, | |
# each selector can only be declared once. | |
# | |
# You can create a new keybinding in this file by typing "key" and then hitting | |
# tab. | |
# |
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
/* CSS Snippet For Responsive Table - Stylized */ | |
/* Basic */ | |
* { | |
box-sizing: border-box; | |
} | |
table { | |
border-spacing: 0px; |
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
/* CSS Snippet For Responsive Table - Basic */ | |
* { | |
box-sizing: border-box; | |
} | |
table { | |
border-spacing: 0px; | |
border-collapse: collapse; | |
width: 100%; |
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 | |
/* | |
* Line break in WordPress meta box text area: the PHP way | |
*/ | |
echo nl2br( esc_html( get_post_meta( get_the_ID(), 'my-meta-field', true) ) ); | |
?> |
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 | |
/* | |
* Line break in WordPress meta box text area: the CSS way | |
*/ | |
?> | |
<p class="whitespace"> | |
<?php echo esc_html( get_post_meta( get_the_ID(), 'my-meta-field', true) ); ?> | |
</p> |
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
{* Create a custom page in PrestaShop without CMS - Custom Page Temaplate *} | |
{* Read the detailed tutorial at https://www.linkedin.com/pulse/prestashop-how-create-custom-page-without-cms-iftakhar-hasan/ *} | |
<div> | |
<!-- Your HTML elements go here --> | |
</div> | |
{literal} | |
<style type="text/css"> | |
/* Your CSS goes here */ |
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 | |
/* Create a custom page in PrestaShop without CMS - Custom Page File | |
* Read the detailed tutorial at https://www.linkedin.com/pulse/prestashop-how-create-custom-page-without-cms-iftakhar-hasan/ | |
*/ | |
include(dirname(__FILE__).'/config/config.inc.php'); | |
Tools::displayFileAsDeprecated(); | |
include(dirname(__FILE__).'/header.php'); |
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 | |
/* Create a custom page in PrestaShop without CMS - CustomPageController class | |
* Read the detailed tutorial at https://www.linkedin.com/pulse/prestashop-how-create-custom-page-without-cms-iftakhar-hasan/ | |
*/ | |
/* The classname here will be the name of the controller */ | |
class CustomPageController extends FrontController{ | |
public function init(){ |