benjamin_sp
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: What is the point of this tag: <?php the_ID(); ?>I read that codex page before posting, and it didn’t help. It says:
Displays the numeric ID of the current post.
&
Provides a unique anchor identifier to each post.
What does any of this mean in practical terms?
Forum: Fixing WordPress
In reply to: Can You Put PHP Code In Custom Field?Iridiax is right, conditional tags would be the far better option. Instead of putting custom field values one by one for 100+ posts you can just place this in your template:
<?php if (is_category(‘???’)) { ?>
<?php echo ddpl_list(Cat#); ?>
<?php } ?>
Instead of “???” you would put your category’s id, slug or simply the name. If you want to put multiple categories there, separate them with commas.
I still don’t get the second part of your intention. But the above should cover the first part.
Forum: Fixing WordPress
In reply to: Can You Put PHP Code In Custom Field?I’m not sure why you need to use php code as your custom fields value. What is ko_text exactly – I know it’s the name of your custom field but what are you trying to do with it? Display an image, text, what?
If you want to use a custom fields called “ko_text” then place this in your template:
<? echo get_post_meta($post->ID, ‘ko_text’, true) ?>
And in your posts write the value for ko_text. Like “These are some Words”
and in the area that you designated in your template, the value for ko_text will appear (only for the post/page for which your added the custom field).
Forum: Fixing WordPress
In reply to: Can You Put PHP Code In Custom Field?I used to use ExecPHP a long time ago so I don’t remember exactly but I think it is one of those plugins that you just activate and let it take effect (no need to call). To test if it is working insert a php code in a sample post or page. For example try this:
<?=++$my_post_count . ‘.’;?>
If this produces “1.” <– this number than ExecPHP is working but if you see just the code itself then it isn’t working.
Forum: Fixing WordPress
In reply to: Can You Put PHP Code In Custom Field?When you activate the plugin it will affect all corners of your site – not just the sidebar.
Forum: Fixing WordPress
In reply to: Delete revisionAll sort of stuff are stored in post meta like all your revisions, auto saves, custom field values, and even accumulated plugin info. If you want to disable revisions and that method doesn’t work you can try the next best thing in this plugin:
https://www.ads-software.com/extend/plugins/delete-revision/
It works great.
Forum: Fixing WordPress
In reply to: [Please Help] What is the code to show numberingI’m such an idiot, iridiax’s solution does work. I couldn’t see the numbers before because I had a css valuse of display: block on my list which was preventing the numbers from showing for whatever reason. Thanks.
Forum: Fixing WordPress
In reply to: Can You Put PHP Code In Custom Field?Maybye the ExecPHP plugin may work. Install and activate it and see if the php code in the custom field displays.
Forum: Fixing WordPress
In reply to: [Please Help] What is the code to show numberingAnyone have a solution please?
Forum: Fixing WordPress
In reply to: [Please Help] What is the code to show numberingIridiax, that didn’t make any difference – it only caused an indentation towards the left of the list. In the past I used to use this code:
<?php $my_post_count++; echo $my_post_count . '.'; ?>
to display numbering. But the above code needs to be entered for every number. For example if I wanted all list items to be numbered I would have to do this:
- <?php $my_post_count++; echo $my_post_count . ‘.’; ?> Something 1
- <?php $my_post_count++; echo $my_post_count . ‘.’; ?> Something 2
- <?php $my_post_count++; echo $my_post_count . ‘.’; ?> Something 3
and so on…
I was wondering if I can say in php: All list items within this div are to be numbered.
So I can do it in one swoop instead of doing it one by one?
Forum: Fixing WordPress
In reply to: How to prevent Tags from being HyperlinkedBump ??
Forum: Fixing WordPress
In reply to: /%postname%/ pages aren’t working after upgrade to 2.8.1Yeah, upgrade your permalinks, %postname% works for me and I’m using 2.8.1
Forum: Fixing WordPress
In reply to: How to call a custom field that is an imageThe problem is solved, I didn’t have the if have post statement in my theme. After putting that in the thumbnails are showing fine.
Forum: Fixing WordPress
In reply to: How to call a custom field that is an imageIt is the absolute path iridiax. I just don’t know what’s wrong.
Forum: Fixing WordPress
In reply to: How do you edit themes?Step 1: login as admin
Step 2: Click Appearance, then click Editor.
Now you can edit all the php and css files that make up your theme. Just choose the page to edit from the list at the right.