preben89
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
I noticed that you need to add the external domains you want to add exactly as the example, which might be why it didn’t work for me earlier. (I had http, and the url ended with /. In the code it probably adds the / itself.)
But even though it seems to correctly add the onclick events for me, it still doesn’t add utm-parameters in the url by itself.
Is it hidden, or just set up wrong?
Forum: Fixing WordPress
In reply to: Error with "return get_post()->ID;" after deleting a translated postI also noticed another error in the source code:
https://d.pr/i/70wuThe code it is referring to is this:
<div class=”submenu”> <?php $i = 1; while(has_sub_field(“sections”)) { if (get_sub_field(“title”) && $i != 1) { echo ‘<a onclick=”_gaq.push(['_trackPageview', '/' . strip_tags(get_sub_field("title")) . '']);” data-url=”‘ . sanitize_title_with_dashes(get_sub_field(“title”)) . ‘-section’ . ‘”>’ . strip_tags(get_sub_field(“title”)) . ‘‘; } $i++; } ?> </div>
while(has_sub_field(“sections”)) is the code on line 169.
Are there any chance the errors might be related?
Forum: Fixing WordPress
In reply to: Error with "return get_post()->ID;" after deleting a translated postBtw, the code for index.php is:
<?php /* Main post template file */ ?> <?php get_header(); exit; ?> <article class="article"> <?php // get this page get_template_part('part-page'); // get all child pages and output them $the_query = new WP_Query('orderby=menu_order&order=ASC&post_type=page&post_parent='.get_the_ID()); while ( $the_query->have_posts() ) : $the_query->the_post(); get_template_part('part-page'); endwhile; ?> </article> <?php get_footer(); ?>
Viewing 3 replies - 1 through 3 (of 3 total)