C0MPT3CHS
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: PHP switch in wordpress?It worked ?? ?? ??
And i left it as:
$page_title = get_the_title();
Forum: Fixing WordPress
In reply to: PHP switch in wordpress?I have not tried it that way, but I did try using $get_the_title, but I know I used it wrong
Forum: Fixing WordPress
In reply to: PHP switch in wordpress?that actually is the entire code lol. am I missing something?
Forum: Fixing WordPress
In reply to: PHP switch in wordpress?I also tried: echotl “<p>Page title: $post_title </p>”; Still didn’t get anything to generate after “Page Title:”
Forum: Fixing WordPress
In reply to: PHP switch in wordpress?Well I’m trying to do is have the script find the page name, then according to the page name its going to load the correct sidebar for that page. I got $page_title on a wordpress support page.
When i ran :
<?php echo "<p>Page title: ".$page_title."</p>"; switch ($page_title) { case "Mr. Liqz": include("liqzside.php"); break; case "Nige": include("nigeside.php"); break; case "Big Shot": include("bigshotside.php"); break; default: include("sidebar.php"); } ?>
All it did was display:
page title:”
Nothing else was displayed…. So what next?
Forum: Fixing WordPress
In reply to: PHP switch in wordpress?I just tried:
<?php switch ($page_title) { case "Mr. Liqz": include("liqzside.php"); break; case "Nige": include("nigeside.php"); break; case "Big Shot": include("bigshotside.php"); break; default: include("sidebar.php"); } ?>
And that didn’t work, how exactly should it be to stop that?
Forum: Fixing WordPress
In reply to: PHP switch in wordpress?Can anyone help with this issue??
Forum: Fixing WordPress
In reply to: Help with pages. Want to edit via HTML and admin panel.My switch is not 100% working, still a good example to give an idea though, I made a separate post about how to fix this HERE
Forum: Fixing WordPress
In reply to: Help with pages. Want to edit via HTML and admin panel.Nevermind i got it with a Switch statement
Anyone else needs help heck out:
https://w3schools.com/php/php_switch.asp
My code as an example:
<?php $page_title="sikcyde"; switch ($page_title) { case "Mr. Liqz": include("liqzside.php"); break; case "Nige": include("nigeside.php"); break; case "Big Shot": include("bigshotside.php"); break; default: include("liqzside.php"); } ?>
Forum: Fixing WordPress
In reply to: Error when accessing site other then typing in the URLChanged. I now know not to post anything while I’m half asleep. I don’t tend to think very much. Thanks for notifying me though. Im going to change the info then do a brand new install.
Forum: Fixing WordPress
In reply to: Error when accessing site other then typing in the URLSorry, didnt think it would mess up like that.
Forum: Fixing WordPress
In reply to: Error when accessing site other then typing in the URLSorry my internet has been down, they are doing some updates which takes my internet down for days on end. I’m about to try this out right now and hopefully i get this fixed ?? Thank you very much for your help, ill check back in a few hours from now
~C0MPT3CHS
Forum: Fixing WordPress
In reply to: Error when accessing site other then typing in the URLAlso, the site is https://www.SikCyde.com/wordpress
Forum: Fixing WordPress
In reply to: Can't add pictures to my sidebar?Hmmm….. For some reason that worked. That was the first thing i did (But i changed the picture to a .jpg first, then edited the code) And it wouldn’t work for me.
But either way, its working now ??
Thanks a ton ?? Now i just have to size it right lol
Forum: Themes and Templates
In reply to: Issues when creating a new pageSorry it took so long to respond. I just had to edit page.php and copy the info from index.php into it and then it worked. I was never explained what page.php and single.php do, and now i know what one of them do lol.
So this is now resolved. ??