dreamweaver find and replace content inside div

Dreamweaver : Replacing content inside div or other tags

Dreamweavers has powerful search and replace tool. You might have div’s with same class or id but the content inside might be different.  Using this code you can replace all the content inside particul div.

Select search and replace in dreamweaver: edit > find and replace

Make sure “User regular expression” is selected


<div id="table-text">
   <p>Title 1</p>
<div id="table-text">
   <p>Title 2</p>
<div id="table-text">
   <p>Title 3</p>


In find and replace past the below code


<div id="table-text">([\s\S]*?)</div>


<div id="table-text"></div>

Click replace all


<div id="table-text">
<div id="table-text">
<div id="table-text">


You can see it remove everything inside <div id=”table-text”>.



<div id=”table-text”> = Unique div you are trying to replace

([\s\S]*?) = Selects everything inside that div


Finding content between certain code

eg 1:

  • <a href=”https://www.google.com/url?q=http://www.web.com/137786&sa=D&usg=ALhdy2987B6W7bupfJfSkOXz1iGWMq-FcA” target=”_blank”>
  • <a href=”https://www.google.com/url?q=http://www.web.com/member/137787&sa=D&usg=ALhdy28tpngN_1Cx7avCvVq-h-QxAdo5og” target=”_blank”>
  • <a href=”https://www.google.com/url?q=https://www.web.com/cd6bl05p29lr38idfn7l4dh6n34&sa=D&usg=ALhdy28FtPMP3boFcPH-h5QljJ_qycCH6g” target=”_blank”>
  • <a href=”https://www.google.com/url?q=https://www.web.com/c6cbh0rr2488ls6bkogvi4ggcic&sa=D&usg=ALhdy28geBKzd8BKP2pnRI5jqWb3TKBp0g” target=”_blank”>

Lets say, in the link you want to remove everything after &sa=

Use the following regular expression to remove information between

  • &sa = looks for text containing &sa
  • [^>]* = selectest everything after it
  • target= stops selection when target=

eg 2:

Remove every thing inside <input> tag

  • Find: <input [^>]*>
  • Replace: <input>

Learning source: http://www.adobe.com/devnet/dreamweaver/articles/regular_expressions_pt1.html & http://www.adobe.com/devnet/dreamweaver/articles/regular_expressions_pt2.html




WordPress: Show content from specific page in theme

This wordpress snippet should allow you to show specific page in wordpress theme. In the following example we are show the page if its home page



<?php if(is_front_page()) { ?>
$post = get_post($id);
$content = apply_filters(‘the_content’, $post->post_content);
echo $content;
<?php } ?>


is_front_page() = check if its home page

$id = Page. You can go to wordpress admin, click on the page you want the content from. On the admin panel you will see page id. eg: http://website.com/wp-admin/post.php?post=6137&action=edit

apply_filters(‘the_content’, $post->post_content);  = gets the content from the page

echo $content;  = shows the content


If you want the content to show on all page. Use this snippet

$post = get_post($id);
$content = apply_filters(‘the_content’, $post->post_content);
echo $content;

Follow us on Facebook / Twitter / Google+ and myself for more tips

WordPress Remove Custom post types from non admin users

Remove Custom post type

