vectyr
Forum Replies Created
-
Ok, so I got the multiple select working by selecting the ‘direct link’ option in settings, saving, and then reselecting ‘lightbox’. That made it work for some reason.
Forum: Fixing WordPress
In reply to: how do I do this with custom fields?Ok, I figured out my error here. The code works fine if I place it in the loop. I completely forgot that I was using a plugin called “EmbedIt” which allows you to drop the content of a custom field anywhere within the content of the editor using a shortcode like [HTML1].
This is where the problem was. The custom field key is HTML1, so I don’t think anyone will be able to help me unless they are familiar with this plugin. What I am basically trying to accomplish, is allowing a client to insert blocks of text via custom fields that they can then insert into the body copy of their text. I don’t want them to have to mess with divs, I’d like to have the divs inserted automatically.
Forum: Fixing WordPress
In reply to: how do I do this with custom fields?Ok, I know that I am doing something wrong. I was putting the code inside my subpage template, but then I realized that this isn’t what I was wanting.
I’m basically wanting some code to recognize a custom field and then wrap the value in a div wherever it occurs in the post. Would I put this in my functions.php?
Forum: Fixing WordPress
In reply to: how do I do this with custom fields?Ah, whoops. Hmm. I changed it and it’s still not working.
Forum: Fixing WordPress
In reply to: how do I do this with custom fields?<?php $mymeta = get_post_meta($post->ID, 'mymeta', true); if ($mymeta) { echo '<div class="sideBox">'.mymeta.'</div>'; } ?>
I’m using this which seems to be the correct way to set it up according to this thread, but it is not wrapping the value with the div. Any ideas?
Forum: Plugins
In reply to: A sneaky custom field php ideaFigured it out. Holy cow. Ok, so I didn’t have to put the whole: `<?php
echo ‘social.php’;
?>`I just cleared everything and stuck the social code in there. Works! Thanks man!
Forum: Plugins
In reply to: A sneaky custom field php ideaWhat if I wanted to use custom fields to display a specific sidebar?
Forum: Plugins
In reply to: A sneaky custom field php ideaI’ve checked, double checked and triple checked and this is what I get: https://joshstevensfoundation.org/dev/about/
I think my error is in what I pointed out above. I’m trying everything man.
Forum: Plugins
In reply to: A sneaky custom field php ideaI don’t necessarily need that file to be in another folder. I’m fine with doing it the way you advised.
When you said this:
<?php echo 'this is the include file '; ?>
Where it says ‘this is the include file’ do I put ‘/images/social.php’ or do I put ‘<?php include(“/images/social.php”); ?>’
Neither work, but I am using 2 social.php files, one in my theme and another in my images folder that has the code in it. Should I not be using the one in my images folder and place my code in the the one in my theme folder? like:
<?php echo 'social.php'; <!--code goes here--> ?>
Forum: Plugins
In reply to: A sneaky custom field php ideaI’m still getting nothing. I placed the code in my sidebar.php file; there has to be something else that isn’t set up right. The php file that has the code I want to place is located in: /images/social.php.
I also that social.php file in my template folder. Do I still need that and if so, what specifically would I put in it?
I have a custom field with the key “social” so what do I put as the value?
Forum: Plugins
In reply to: A sneaky custom field php ideacorrect
Forum: Plugins
In reply to: A sneaky custom field php ideahaha sorry man, I really do appreciate all of your help. The code above is what I would like placed on certain pages. It’s going in a sidebar and I already know how to create multiple sidebars, etc and I know that I could just create another page template, but this is the particular way I want to do it.
I would like to place the code above into a sidebar from a php file. I could paste the code on every page but I only want to edit the code in one spot.
I figured that since I can’t use php in a custom field, maybe I could but the file name in the custom field and then wrap that name with the php include function through the template itself. Does that make sense?
Forum: Plugins
In reply to: A sneaky custom field php ideaIt’s placing text in just fine but this is the code I am trying to insert:
<a href="https://www.youtube.com/user/kindlikejosh" ><img src="/images/youTubeBttn.jpg" alt="Josh Stevens Foundation YouTube Channel"/></a> <p></p> <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ appId: "110846042287783", xfbml: true }); }; (function() { var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; document.getElementById('fb-root').appendChild(e); }()); </script> <fb:fan profile_id="110846042287783" stream="0" connections="0" logobar="1" width="160" height="1"></fb:fan> <script src="https://widgets.twimg.com/j/2/widget.js"></script> <script src="https://widgets.twimg.com/j/2/widget.js"></script> <script src="https://widgets.twimg.com/j/2/widget.js"></script> <p></p> <script> new TWTR.Widget({ version: 2, type: 'faves', rpp: 10, interval: 6000, title: 'Twitter', subject: 'Josh Stevens Fdn.', width: 160, height: 120, theme: { shell: { background: '#faae44', color: '#ffffff' }, tweets: { background: '#ffffff', color: '#444444', links: '#ce1720' } }, features: { scrollbar: false, loop: true, live: true, hashtags: true, timestamp: true, avatars: false, behavior: 'default' } }).render().setUser('kindlikejosh').start(); </script>
Forum: Plugins
In reply to: A sneaky custom field php ideaOk, I did exactly as you said and tried it. All it did was place the text “social.php” in the side bar. So I tried to use the entire php include line with the path to the file in it and that didn’t work either. Any idea what I’m doing wrong?
I created a file called social.php and put it in my theme folder. This is what I put in the file:
<?php echo 'social.php'; ?>
Is that correct?
Finally you asked me to create a custom field called “social” with the value of “/social.php”. Is that supposed to be the social.php in the theme folder or to the other social.php that has the code I need in it? Sorry if I’m being dense.
Forum: Plugins
In reply to: A sneaky custom field php ideaCorrect on all three points.
The value I’m using in the path: <?php include(“https://joshstevensfoundation.org/images/social.php”); ?>
I have also tried just: https://joshstevensfoundation.org/images/social.php
Neither work.