add_action insert html

If you want something to display in the footer, you first need to hook it into the footer to display it. So that would look like this: function myLog() { echo ‘test’; } add_action(‘wp_footer’,’myLog’); However, this is not at all connected to the data you want, which is when a new user creates a new … Read more

How could i open two url with one hyperlink click [closed]

<a href=”#” onclick=”window.open(‘http://google.com’); window.open(‘http://yahoo.com’);”>Click to open Google and Yahoo</a> Please note this will not work if pop-up are disabled – the most you will get is one window. For testing disale your popup blocker in your browser. Note that site visitors who have popups enabled will not see both urls open.

How do I cycle a JS function in WordPress? [closed]

Rather than trying to include jquery with your javascript, you should use wordpress to define jQuery as a dependency to your custom script. function custom_js_script_enqueue(){ wp_enqueue_script( ‘mycustomjs’, CHILD_THEME_URI . ‘/assets/js/my-custom-js.js’, array(‘jquery’), ‘1.0.0’ ); } add_action(‘wp_enqueue_scripts’, ‘custom_js_script_enqueue’); you can read about all of the libraries available in wordpress here. Your script should not include the jquery … Read more

WP Query outputs three items within a div

You can use the variable $current_post, something like this. <?php $query = new WP_Query(array( ‘post_type’ => ‘custom_job’, ‘showposts’ => 12 ) ); ?> <?php while ($query->have_posts()) : $query->the_post(); ?> <?php if ($query->current_post % 3 === 0) :?> <?php $numbers = array(‘One’, ‘Two’); //add the rest ?> <div class=”jobs<?php echo $numbers[floor($query->current_post / 3)];?>”> <?php endif;?> <div … Read more

HTML code not working in WordPress

WordPress doesn’t allow you to paste in a full HTML page, as you’re trying to do. In addition to the nested <html> tag, WP typically prevents JavaScript pasted into the editor from running because it could cause security risks or unknown conflicts. You could create a child theme, which will allow you to set up … Read more

Remove ALL HTML from single page

You could make a template for this in your active theme, then assign that page to use the new template file. null-template.php <?php /** * Template Name: Null */ if ( have_posts() ) { while ( have_posts() ) { the_post(); the_title(); echo( wp_strip_all_tags( get_the_content() ) ); } } Then create a new page (or edit … Read more

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