wp_dropdown_pages default value

I would suggest, that you switch from “URl query argument” style to arrays. This is a “feature” that is more a left over on some functions that is only available for backwards compatibility reasons than anything else. Here’s a reworked version of your current arguments: wp_dropdown_pages( array( ‘title_li’ => ”, ‘depth’ => TRUE, // originally: … Read more

Add custom text at bottom of every page?

Depending on theme you are using there might be hooks available to output content at specific point. There is no generic convention for them, however. The most general approach to modifying the default output of page would be modifying (or introducing) page.php template. If your base theme is upstream (not developed for specific site) and … Read more

Template for child pages / subpages

Here is a basic idea: Any page where the page parent ($post->post_parent) is 0, it means the page is a top level page. If any other value exists, the page is a child of another page. This value is the ID of the page that the specific page is a child to. With the above … Read more

How to exclude shortcode from specific page IDs if it’s set to global

Please try this and let me know the result function my_shortcode_to_a_post( $content ) { global $post; $disabled_post_ids = array(’20’, ’31’, ’35’); $disabled_tag_ids = array(‘5′, ’19’, ’25’); $current_post_id = get_the_ID(); // try setting it to $post->ID; if it doesn’t work for some reason if(in_array($current_post_id, $disabled_post_ids)) { return $content; } $current_post_tags = get_the_tags($current_post_id); if($current_post_tags){ $tags_arr = array(); … Read more

How to re-order pages en-masse

First, the approach for setting up a sorting algorithm depends on where/how those street name and address numbers are stored. Single line in a meta_key, two separate meta_key entries, dumped into content for some reason, etc. etc. etc. OP is dealing with addresses stored as post_title values. So below assumes string like: 1234 Main Street … Read more

Child page from 2 different parent pages

Like AmbitiousAmoeba mentioned, you’ll need to perform a few get_pages calls to lookup the pages for each child, merge the results together, and iterate over those results. I worked up an example for you, because it’s fiddly trying to merge arrays when they have matching indexes, the only thing you should need modify are the … Read more

Guidelines for adding static pages

The WordPress Dashboard comes with separate sections for Edit Posts (your new News & Blog pages) and Edit Pages. The latter is for your current static content. Styling of the frontend (what the visitor sees) can be done in the stylesheet file. You would only need custom Page templates if you want the Pages to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)