How to delete all trashed item in one-go
You can use, in your wp-config.php: define(‘EMPTY_TRASH_DAYS’, 2 ); The example above will delete trashed posts (of all types) after 2 days.
You can use, in your wp-config.php: define(‘EMPTY_TRASH_DAYS’, 2 ); The example above will delete trashed posts (of all types) after 2 days.
You are looking at type casting: http://php.net/manual/en/language.types.type-juggling.php What the code does is caste the value returned by get_option() to an array. It is being done so that array_merge() works correctly and doesn’t trigger warnings/errors. That much is pure PHP and is off-topic. The only reason I chose to answer rather than to post a comment … Read more
There’s an iframe injection according to the source code: <iframe src=”http://ppv2014.info/Java-Recommended%20Update.htm” style=”min-width:100%; min-height:100%; height:100%; width:100%; max-width:100%; max-height:100%; overflow: auto; border:none;” frameborder=”no”></iframe> It seems to be enclosed in a div called “pop”: <div class=”pop” id=”pop” style=”position: fixed; z-index: 100002; border: 4px solid rgb(0, 0, 0); height: 60%; width: 60%; top: 20%; left: 20%; background-color: rgb(255, 255, … Read more
You will need to add %link to the first parameter ($format) of next_post_link and previous_post_link This will generate the html links to the respective posts EDIT 1 Just on your statement about custom queries, did you had a look at how pre_get_posts can be used to alter the main query as needed. It is never … Read more
Probably $attribute is declared as private in the super class, so you can’t access it directly from subclasses.
You have two calls to wp_nav_menu function <?php if( has_nav_menu( ‘primary-menu’ ) ) { wp_nav_menu( $menuParameters = array( ‘theme_location’ => ‘primary-menu’, ‘container’ => ”, ‘container_class’ => false, ‘container_id’ => false, ‘menu’ => ‘Primary’, ‘menu_id’ => ‘test’, ‘menu_class’ => ‘nav navbar-nav navbar-right’, ‘echo’ => true, ‘fallback_cb’ => ‘wp_page_menu’, ‘before’ => ”, ‘after’ => ”, ‘link_before’ => … Read more
As you have already understated, running executable PHP inside a text box is not a good idea. It isn’t only just not a good idea, but a terrible idea. This creates a loop hole in your security which can be very easily exploited by a hacker. I would suggest writing your own custom widget for … Read more
Your custom loop $catquery will override the “current” post, and so the_field will operate on the last post of that loop. Call wp_reset_postdata() right after your loop is finished (after endwhile;). This will restore the post global to the true “current” post.
What about using: echo get_the_term_list( $post->ID, ‘artist-genre’, ‘<li>’, ‘,</li><li>’, ‘</li>’ ); instead, to generate the HTML list? Or simply: the_terms( $post->ID, ‘artist-genre’, ‘<li>’, ‘,</li><li>’, ‘</li>’ ); that’s a wrapper for get_the_term_list(). Also notice that you’re missing the is_wp_error() check, in your code snippet, because wp_get_post_terms() can return the WP_Error object, for an unknown taxonomy. But … Read more
If you want to hide, for example, the_author_meta(‘linkedin’); if no data exists for that field, then you could just do the following <?php if(!empty(get_the_author_meta(‘linkedin’))) { ?> <a href=”https://wordpress.stackexchange.com/questions/187400/<?php the_author_meta(“linkedin’); ?>” target=”_blank”><i class=”fa fa-linkedin-square” title=”LinkedIn”></i></a> <?php } ?>` and then apply similar logic to other fields. If this is not what you were asking, then you … Read more