How to get html tag ids from template?

WordPress doesn’t operate with DOM for the purpose of page source generation from templates. Templates are treated and run as PHP source files, producing any and all output. Unless you have control over actual templates your options likely are: Attempting to buffer and rewrite output (rather fragile, more so for publicly released plugin) Adjust markup … Read more

Finding and removing unnecessary redirects

While in the process of implementing a CSP and defining the allowed sources, I was shocked to find the total number of resources ShareThis calls. At the time of writing this, I counted a total of 39 domains and subdomains it uses. Not a big surprise anymore why ShareThis was causing my slow page load … Read more

Pass the updated value of aid from form using ajax

I’m a bit confused – why the two submit buttons? And you’re outputting the same id multiple times (inside a foreach loop), which will choke jQuery. Try the following, using classes: $form = ”; foreach ( $results as $result ) { $value = esc_attr( $result->aid ); $form .= ‘<form method=”post” class=”aid-form”>’; $form .= “<input name=”aid” … Read more

Add extra markup to WP menus

When developing a menu on a bootstrap based theme, I now use the following Walker: ‘walker’ => new Custom_Walker_Nav_Menu class Custom_Walker_Nav_Menu extends Walker_Nav_Menu { // add classes to ul sub-menus function start_lvl( &$output, $depth ) { // depth dependent classes $indent = ( $depth > 0 ? str_repeat( “\t”, $depth ) : ” ); // … Read more

can’t update plugins or wordpress or install new plugins [duplicate]

Some plugins require the /wp-content/ folder be made writeable, but in such cases they will let you know during installation. In some cases, this may require assigning 755 permissions. If you are on the shared hosting they always uses the “suexec” and above case will not apply for them. If your hosting use the “suexec” … Read more