Maria Daniel Deepak
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Javascript in postsIn the following line,
my_amazing_script
is the handle for your script. You have replace thesrc
param.wp_enqueue_script( 'my_amazing_script', get_template_directory_uri() . '/removeArrows.js', array('jquery'),'0.1', true );
Code Reference
wp_enqueue_script( string $handle, string $src = false, array $deps = array(), string|bool|null $ver = false, bool $in_footer = false )
Also, once you include it in your
functions.php
, check if the script has been included in your page by viewing the page source in your browser.Forum: Fixing WordPress
In reply to: Javascript in postsHello @johncannon,
WordPress strips tags out of your posts and pages. If you prefer to include it, you can use plugins to include scripts. One such plugin is jQuery in Posts Pages
If you prefer to it add it via
functions.php
, then this code should help you.// Reference: https://wordpress.stackexchange.com/a/151883/83739 function wpb_adding_scripts() { wp_enqueue_script( 'my_amazing_script', get_template_directory_uri() . '/removeArrows.js', array('jquery'),'0.1', true ); } add_action( 'wp_enqueue_scripts', 'wpb_adding_scripts' );
And finally use
jQuery
in place of$
in your js file.- This reply was modified 8 years, 6 months ago by Jan Dembowski.
- This reply was modified 8 years, 6 months ago by Jan Dembowski.
Forum: Fixing WordPress
In reply to: Home PageGlad that I could be of help to you.
Forum: Fixing WordPress
In reply to: Home PageHello @samchucks,
In order to get content of a particular page, you would need the ID of the particular page. Once you know the ID, you can get the contents using the following code.
$id = 47; $post = get_post($id); $content = apply_filters( 'the_content', $post->post_content ); echo $content;
The WP_Post Class reference article in the Codex will be of help to you.
Forum: Fixing WordPress
In reply to: How to hide href from image captionsCould you share your website URL to take a look at it?
Forum: Fixing WordPress
In reply to: Category or page includes posts from other pagesHello @rpnz,
Could you share your website address to take a look at it?
Forum: Fixing WordPress
In reply to: Underline Hover MouseoverThe
:hover
selector is what you’re looking for.a:hover { text-decoration: underline; }
Depending on your theme’s menu elements, you might have to modify this.
Forum: Plugins
In reply to: [Headings] Adopting the pluginThanks for the email address. I was actually searching for it.
Forum: Fixing WordPress
In reply to: WordPress 4.6 Installation ErrorGreat, thanks.
Forum: Fixing WordPress
In reply to: WordPress 4.6 Installation ErrorTo turn off the notices in your WordPress site, include the following line in
wp-config.php
filedefine(‘WP_DEBUG’, false);
You can find more details on editing
wp-config.php
file from the codex.Forum: Fixing WordPress
In reply to: Post pages with WordPress MenuHello @amtuning,
If you like to alter the appearance of your blog, you should get acquainted with Theme development in WordPress.
WordPress uses templates to control the different layouts in the website/blog. Understanding template hierarchy will make you understand which file to modify in your current theme to get the required result.
In your case, you can customize the presentation of your blog posts using
home.php
orindex.php
file.Forum: Fixing WordPress
In reply to: large Website – How to increase wordpress capacity?There is a wonderful article in the Codex and that should help you.
Forum: Fixing WordPress
In reply to: Post pages with WordPress MenuAre you looking to list all blog posts in the
https://www.amtuning.uk/blog/
page?Forum: Fixing WordPress
In reply to: Plugin to add Second Title to Post ArchiveCould you provide the URL’s of the pages? I did take a look at the Metro website that you mentioned, but I didn’t find the titles to be different.
Forum: Hacks
In reply to: Preg_replace not workingOkay, got it.
In my opinion, you should try to write a regular expression to match the part of the string that you’re trying to replace.
Could you see if the following fits your need.
Regex –
/(.mp3)[\'|\"][ ]*\/\>/
I have a done a working demo here (https://www.phpliveregex.com/p/gBD). When you visit this page, click on the preg_replace tab.