This file contains hidden or 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 | |
| require_once($_SERVER['DOCUMENT_ROOT'] . '/wp-load.php'); | |
| $args = array( | |
| 'numberposts' => 10, | |
| 'post_type' => 'ag_location', | |
| 'post_status' => 'publish', | |
| 'suppress_filters' => true | |
| ); | |
This file contains hidden or 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 change_yoast_seo_og_meta() { | |
| add_filter( 'wpseo_opengraph_desc', 'change_desc' ); | |
| } | |
| function change_desc( $desc ) { | |
| // This article is actually a landing page for an eBook | |
| if( is_singular( 123 ) ) { |
This file contains hidden or 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 | |
| /********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
| /* Change size for Yoast SEO OpenGraph image for all content | |
| * Credit: Yoast Development team | |
| * Last Tested: May 19 2020 using Yoast SEO 14.1 on WordPress 5.4.1 | |
| * Accepts WordPress reserved image size names: 'thumb', 'thumbnail', 'medium', 'large', 'post-thumbnail' | |
| * Accepts custom image size names: https://developer.wordpress.org/reference/functions/add_image_size/ | |
| */ | |
This file contains hidden or 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
| function fws_admin_posts_filter( $query ) { | |
| global $pagenow; | |
| if ( is_admin() && $pagenow == 'edit.php' && !empty($_GET['my_parent_pages'])) { | |
| $query->query_vars['post_parent'] = $_GET['my_parent_pages']; | |
| } | |
| } | |
| add_filter( 'parse_query', 'fws_admin_posts_filter' ); | |
| function admin_page_filter_parentpages() { | |
| global $wpdb; |
This file contains hidden or 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 | |
| add_filter( 'wpseo_schema_webpage', 'change_schema_ref', 11, 2 ); | |
| function change_schema_ref( $piece ) { | |
| $linkstring ='https://www.agespace.org'.$_SERVER['REQUEST_URI']; | |
| $piece['@id']=$linkstring; |
This file contains hidden or 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
| .woocommerce.single-product .product .summary .variations { | |
| width: 100%; | |
| } | |
| .woocommerce.single-product .product .summary .variations td { | |
| display: block; | |
| width: 100%; | |
| } | |
| .woocommerce.single-product .product .summary .variations td label { | |
| font-family: 'Nunito', Helvetica, Arial, sans-serif; | |
| letter-spacing: 0px; |
This file contains hidden or 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
| //https://stackoverflow.com/questions/3586401/cant-decode-json-string-in-php | |
| $json = stripslashes('{\"json\":[{\"username\":\"1062576\",\"accountId\":\"45656565\"}]}'); | |
| $postarray = json_decode($json); | |
| print_r($postarray); |
This file contains hidden or 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
| //https://stackoverflow.com/a/26744533/861265 | |
| function getURLParams(url){ | |
| var p={}; | |
| url.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(s,k,v){p[k]=v}) | |
| return p; | |
| } |
This file contains hidden or 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
| Steps to download, compile, and install are as follows (I'm installing version 1.0.1g below; please replace "1.0.1g" with your version number): | |
| Step – 1 : Downloading OpenSSL: | |
| Run the command as below : | |
| $ wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz | |
| Also, download the MD5 hash to verify the integrity of the downloaded file for just varifacation purpose. In the same folder where you have downloaded the OpenSSL file from the website : |