View shortcode-render-tax-terms.php
<?php | |
/** | |
* Shortcode: [pp_tax_list] to render an unlinked list of taxonomy terms assigned | |
* to the current object. | |
* | |
* How to use: [pp_tax_list tax='<taxonomy>'] | |
* Optional params are: | |
* display='list|string' defaults to list | |
* wrapper_class='pp-tax-list' any css classes that are needed on the wrapper div. | |
* |
View wp-oembed-disable-dnt.php
<?php | |
/** | |
* Remove Do Not Track Attribute from URLs of embeds like Videos. | |
* | |
* @param string $provider oembed Provider | |
* @param string $url embed url | |
* @param array $args embed args | |
* | |
* @return string $url with custom add-ons. | |
*/ |
View ld-hide-progress.css
.logged-in .ld-progress { | |
display: none; | |
} | |
/* .ld-progress might hase to be changed, depending on your theme */ |
View rankmath-faq-accordion.css
#rank-math-faq .rank-math-list-item { | |
margin-bottom: 1em; | |
margin-top: 1em; | |
border-bottom: 1px solid #fff; | |
} | |
.rank-math-question { | |
cursor: pointer; | |
position: relative; | |
display: block; |
View functions-snippet-hide-cpt-search.php
<?php | |
/** | |
* Hide CPT from Search | |
*/ | |
function update_my_custom_type() { | |
global $wp_post_types; | |
if ( post_type_exists( 'wpm-testimonail' ) ) { |
View render-reusable-block.php
<?php | |
/** | |
* Renders content before the blog starts. Using a reusable gutenberg block. | |
*/ | |
function generate_blog_intro() { | |
/** | |
* Make sure we are on the posts page. | |
*/ | |
if ( is_home() ) { | |
/** |
View functions.php
<?php | |
function wti_loginout_menu_link( $items, $args ) { | |
if ($args->theme_location == 'primary') { // Adjust this to the menu location. | |
if (is_user_logged_in()) { | |
$items .= '<li class="right"><a href="'. wp_logout_url() .'">'. __("Log Out", "textdomain") .'</a></li>'; | |
} | |
} | |
return $items; | |
} |
View .htaccess
RewriteCond %{REQUEST_FILENAME} -s | |
RewriteRule ^wp-content/uploads/(.*)$ dl-file.php?file=$1 [QSA,L] | |
NewerOlder