How to go to link with particular tab active? [closed] - php

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
Here Is the link that I have tried
<a href="<?php echo $this->config->item('base_url') . 'index.php/back-office-panel/User_master#tab4' ?>">
But its not working
suggest answers.
I want to go to edit of that particulate section which is tab format.

Simple pass the uri parameter 'index.php/back-office-panel/User_master/tab4'
<a href="<?php echo $this->config->item('base_url') . 'index.php/back-office-panel/User_master/tab4' ?>">
PHP: Check the condition and echo the active class in tab.
if(isset($this->uri->segment(3)) && $this->uri->segment(3)=='tab4'){
echo 'active';
}

Related

not applied css when switching the dynamic content [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
on my website when the content switches to impressum once you click on it, it doesnt apply my css style, cant seem to find the problem. HTML-code: seen with ctrl + u on website!
<?php include ("$website_pages/navbar.html");?>
<div id="content">
<?php
if ($_GET ['page'] == "impressum1") {
include ("$website_pages/impressum1.html");
} else {
include ("$website_pages/home.html");
}
?>
<div id="impressum">
Impressum
</div>
</div>
I think you have to remove the / in your link. You have relative paths that were affected by the /
http://quersteil.eu/index.php?page=impressum1
Your css is not beeing loaded. You need to change your link to:
<link href="/style.css" type="text/css" rel="stylesheet">

If variable equals something, make a have a href attribute [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
Using advanced custom fields plugin on my wordpress site. I have a select option in one of the custom post types which determines if post going to be a link to another page or call out popup.
Here is how it looks.
<!-- here goes a code defining post type. Works fine -->
<?php $hmltype = get_field('post_url_or_popup'); ?>
<div class="tablecell midlineunit middle">
<a class="table midunithref mw1" <?php if ($hmltype == hml_url) { echo 'href="<?php the_field('hplb_url'); ?>" ' } endif; ?> >
</a>
</div>
Must be a syntax error, but I'm just starting out with php, so, kind of difficult to find the mistake.
What is hml_url? Is it a variable called $hml_url..? Back to your issues, you're using endif; here completely wrong. You can only ever call it if you instantiate it like this:
if(condition) :
do stuff;
endif;
Now to fix your print.
<a class="table midunithref mw1" <?php echo ($hmltype == hml_url) ? 'href="'. the_field('hplb_url'); .'"' : ''; ?> >
You'll need to figure out/tell us what hml_url is for us to solve your issue. You would've also seen the error if you turned your error reporting on. You can do this by adding this to the top of your script:
ini_set('display_errors', 1);
error_reporting(-1); // or you could do E_ALL

Basic PHP syntax for editing a Wordpress social sharing plugin [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to edit a social sharing plugin, to change the link/text show in the popups for twitter, etc..
Basically when it clicks to share on Twitter, it displays the page title and current URL on a thank you page, I want to customize it to display certain text and a different URL. Tried changing the &url=<?php echo $url; ?> part to &url=<?php http://www.urltext.com; ?> for example but doesn't work, how can I edit this so the syntax is proper?
case 'twitter':
?><a rel="external nofollow" class="ss-twitter" href="http://twitter.com/intent/tweet/?text=<?php echo $title; ?>&url=<?php echo $url; ?><?php if(!empty($twitter_username)) { echo '&via=' . $twitter_username; } ?>" target="_blank"><span class="ss-icon-twitter"></span><?php echo $twitter_text; ?></a> <?php
break;
The syntax is incorrect. You'll want to use:
&url=<?php echo 'http://www.urltext.com'; ?>
The url is a string; so you need to echo it as a string.

QR Code wordpress generate on page [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
i'm trying to add a QR to each of my sites with this code..
<img alt="QR code" src="http://chart.apis.google.com/chart?cht=qr&chs=150x150&chld=L|4&chl=<?php the_permalink(); ?>" width="150" height="150" />
but when i use a QR read on the code that it generate i only getting this
<?php the_permalink(); ?>
on the screen
someone how can help ?
PHP can't process the code since it's encoded.
Try:
<img alt="QR code" src="http://chart.apis.google.com/chart?cht=qr&chs=150x150&chld=L|4&chl=<?php echo urlencode(get_permalink()); ?>" width="150" height="150" />

Users cant see image on index in Wordpress [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
Friends,on the index page there is image for each tittle but these are not show.
this is web site : www.manisaihtiyac.com
I think there is a problem right this code :
<div class="yef_resim">
<a href="<?php the_permalink(); ?>">
<img src="<?php echo get_post_meta($post->ID, 'logo', true); ?>" border="0" />
</a>
</div>
Nothing is being returned by your function get_post_meta:
<a href="http://www.manisaihtiyac.com/?p=35">
<img src="" border="0">
...

Categories