wp_editor customization

What you can do is use the get_current_screen() function to get what screen the current user is on ( in the admin panel ) and only add those global values whenever the user is viewing the post page: function my_format_TinyMCE( $in ) { $screen = get_current_screen(); if( is_object( $screen ) && ‘post’ == $screen->post_type ) … Read more

Password protected Page add_filter to change the text doesn’t work

I use the wordpress theme wpcasa and the theme change the standard text of wordpress. So I included a filter hook of the theme: add_filter( ‘the_password_form’, ‘wpsight_password_form_dmd’ ); function wpsight_password_form_dmd($output){ global $post; $output=””; $aktuelleseite = $_SERVER[‘REQUEST_URI’]; $sprache = explode(“https://wordpress.stackexchange.com/”,$aktuelleseite); $label=”pwbox-“.( empty( $post->ID ) ? rand() : $post->ID ); $output=”<form action=”” . get_option( ‘siteurl’ ) . … Read more

Post filter Month dropdown at front-end like wordpress backend

wp_get_archives creates its links with the function get_archives_link. this function returns plain HTML, but it has a filter you can hook into. You can use the get_archives_link filter to manipulate your HTML with some regex. function my_archives_link($link_html) { //TODO: my regex to manipulate the HTML return $link_html; } add_filter(‘get_archives_link’,’my_archives_link’) Further reading wp_get_archives get_archives_link Filter Hook: … Read more

How to sort posts according to meta value?

‘meta_key=keyname’ must also be present in the query so I think you’d want $args = array( ‘meta_query’ => array( array( ‘key’ => ‘wpcf-stream’, ‘value’ => $_POST[‘category’], ‘compare’ => ‘=’ ) ), ‘orderby’ => ‘meta_value’, ‘meta_key’ => ‘wpcf-stream’, ‘post_type’ => ‘half-day-course’, ‘posts_per_page’ => 100, ‘order’ => ‘ASC’ ); to display the rest of the posts I’d … Read more

WP Job Manager – display search results from custom search form in taxonomy-job_listing_category page

This is the finally code that is working like a chram <?php $taxonomy = get_taxonomy( get_queried_object()->taxonomy ); $term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) ); get_header(); ?> <h1 class=”page-title”>Θέσεις εργασίας για <?php echo $term->name; ?></h1> <div id=”content”> <article id=”post-<?php the_ID(); ?>” <?php post_class(‘post’); ?>> <?php echo do_shortcode(‘[jobs categories=”.get_query_var(“job_listing_category’).’ show_filters=”true”]’); ?> </article> </div> … Read more