WordPress Development Weekly Newsletter
WordPress Development Weekly Newsletter

Top new questions this week:

Validate alt text for attachments?

How can I require users to enter alt text when adding attachments? Alt text is surprisingly buried; the only way I've been able to retrieve the alt text at all is via the wp_get_attachment_image() ...

<attachments> <wp-get-attachment-image>  
asked by niteshade 4 votes
answered by Howdy_McGee 0 votes

How to wrap submit button of comment form with div

Is there a way to wrap the submit button with html element while using wordpress function comment_form function. $comments_args = array( 'id_form' => 'main-contact-form', ...

<comments> <comment-form> <comments-template>  
asked by asis Stha 4 votes
answered by bravokeyl 3 votes

(un)wptexturize() -- is it possible?

I have some text stored in a string $text that's filtered through the_content and therefore, wptexturize(). wptexturize() is a function that replaces various characters into more prettier ones. Is ...

<characters>  
asked by Christine Cooper 4 votes
answered by birgire 2 votes

PHP Script to Download Latest PLUGIN Version

I use the following code in my PHP script to automatically download the latest version of WordPress... $wordpress_zip_file_url = 'https://wordpress.org/latest.zip'; file_put_contents("wordpress.zip", ...

<plugins>  
asked by cpcdev 3 votes
answered by jgraup 4 votes

get_terms showing link to category even if all posts are drafts

i have this code below to show links for my custom taxonomy on my custom posts. I want it to show only the categories that have published posts in them. This mostly works but if i put all the posts ...

<custom-taxonomy> <get-terms>  
asked by rudtek 3 votes
answered by Twerking N00b 2 votes

Add post/page ID to inserted links within the_content

Within the main content editor of posts and pages, we can insert multiple links to other posts/pages: <a href="http://example.com/hello-world/">Hello World</a> What I am trying to do is ...

<filters> <the-content>  
asked by Glen Mossong 3 votes
answered by Glen Mossong 0 votes

How do I save custom options on the options page 'Reading'?

I want to add some options to the default "Reading" options page. The code I have is: add_settings_section("section_share", __("Sharing & Publishing", "honeycomb-wp"), ...

<settings-api>  
asked by Evert 3 votes
answered by Evert 0 votes

Greatest hits from previous weeks:

How to retrieve the slug of current page?

I am trying to retrieve the slug of the current wordpress page outside the loop. The title of the page returns with wp_title () but how can I get the slug? <li><a ...

<php> <pages> <slug>  
asked by sarytash 21 votes
answered by Arvind Pal 45 votes

If is custom post type

I am looking for a way to test if a post is a custom post type. For example, in say the sidebar I can put code like this: if ( is_single() ) { // code here } I want code testing for only a ...

<custom-post-types> <conditional-content> <conditional-tags>  
asked by Adam Thompson 50 votes
answered by Szymon Skulimowski 74 votes

Can you answer these?

Following Web Performance Optimization techniques to output static and dynamic css

I have always felt the way styles are handled in WordPress is not optimal regarding the web performance optimization (WPO) techniques that are related to css. From a theme developer point of view, ...

<theme-development> <css> <theme-options> <stylesheet>  
asked by Luis Sanz 1 vote

Editable form for WordPress plugin options page

For my new plugin Scripts and Tags Manager I want to add the possibility for the users to edit rows and add / remove rows. Each row is a form element that contains a text field for the dynamic ...

<plugins> <plugin-development>  
asked by Daniel Mulder 1 vote

The word 'exit' in a content box causes WordPress to serve a 'Not Found' page

I've been developing with WordPress for years, and this is a new one. When the word 'exit' is included in the content of a post, even if inside another word like 'complexity', the post will not save. ...

<database> <sql>  
asked by Kirk Hadden 1 vote
Subscribe to more Stack Exchange newsletters


Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3