function wp_remove_posttype_non_admin() {
if( !current_user_can( ‘administrator’ ) ):
remove_menu_page( ‘edit.php?post_type=your_post_type’ );
add_action( ‘admin_menu’, ‘wp_remove_posttype_non_admin’ );

your_post_type should be the name of your actual post type.

Remove Standard menu


remove_menu_page(‘edit.php’); // Posts
remove_menu_page(‘upload.php’); // Media
remove_menu_page(‘link-manager.php’); // Links
remove_menu_page(‘edit-comments.php’); // Comments
remove_menu_page(‘edit.php?post_type=page’); // Pages
remove_menu_page(‘plugins.php’); // Plugins
remove_menu_page(‘themes.php’); // Appearance
remove_menu_page(‘users.php’); // Users
remove_menu_page(‘tools.php’); // Tools
remove_menu_page(‘options-general.php’); // Settings


Remove Plugin menu

For plugins, it seems you only need the page= query var. The other thing to note is the priority, which is the third argument to the admin_menu add_action. It has to be set low enough (the higher the number, the lower the priority) so that plugins have already added themselves to the menu.

function wp_remove_posttype_non_admin() {
if( !current_user_can( ‘administrator’ ) ):
add_action( ‘admin_menu’, ‘wp_remove_posttype_non_admin’, 9999 );

Remove metabox

remove_meta_box(‘tagsdiv-post_tag’, ‘post’, ‘normal’);
remove_meta_box(‘categorydiv’, ‘post’, ‘normal’);
remove_meta_box(‘postimagediv’, ‘post’, ‘normal’);
remove_meta_box(‘authordiv’, ‘post’, ‘normal’);
remove_meta_box(‘postexcerpt’, ‘post’, ‘normal’);
remove_meta_box(‘trackbacksdiv’, ‘post’, ‘normal’);
remove_meta_box(‘commentstatusdiv’, ‘post’, ‘normal’);
remove_meta_box(‘postcustom’, ‘post’, ‘normal’);
remove_meta_box(‘commentstatusdiv’, ‘post’, ‘normal’);
remove_meta_box(‘commentsdiv’, ‘post’, ‘normal’);
remove_meta_box(‘revisionsdiv’, ‘post’, ‘normal’);
remove_meta_box(‘authordiv’, ‘post’, ‘normal’);
remove_meta_box(‘slugdiv’, ‘post’, ‘normal’);

Via Milo on stackexchange & Paul
http://bit.ly/wpremovecustomemenu & http://bit.ly/removemetaboxwp


Modify WP Role via Function.php

You can add or remove wp roles in function.php


$edit_contributor = get_role(‘author’);



Set with users role you want to modify


Add new privileges to that user


Remove privileges to that user


Full list of privileges can be viewed on wordpress codex

Follow us on Facebook & Google+

Via WP Snippet : http://bit.ly/wpauthorpage

Sticky Header Anchor Link Hidden Behind

Have you got fixed or sticker header. When you anchor link the page, the link is hidden behind the header? This simple jquery (javascript) should fix the issue for you.



$(function() {
$(‘a[href*=#]:not([href=#])’).click(function() {
if (location.pathname.replace(/^\//,”) == this.pathname.replace(/^\//,”)
&& location.hostname == this.hostname) {

var target = $(this.hash);
target = target.length ? target : $(‘[name=’ + this.hash.slice(1) +’]’);
if (target.length) {
scrollTop: target.offset().top – 115 //offsets for fixed header
}, 1000);
return false;
//Executed on page load with URL containing an anchor tag.
if($(location.href.split("#")[1])) {
var target = $(‘#’+location.href.split("#")[1]);
if (target.length) {
scrollTop: target.offset().top – 115 //offset height of header here too.
}, 1000);
return false;


Just add this to your header or javascript file. This will work on any type of website be it HTML or WordPress.

In your header you can add the following code to include javascript on the page
<script type="text/javascript">


WordPress Menu in page using shortcode

Thanks to greg, below function should help you display wordpress menu in any where on your website.

Add the shortcode to function.php

// Function that will return our WordPress menu
function list_menu($atts, $content = null) {
‘menu’ => ”,
‘container’ => ‘div’,
‘container_class’ => ”,
‘container_id’ => ”,
‘menu_class’ => ‘menu’,
‘menu_id’ => ”,
‘echo’ => true,
‘fallback_cb’ => ‘wp_page_menu’,
‘before’ => ”,
‘after’ => ”,
‘link_before’ => ”,
‘link_after’ => ”,
‘depth’ => 0,
‘walker’ => ”,
‘theme_location’ => ”),

return wp_nav_menu( array(
‘menu’ => $menu,
‘container’ => $container,
‘container_class’ => $container_class,
‘container_id’ => $container_id,
‘menu_class’ => $menu_class,
‘menu_id’ => $menu_id,
‘echo’ => false,
‘fallback_cb’ => $fallback_cb,
‘before’ => $before,
‘after’ => $after,
‘link_before’ => $link_before,
‘link_after’ => $link_after,
‘depth’ => $depth,
‘walker’ => $walker,
‘theme_location’ => $theme_location));
//Create the shortcode
add_shortcode("listmenu", "list_menu");

Add the below shortcode to the page

[code][listmenu menu=your-menu-slug menu_class=your_menu_class][/code]

If you want to display shortcode in theme you can use the following function

[code]<?php echo do_shortcode("[shortcode]"); ?>[/code]

Senior Developer

We are looking for senior web developer to work on exciting international projects. You need to have more than 3 – 4 years web experience, wordpress experience is key. When you apply to this role, please provide us with your portfolio which has website samples that you have developed and also description of your role in creating those websites.

We require the following

Essential Skills

  • Font End

    • CSS / CSS 3

    • HTML / HTML 5

    • Javascript – jQuery

  • Back End

    • PHP

    • MySQL

WordPress Development

  • Theme Development

  • Plugin Development

  • HTML – WordPress

  • Core file modification

PHP Development

  • Working with open source systems

  • Knowledge in popular frameworks

  • Eager to learn new system

Desirable Skills

  • Image – HTML / WordPress

  • Mobile Development: PhoneGap, Native App Development (iOS & Android)

  • Knowledge in Social APIs (Facebook, Twitter, Linkedin)

  • Knowledge in developing and executing APIs

  • CSS 3 Animations and Advance HTML Dom manipulation

  • Testing and Debugging UI

  • Knowledge SEO and Google Analytics

  • Knowledge in Semantic web (Rich Snippet)

  • Exposure to Shopping system such as zen cart / Magento / openCart

We will provide you with theme files, which you will install and modify based on our requirement. moving forward we want to build our own theme and framework in which  you will play a key role in planning and executing such projects. this opportunity  will give you exposure into developing mobile applications and other web applications.

We are looking for enthusiastic person who is eager to learn and use latest web technologies. You will be working with UK based clients.

As the team expands, you will take responsibility to manage junior members and take responsibilities in the projects.

SCube Rebrands

scube-2014-04 SCube Rebrands SCube Rebrands scube 2014 04Cambridge, UK (December 1, 2013) – SCube is Leicester based Digital Media Company started in 2005 as a Freelance business. As the Internet have evolved and so does the Internet related services. Too keep up to date and SCube had been rebranded to focus in this market. Their service will cover all digital media aspects such as online marketing, website development, user experience, user interface design, app development, social media management, SEO etc.

The redesign of the logo drops “The” from “The SCube” and adds tagline as “Digital Media” The colour and the style are slightly altered but still aligns with their regular brand. The website pages has been simplified and focus is on the new services mentioned above. SCube is also bring all its assets and social media accounts in one place to achieve this goal.

Current SCube works on the following sector Medical, Laser Clinics, Beauty, Educational, Energy, Blue Chip, Restaurant, DIY, Recruitment, News & publication and Charity

Press Release | Company house info

About SCube

Since 2005, SCube has helped SME to establish their business online by providing them full services starting from selecting company name, branding, website, marketing, app development, content writing and social media management. SCube is fast reliable and affordable.

Website | Facebook | Twitter

An error occurred {“type”:”PLATFORM_ERROR”, “payload”:”500″}

Today I tried to setup Google Play – Merchant account and I get the following error “An error occurred {“type”:”PLATFORM_ERROR”, “payload”:”500″}”, I contacted google,

The error showed up because, I previously have Google Checkout account linked to my email. Apparently Google Checkout and Android merchant account does not work together. Which means I need to setup new Android merchant account with new email. (Which is annoying!).

Its all google service why  can it be properly integrated!!

Note: This solution worked for Igor (See comments below)
“I have resolved this issue today finally. After several more emails with Google support, solution was simple: you just have to leave VAT ID field empty during registration, and fill this info later. Do not delete Wallet account, because it will not help, and do not link other account because it didn’t help in my case.”

Email communication with Google So Far

Follow us for latest update on this error

Date: 13 Nov

Hi Shovan,

As discussed, for you to be able to create an Android Merchant account, you would have to create a new Google Play Developer Console and follow the correct process to have it linked to an Android Merchant account. To do this, please follow the steps below:

1. Sign up for a Google Play Publisher account at https://play.google.com/apps/publish

2. Before you can publish your software on Google Play, you must do three things:

Create a developer profile
Agree to the Developer Distribution Agreement
Pay a registration fee ($25) with your credit card (using Google Wallet)
3. Accept the Google Play Terms and Conditions

4. Then complete the developer registration process by proceeding to Google Wallet to pay the $25 fee

5. Confirm the order and payment information, then click the Place order now

6. You will be receiving payment confirmation on screen and by email

7. Then return to the Google Play Developer Site to finish your registration

To sell paid application, you must link a merchant account from within your Android developer console. You will then be brought to the new merchant account signup flow. Please be advised that a linked merchant account can’t be changed or swapped without paying the $25 registration fee again.

For instructions on linking your Google Play Developer Console account with a merchant account, please refer to this link: https://support.google.com/googleplay/android-developer/answer/2972701?hl=en.

Please respond to this email with the login email address for your new Google Play Developer Console account, as well as the Merchant ID for the merchant account linked to it so I can proceed with the next step and request for your old console to be closed to be able to request for the other $25 registration fee to be refunded.
Should you have further questions or clarifications, please feel free to respond to this email as well.
The Google Checkout Team

If you have additional questions, please visit our Help Center at http://support.google.com/checkout/sell/

If you received this communication by mistake, please don’t forward it to anyone else (it may contain confidential or privileged information), please erase all copies of it, including all attachments, and please let the sender know it went to the wrong person. Thanks.


From: Me

Date: 13th November


Are you going to refund payment for name@website.com ?


From: Google Checkout Merchant Support

Date: 13th November
Hi Shovan,

Once you’ve created a new developer console, I’ll forward a request to one of our specialists to have your old console closed, to be able to include a refund request for the other $25 registration fee. Please let me know once you’ve successfully created the new developer console and have linked it to a merchant account.

From: Me
Date: 13th November
Ok I have created new account and paid for it. Its active now. Email address attached to new account is new-email@website.com


From: Me

Date: 13th November

Has the refund processed ?


From: Google Checkout Merchant Support

Date: 14th November

Hi Shovan,

Thanks for confirming. To ensure a faster resolution, I’ve forwarded your concern to the specialists on our Google Play Developer Support team. They’re the experts, and they’ll respond to you with additional information as soon as possible.


From: Google Play Dev support

Date: 15th November

Hi Shovan,

Thank you again for contacting Google Play developer support. Your Google Play Developer Console registration order, XXXXX.token.XXX, has been cancelled and will be refunded. You’ll receive a separate email from Google Wallet with further refund details. If you would like to confirm the cancellation of your order, please review details at https://wallet.google.com/manage.

Please let us know if you have any additional questions.


The Google Play Team

From Google Play Dev Support

Date: 20th Nov

Hi Shovan,

Thank you again for contacting the Google Play developer support team. We really appreciate your patience while we’ve investigated the product behavior you described.

We’ve recently made some changes that may have resolved the problem. If you’re still having trouble, please let us know and we’ll be happy to assist you further.

Thanks again and please let us know if we can be of further help.

The Google Play Team

Follow us and we will keep you updated on this error. If you found a solution please message me

Error: extension .cer did not match expected (mobileprovision) – PhoneGap – Mac

Error: extension .cer did not match expected (mobileprovision) – PhoneGap – Mac

Step One

apple-developers-licence Error: extension .cer did not match expected (mobileprovision) – PhoneGap - Mac Error: extension .cer did not match expected (mobileprovision) – PhoneGap - Mac apple developers licence

Download your developer’s license from apple developers


provisioning-profile Error: extension .cer did not match expected (mobileprovision) – PhoneGap - Mac Error: extension .cer did not match expected (mobileprovision) – PhoneGap - Mac provisioning profile

Download mobile provisioning profile, if you have set up an app https://developer.apple.com/account/ios/profile/profileList.action

Create a profile if you don’t have one.

Create Bundle ID: https://developer.apple.com/account/ios/identifiers/bundle/bundleCreate.action

Create Profile: https://developer.apple.com/account/ios/profile/profileList.action

Step Two

Open the certificate in keychain on your mac

export-p12-certificate Error: extension .cer did not match expected (mobileprovision) – PhoneGap - Mac Error: extension .cer did not match expected (mobileprovision) – PhoneGap - Mac export p12 certificate

Step Three

Right click on your developers certificate and export (iPhone Developers)

Set password for p12

Here is video how to create p12

If you are on windows here is a video how to create .p12 certificate http://www.youtube.com/watch?v=4GteMgFvA1Y
Step Four

Go to phone gap > Signing Keys


phonepga-p12-key Error: extension .cer did not match expected (mobileprovision) – PhoneGap - Mac Error: extension .cer did not match expected (mobileprovision) – PhoneGap - Mac phonepga p12 key

If you have already tried adding key and failed its good option to start over. Click on the secure lock and enter the password. This is the password you created while exporting your p12.

phonegap-p12-certificate-provisioning-profile Error: extension .cer did not match expected (mobileprovision) – PhoneGap - Mac Error: extension .cer did not match expected (mobileprovision) – PhoneGap - Mac phonegap p12 certificate provisioning profile

Now click on add key button. Give a title and select p12 you exported and mobile provisioning you download from apple website. It should work from there.

Visit our facebook page for tips and tutorials on phonegap & iOS app