I am getting this oddball extra <br> inserted into this page above the "Affiliate" title/section. http://londoncapital.biz/affiliate-program/
Using either Firebug or Element Inspector, I still cannot determine where this is coming from.
This is the generated HTML.
<div class="entry clearfix">
<div class="two_thirds"></div>
<div class="one_third last" style="text-align: justify;"></div>
<hr class="clear">
<p></p>
<div class="one_third"></div>
<p></p>
<p></p>
<div class="one_third"></div>
<br> (THIS SEEMS TO BE THE OFFENDING ELEMENT I THINK)
<div class="one_third last"></div>
<div class="clear"></div>
<br>
I have gone over the page coding in WP page itself and and all three of those sections are identical.
What am I missing here? Some errant code in some php file?
UPDATE INFO: This is the actual code from the WordPress page: http://pastebin.com/pwJbAGdg
I can't paste the whole code here because I'll be here forever trying to clean up the formatting from the paste.
Surely using this stuff in editor is really cool but if you REALLY need it you can just remove spaces, copy this stuff:
<div class="entry clearfix"><div class="two_thirds"></div><div class="one_third last" style="text-align: justify;"></div><hr class="clear"><div class="one_third"></div><div class="one_third"></div><div class="one_third last"></div><div class="clear"></div><br>
Open Wordpress Super editor and go to TEXT mode - !important
Paste it - should work.
But that's not the best coding sample :)
Related
I'm creating custom elements in WPBakery (formerly Visual Composer), but encountering issues with its rendered markup.
For example:
I've created a custom element called text. text currently spans 12 columns in the WP admin:
The rendered markup for this looks like:
<div class="row justify-content-center">
<div class="text">
<div class="text-left container">
<h2>This is header</h2>
<p>This is content</p>
</div>
</div>
<div class="col-sm-12">
<div class="vc_column-inner">
<div class="wpb_wrapper"></div>
</div>
</div>
</div>
As you can see, it's creating an empty col-sm-12 div and not even applying the column styles to text.
Ideally what I want to do is get the column WPBakery is generating and place it in a variable.
This way, I can do something along the lines of:
<div class="text <?php echo $column; ?>">
I think this will be handy when a user eventually decides they want two text blocks next to each other:
So each text block will be col-6.
To summarise, I'm trying to figure out why Bakery is outputting an empty div with columns rather than to wrap around my text block? As I'm not sure why this is happening, the only solution I can think of is to get the column data as a variable and then echo is in the text block.
I'm interested in solving this problem, since I can't figure out what to do. I made a fade in/out text under menu for mobile version to show some information, but since the code has to be between two HR lines I added the code to layout.php file, and now I can't put that on 3 other languages because it's on German.
<div class="">
<div class="">
<hr class="" />
<div class="" style="">
<div class="">
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
<hr class="" style="" />
</div>
</div>
This is the code for that fade In/Out effect and changing from one to another, I managed to do that with nth-child selector, nothing hard...
My web site has 4 languages, but every language has 2 web sites that are different. I'm not using any framework just bare code. I've tried searching for anything that would be connected to that HR line so I could add manually on every site another line and that text between them, but there is none because it uses layout.php to show that line.
<div id="" class="">
<? if ($special_fullscreen != true): ?>
<div id='' class="">
</div>
<div class="">
<div class="">
<hr class="" style="" />
<div class="" style="">
<div class="">
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
<hr class="" style="" />
</div>
</div>
<div class="">
<div class="">
</div>
</div>
So, I would like to hear an idea that would resolve this issue, like making a different layout.php for every language or something like that and how would that be possible. I know that this code probably doesn't have anything to do with the problem, but I'm in a hurry and just tried to copy at least something... Thanks in advance :D
I am completely not sure if I know what you mean but it may be helpful info.
If you want to include different files on the same page depended on language - you can set cookie with info about chosen language and then, based on that, load proper layout.php file for it.
You can also make all language versions in one layout.php file, include it in proper place and make if statement checking which content should get displayed (inside that layout.php file) - also based on value of COOKIE.
Instead of cookie, you can also use $_SESSION but that may not work on the way you really want (according to my understanding of your problem).
I have a html structure like below, I want to place my custom header at a random position.
<div class="div1">
<div class="div2">
<?php echo do_shortcode('[header]'); ?>
</div>
<div class="div3"></div>
</div>
But it always make my header go to the bottom.
<div class="div1">
<div class="div2">
//I want the header to stay here
</div>
<div class="div3"></div>
<header>......</header>
</div>
However I place it, the header always go to the bottom, please give advice if you experience it.
UPDATE:
In my case, a specific class removed helped. Thanks everybody.
I would like to remove the extra markup that is around the generated paragraph items.
<h1>
<div class="field field-name-field-title field-type-text field-label-hidden">
<div class="field-items">
<div class="field-item even">Title</div>
</div>
</div>
</h1>
I would like it to display like this:
<h1>Title</h1>
I’ve not had any luck trying some of the suggestions in the Paragraphs issues https://www.drupal.org/node/2251909 such as editing the following files:
paragraphs-item.tpl.php
paragraphs-items.tpl.php
paragraphs.theme.inc
Does anyone have any experience with this module and be able to offer some assistance?
You can use strip_tags() to remove the html tags.
<h1><?php print strip_tags(render($content['YOUR_FIELD'])); ?></h1>
or
<?php print strip_tags(render($content['YOUR_FIELD']), "<h1>"); ?>
Hope this helps you.
I'm developing a web-based application using Framework7 (http://www.idangero.us/framework7/).
I'm doing well but now that I have come to integrate my login/member system I have encountered a problem with hyperlinks.
I've spent couple of hours trying to figure it out but have still come up short.
Basically I have three links:
<div class="pages navbar-through toolbar-through">
<div data-page="index" class="page">
<div class="page-content">
<div class="content-block">
<div class="content-block-inner">
Hello <?php echo htmlentities($_SESSION['user']['username'], ENT_QUOTES, 'UTF-8'); ?>, secret content!<br />
Memberlist<br />
Edit Account<br />
Logout
</div>
</div>
</div>
Memberlist.php and edit_account.php do not work but logout does.
Visiting the files directly in my browser (eg domain.com/memberlist.php) loads the file. They just do not load from this page so something is clearly wrong with it.
I've tried to include target="_self" and use other styles of linking content as explained in the Framework7 documentation but there is nothing about the problem I'm experiencing.
it important to write exact page name in data-page attribute value
<div class="page" data-page="about">
After digging around some more in the documentation I was able to solve my issue.
Linking in Framework7 requires every page linked to to have some specific code for parsing over AJAX.
<!-- That is all we have in about.html file -->
<div class="page" data-page="about">
... About page content goes here
</div>